12.06.2016, 08:45
Код:
CMD:rob(playerid, params[]) { for(new i; i < sizeof(robberyPlaces); i++) { if(IsPlayerInRangeOfPoint(playerid, 7.0, robberyPlaces[i][0], robberyPlaces[i][1], robberyPlaces[i][2])) { if(GetPVarInt(playerid,"RobTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 5 minutes before rob again."); if(gTeam[playerid] == TEAM_COP) return SendClientMessage(playerid, red, "Cops can't do robberies!"); if(PlayerInfo[playerid][pJailed] == 1) return SendClientMessage(playerid, red, "You cannot use this command in jail."); if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"You can't start a robbery if you are in a vehicle!"); if(IsRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You are already robbing this place."); if(IsBankRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You are already robbing this bank."); pRobTimerID[playerid] = SetTimerEx("pRobTimer", 1000, true, "i", playerid); pRobCount[playerid] = 31; SetPVarInt(playerid,"RobTime",GetTickCount()+300000); ApplyAnimation(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.0, 1, 0, 0, 0, 0); // Rob } } return 1; }