22.07.2010, 16:37
(
Последний раз редактировалось DJDhan; 22.07.2010 в 16:55.
)
Try this :
Код:
new pvptimer[MAX_PLAYERS];
Код:
dcmd_pvp(playerid, params[]) { #pragma unused params new Pvp = GetPVarInt(playerid, "Pvp"); if(Pvp == 0) { KillTimer(pvptimer); //if the value starts at 0 then the timer is not even running SetPVarInt(playerid, "Pvp", 1); SendClientMessage(playerid, colorPVP, "PVP Bekapcsolva!"); } if(Pvp == 1) { SendClientMessage(playerid, colorPVP, "Vбrnod kell 5 percet hogy kikapcsoljon a PVP!"); pvptimer[playerid] = SetTimerEx("PvpOff", 300000, 0, "i", playerid); } return 1; }
Код:
forward PvpTimer(playerid); public PvpTimer(playerid) { SetPVarInt(playerid, "Pvp", 0); SendClientMessage(playerid, colorPVP, "PVP Kikapcsolva!"); return 1; }