03.07.2011, 13:00
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/gz", true) == 0)
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
if(Pos[0] > 2216.207 && Pos[0] < 2623.11 && Pos[1] > 2216.207 && Pos[1] < -1456.841)
{
SendClientMessage(playerid, 0xFFFF00FF,"Wait 60 seconds here for dominate.");
SetTimerEx("Check", 600000, false, "i", playerid);
}
return 1;
}
return 0;
}
forward Check(playerid);
public Check(playerid)
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
if(Pos[0] > 2216.207 && Pos[0] < 2623.11 && Pos[1] > 2216.207 && Pos[1] < -1456.841)
{
SendClientMessage(playerid, 0xFFFF00FF,"GangZone dominated.");
// FUNCTIONS ..
}
else { SendClientMessage(playerid, 0xFFFF00FF,"You aren't in the the gangzone"); }
return 1;
}