AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Limiting Commands Per Map? (https://forums.alliedmods.net/showthread.php?t=16942)

DataMatrix 08-23-2005 08:17

Limiting Commands Per Map?
 
I know I keep asking for help, but i'm very enthusiastic to get into the coding of AMXX :D.

I want to know is there anyway of limiting a command to say, once per map?

Hawk552 08-23-2005 08:53

Depends.

Code:
#include <amxmodx> new done[32] public plugin_init() {        register_concmd("amx_test","test",ADMIN_KICK," - tests to see if it's already been done this map") } public test(id) {        if(done[id]==1)        {               client_print(id,print_console,"[AMXX] You have already done this command")        }        else        {               client_print(id,print_console,"[AMXX] Test successful. LOL INTERNET")         }         done[id]=1         return PLUGIN_HANDLED }


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

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