• Help with functions, variables and strings.
    2 replies, posted
So I want to make a script were, it gets what weapon they have equipped, how much ammo they have then grabs info from a list and then makes the player slow down or speed up accordingly. I don't know how to get this infomation, all I know is I would make a list then use "if" statements. Examples are greatly appreciated, and please don't just give me the code, I actually want to learn ;)
[url]http://wiki.garrysmod.com/page/Player/GetActiveWeapon[/url] [url]http://wiki.garrysmod.com/page/WEAPON/Ammo1[/url] [url]http://wiki.garrysmod.com/page/WEAPON/Ammo2[/url] [url]http://wiki.garrysmod.com/page/Player/SetWalkSpeed[/url] [url]http://wiki.garrysmod.com/page/Player/SetRunSpeed[/url] Using that, you could probably run the if statements you were talking about through a loop: [url]https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index76d2.html[/url]
[QUOTE=warlock123;49460096][url]http://wiki.garrysmod.com/page/Player/GetActiveWeapon[/url] [url]http://wiki.garrysmod.com/page/WEAPON/Ammo1[/url] [url]http://wiki.garrysmod.com/page/WEAPON/Ammo2[/url] [url]http://wiki.garrysmod.com/page/Player/SetWalkSpeed[/url] [url]http://wiki.garrysmod.com/page/Player/SetRunSpeed[/url] Using that, you could probably run the if statements you were talking about through a loop: [url]https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index76d2.html[/url][/QUOTE] Thank you very much.
Sorry, you need to Log In to post a reply to this thread.