17.11.2011, 22:15
Hi,
I have this command:
I need to add others arrest position, how can I do this?
Thank u.
I have this command:
PHP код:
COMMAND:arresta(playerid,params[]){
new id, string[150], time;
if(PlayerAccount[playerid][Faction]!=FACTION_POLICE) return SendClientMessage(playerid, COLOR_DARKRED,"Non sei un poliziotto in servizio.");
if(PlayerAccount[playerid][CurrentDuty]==0) return SendClientMessage(playerid, COLOR_DARKRED,"Non sei un poliziotto in servizio.");
if (sscanf(params, "ud", id, time)) return SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "USA: /arresta [playerid] [tempo]");
if(!PlayerToPoint(15.0, playerid, 1778.6952,-1567.2928,1734.9430)) return SendClientMessage(playerid, COLOR_DARKRED, "Devi essere vicino alla posizione di arresto");
if(id==playerid) return SendClientMessage(playerid, COLOR_DARKRED, "Non puoi arrestarti da solo.");
if(IsPlayerInRangeOfPlayer(playerid, id, 5.0)){
if(PlayerAccount[id][Ammanettato]==0) return SendClientMessage(playerid, COLOR_DARKRED, "Il player deve essere ammanettato.");
if(GetPlayerVirtualWorld(playerid) != GetPlayerVirtualWorld(id)) return SendClientMessage(playerid, COLOR_DARKRED, "Il player non ti и vicino.");
new pout = random(150);
format(string, sizeof(string), "INFO: Hai arrestato con successo %s, sono stati aggiunti %d$ alla tua busta paga.", GetPlayerNameEx(id), pout);
PlayerAccount[playerid][Pay]+=pout;
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
ResetPlayerWeaponsEx(id);
SetPlayerWantedLevel(id, 0);
PlayerAccount[id][JailTime] = time * 60;
format(string, sizeof(string), "Sei stato arrestato! - Tempo Jail: %d secondi.", PlayerAccount[id][JailTime]);
PlayerAccount[id][Jailed]=1;
PlayerAccount[id][Ammanettato]=0;
SendClientMessage(id, COLOR_LIGHTYELLOW2, string);
SetPlayerInterior(id, 6);
TogglePlayerControllable(id,0);
SetPlayerPos(id,1778.6985,-1581.5929,1734.9430);
FadeColorForPlayer(id,0,0,0,0,0,0,0,255,15,0);
LoadingMap[id] = 1;
}
return 1;
}
Thank u.