AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   1 per round my man! (https://forums.alliedmods.net/showthread.php?t=11348)

dcyuri7 03-16-2005 17:40

1 per round my man!
 
Alright, I need some help with how to make a command only allowed once per round. Here's what i ahve going...
someone says "/respawn"
and they then respawn.
I dont want them using it 5 million times each round, only once. How is this done?
I cannot find anything that works as a "cvar array", so to say, that is dependent upon user usage amount.

Any help?

dcyuri7 03-16-2005 17:44

oh ya, heres my source, so the nice person who might help me, sees where i am going with this. :wink:

Code:

#include <amxmodx>
#include <amxmisc>
#include <fun>

public plugin_init() {
        register_plugin("respawn","1.0","yuri")
        register_clcmd("say /respawn","process",0," - to respawn")
        return PLUGIN_CONTINUE
}

public admin_revive(id)
{
  spawn(id);
  set_task(0.5,"spawnagain",id);
}

public spawnagain(id) {
  spawn(id);
}

public process(id) {
        if (get_user_flags(id)&ADMIN_MAP) {
                admin_revive(id)
                return PLUGIN_HANDLED
  }
  else {
        // Your help goes here...

I appreciate any help on this. :)

dcyuri7 03-16-2005 18:49

i decided to make it cost money, therefore limiting people for purchasing it. So, moderator/ admin can u delete this thread?


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

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