21.11.2013, 23:08
Hello guys i made a robbery command but i was wondering how to make if a player is leaving during the robbery the robbery stops and says Robbery failed you have left the checkpoint
Here is my code:
Here is my code:
pawn Код:
if(IsPlayerInDynamicCP(playerid,Checkpoint[5]))
{
SetPVarInt(playerid, "RobbingCityHall", 30);
SetPVarInt(playerid, "CityHallRobbedRecently", 1);
IncreaseWantedLevel(playerid,4);
@Robbing1(playerid);
format(string,sizeof(string),"%s(%d) Has started a robbery at Los Santos City Hall he is wanted level to: %d",GetName(playerid),playerid,GetPlayerWantedLevel(playerid));
SendClientMessageToAll(COLOR_ORANGE,string);
return 1;
}
else
{
SendClientMessage(playerid,COLOR_ERROR,"You are not in any checkpoint!");
}