27.03.2011, 13:17
k i have maked this:
NOTE:UNTESTED!!!!
i hope it will help
ANOTHER NOTE:u will need to start it by urself!+it will start when u will
Код:
#include <a_samp> forward i(cmdtext[]); forward i1(); public i1() { KillTimer(0); KillTimer(1); } public i(cmdtext[]) { SetTimer("i1", 20000,true); SendClientMessageToAll(0xFFFFFF, "You can use /test now!"); new playerid; if (strcmp("/TEST", cmdtext, true, 10) == 0) { GivePlayerWeapon(playerid, 31, 300); } } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/start", cmdtext, true, 10) == 0) { SetTimer("i", 500, true); return 1; } if (strcmp("/end", cmdtext, true, 10) == 0) { KillTimer(0); KillTimer(1); return 1; } return 0; } public OnFilterScriptInit() { SetTimer("i", 500, true); print("\n--------------------------------------"); print(" Testing!"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { KillTimer(0); KillTimer(1); return 1; }
i hope it will help
ANOTHER NOTE:u will need to start it by urself!+it will start when u will