21.11.2014, 17:44
u should do it like this
pawn Код:
if (pickupid == captureballas) // ballas capture
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z)) //the 5.0 it's jus a radius u can change it the x, y, z is Player's Pos!.........
{
SendClientMessage(playerid,0x0000FF96," The capture will finish in 20 seconds");
KillTimer(MyTimer[playerid]);
if(GetPlayerTeam(playerid) == 0) GangZoneFlashForAll(ballasga,0x00800096);
if(GetPlayerTeam(playerid) == 1) GangZoneFlashForAll(ballasga,0x0000FF96);
if(GetPlayerTeam(playerid) == 2) GangZoneFlashForAll(ballasga,0xFFFF0096);
if(GetPlayerTeam(playerid) == 3) GangZoneFlashForAll(ballasga,0x93116F96);
MyTimer[playerid] = SetTimerEx("TestFunction", 1000, 1, "i", playerid);
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "You Left The Capture Point!");
//you can add more cods if you want !!! !!! !!!
}