Others arrest position, help please.
#1

Hi,
I have this command:

PHP код:
COMMAND:arresta(playerid,params[]){
    new 
idstring[150], time;
    if(
PlayerAccount[playerid][Faction]!=FACTION_POLICE) return SendClientMessage(playeridCOLOR_DARKRED,"Non sei un poliziotto in servizio.");
    if(
PlayerAccount[playerid][CurrentDuty]==0) return SendClientMessage(playeridCOLOR_DARKRED,"Non sei un poliziotto in servizio.");
    if (
sscanf(params"ud"idtime)) return SendClientMessage(playeridCOLOR_LIGHTYELLOW2"USA: /arresta [playerid] [tempo]");
    if(!
PlayerToPoint(15.0playerid1778.6952,-1567.2928,1734.9430)) return SendClientMessage(playeridCOLOR_DARKRED"Devi essere vicino alla posizione di arresto");
    if(
id==playerid) return SendClientMessage(playeridCOLOR_DARKRED"Non puoi arrestarti da solo.");
    if(
IsPlayerInRangeOfPlayer(playeridid5.0)){
    if(
PlayerAccount[id][Ammanettato]==0) return SendClientMessage(playeridCOLOR_DARKRED"Il player deve essere ammanettato.");
    if(
GetPlayerVirtualWorld(playerid) != GetPlayerVirtualWorld(id)) return SendClientMessage(playeridCOLOR_DARKRED"Il player non ti и vicino.");
    new 
pout random(150);
    
format(stringsizeof(string), "INFO: Hai arrestato con successo %s, sono stati aggiunti %d$ alla tua busta paga."GetPlayerNameEx(id), pout);
    
PlayerAccount[playerid][Pay]+=pout;
    
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
    
ResetPlayerWeaponsEx(id);
    
SetPlayerWantedLevel(id0);
    
PlayerAccount[id][JailTime] = time 60;
    
format(stringsizeof(string), "Sei stato arrestato! - Tempo Jail: %d secondi."PlayerAccount[id][JailTime]);
    
PlayerAccount[id][Jailed]=1;
    
PlayerAccount[id][Ammanettato]=0;
    
SendClientMessage(idCOLOR_LIGHTYELLOW2string);
    
SetPlayerInterior(id6);
    
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;

I need to add others arrest position, how can I do this?
Thank u.
Reply
#2

Explain what you need PROPERLY. What is "add others arrest position" supposed to mean?
Reply
#3

I need to add others jail points.
Reply
#4

try
PHP код:
switch(random(3))
{
case 
0SetPlayerPos(id,1778.6985,-1581.5929,1734.9430);
case 
1:
case 
2:

Reply
#5

try doing this...
remove
pawn Код:
if(!PlayerToPoint(15.0, playerid, 1778.6952,-1567.2928,1734.9430)) return SendClientMessage(playerid, COLOR_DARKRED, "Devi essere vicino alla posizione di arresto");
then before the actual code add / use this logic
pawn Код:
if(PlayerToPoint(15.0, playerid, 1778.6985, -1581.5929, 1734.9430) || PlayerToPoint(15.0, playerid, x, y, z) || PlayerToPoint(15.0, playerid, x, y, z))
{
// your code here
}
Just add the coordinates to those variables up there
hope it helped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)