How to code?
Forum rules
Please follow the common behaviour rules (viewtopic.php?f=113&t=2199) and write english-only.
Please follow the common behaviour rules (viewtopic.php?f=113&t=2199) and write english-only.
-
- Posts: 1
- Joined: Fri Feb 10, 2017 2:57 am
- Player profile: https://ddnet.org/players/sMo0g/
- Mapper profile: https://ddnet.tw/mappers/sMo0g/
How to code?
Hey guys!
I have just a few question to people, who knows about coding, cpp and client&server changing.
I have read about how to compile the TW client and i did it, but coding - it is not my cup of tea. So i need some help in it.
What i want to do:
You know, when you take a grenade weapon and holding the fire key - it's fireing all the time, the same thing with laser and shotgun.
I want to do a bind, just like +hook, but i want to hook every, for example, 1 sec. if holding the key with this bind.
How can i do that?
I tried to find in source code things with hook and bind but i have found nothing. Well, i found, but i still don't know how it works.
I will be glad a lot if you help me, guys! I don't understand anything in it, but if you explain me how to do that, i will start to learn it from this point.
Sorry for my, probably, stupid questions.
Have a nice whatever it is!
I have just a few question to people, who knows about coding, cpp and client&server changing.
I have read about how to compile the TW client and i did it, but coding - it is not my cup of tea. So i need some help in it.
What i want to do:
You know, when you take a grenade weapon and holding the fire key - it's fireing all the time, the same thing with laser and shotgun.
I want to do a bind, just like +hook, but i want to hook every, for example, 1 sec. if holding the key with this bind.
How can i do that?
I tried to find in source code things with hook and bind but i have found nothing. Well, i found, but i still don't know how it works.
I will be glad a lot if you help me, guys! I don't understand anything in it, but if you explain me how to do that, i will start to learn it from this point.
Sorry for my, probably, stupid questions.
Have a nice whatever it is!
-
- Posts: 351
- Joined: Mon Nov 21, 2016 9:29 pm
- Player profile: https://ddnet.org/players/SP-32--124--32-Someone/
- Clan: Somepeople
Re: How to code?
found this in google
Code: Select all
alias aliastoloop "+hook;wait 100;aliastotoggle"
alias aliastotoggle aliastoloop
alias toggleon "alias aliastotoggle aliastoloop;aliastoloop"
alias toggleoff "alias aliastotoggle"
bind key toggleon
bind key toggleoff

Who is online
Users browsing this forum: Google [Bot] and 13 guests