AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Class help (https://forums.alliedmods.net/showthread.php?t=25316)

Kensai 03-11-2006 18:00

Class help
 
I wanna make it so, when a player types /changeninja to change their class, it won't change until the next round. So I can cut down on the people that change classes every 10 secs to get all the powers.

Also, I want to make it so, Swift loses their extra speed every 10 seconds or so, for about 2 seconds, then gets the powers back.

Here's what I got so far.

Werewolf 03-12-2006 10:26

1 Attachment(s)
Set tasks. And does your class things work? I made a new thing.
Code:
new g_isWerewolf[33] g_isWerewolf[id] = (g_PlayerClass[id] == CLASS_WEREWOLF) if(g_isWerewolf[id] = true) { set_user_health(id, 200) return PLUGIN_CONTINUE }
Still wont work. But your problem should be easy to fix with tasks :wink: :)
example here.
Code:
    set_task(10.0, "swiftevents")     set_task(10.0, "reset", id)     return 0; } public swiftevents(id) {     set_user_maxspeed(id, 320.0)     client_cmd(id, "cl_sidespeed 320")     client_cmd(id, "cl_backspeed 320")     client_cmd(id, "cl_forwardspeed 320")     set_task(2.0, "Swift") }
Could look like that. And the task is under Swift(id) under the switch closing brace. And I don't think you have to add id after the event. + You made a mistake here:
Code:
public plugin_precahce()
Change that to
Code:
public plugin_precache()

Jordan 03-12-2006 10:39

Werewolves... oo very nice.

Kensai 03-13-2006 18:04

Thanks man, no wonder the models weren't working ROFL!

Will try this in a few mins.


All times are GMT -4. The time now is 20:14.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.