01.06.2010, 23:20
Like when i do /kill i killing my self in server and after i do it agian i wanna the charchter who using it agian need to wait 150 secs please tell me how to do it becuse im new
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(Kill,4,cmdtext);
return 0;
}
dcmd_Kill(playerid,params[])
{
#pragma unused params
if(GetPVarInt(playerid, Died) == 1) return SendClientMessage(playerid, Color, "*** You can use /kill once every 150 seconds.");
SetPlayerHealth(playerid,0.0);
SetPVarInt(playerid, Died, 1);
SetTimerEx("Reset",150000, false, "i", playerid);
return 1;
}
forward Reset(playerid); public Reset(playerid) SetPVarInt(playerid, Died, 0);
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define COLOR_RED 0xFF0000AA