[Bug] bug /arrestar
#1

No me funciona el comando /arrestar
Le dice al usuario que fue arrestado pero por 0 minutos y no lo mueve a ningъn lugar


Quote:

CMD:arrestar(playerid, params[]){
if(!IsAtArrestPoint(playerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "No estбs en el punto de arresto.");
new string[128], giveplayerid, time;
if(sscanf(params, "dddd", giveplayerid, time)) return SendClientMessageEx(playerid, COLOR_WHITE, "Utiliza: /arrestar playerid (Minutos) ");
if(time < 1 || time > 30) { SendClientMessageEx(playerid, COLOR_WHITE, "Tiempo: 1 a 30 minutos."); return 1; }
new suspect = GetClosestPlayer(playerid);
if(IsPlayerConnected(suspect)){
}
format(string, sizeof(string), "%s fue arrestado.", GetPlayerNameEx(suspect));
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NON E);
format(string, sizeof(string), "[Radio de policнa] {FFFFFF}(Oficial %s) dice: hemos arrestado a {00D2CF}%s.", GetPlayerNameEx(playerid), GetPlayerNameEx(suspect));
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
format(string, sizeof(string), "[Radio] {FFFFFF}(Agente %s) dice: hemos arrestado a {00D2CF}%s.", GetPlayerNameEx(playerid), GetPlayerNameEx(suspect));
SendRadioMessage(2, TEAM_BLUE_COLOR, string);
ResetPlayerWeaponsEx(suspect);
GameTextForPlayer(suspect, "Fuiste arrestado", 5000, 5);
if(IsPlayerInRangeOfPoint(playerid, 4.0, 1559.3228,-1693.7491,5.8970)){
SetPlayerFacingAngle(suspect, 0);
if(Info[suspect][pVIP] >= 2)
{
Info[suspect][pJailTime] = ((time*60)*75)/100;
}
else
{
Info[suspect][pJailTime] = time * 60;
}
DeletePVar(suspect, "IsFrozen");
new rand;
rand = random(sizeof(LSPDPrisonSpawns));
SetPlayerPos(suspect, LSPDPrisonSpawns[rand][0], LSPDPrisonSpawns[rand][1], LSPDPrisonSpawns[rand][2]);
LoadObjects(suspect);
SetPlayerInterior(suspect, 10);
Info[suspect][pInt] = 10;
Info[suspect][pJailed] = 2;
PhoneOnline[suspect] = 1;
Info[suspect][pArrested] += 1;
Info[suspect][pWantedLevel] = 0;
SetPlayerToTeamColor(suspect);
SetPlayerWantedLevel(suspect, 0);
ClearAnimations(suspect);
Info[suspect][pEstado] = 0;
DeletePVar(suspect, "PlayerCuffed");
PlayerCuffedTime[suspect] = 0;
Info[suspect][pVW] = 500;
SetPlayerVirtualWorld(suspect, 500);
}
if(IsPlayerInRangeOfPoint(playerid, 4.0, 613.3228,-589.1623,17.2266)) // Dillimore
{
SetPlayerFacingAngle(suspect, 0);
if(Info[suspect][pVIP] >= 2)
{
Info[suspect][pJailTime] = ((time*60)*75)/100;
}
else
{
Info[suspect][pJailTime] = time * 60;
}
DeletePVar(suspect, "IsFrozen");
new rand;
rand = random(sizeof(PrisonDillmore));
SetPlayerPos(suspect, PrisonDillmore[rand][0], PrisonDillmore[rand][1], PrisonDillmore[rand][2]);
SetPlayerInterior(suspect, 5);
Info[suspect][pInt] = 5;
Info[suspect][pVW] = 400;
SetPlayerVirtualWorld(suspect, 400);
Info[suspect][pJailed] = 6;
PhoneOnline[suspect] = 1;
Info[suspect][pArrested] += 1;
Info[suspect][pWantedLevel] = 0;
SetPlayerToTeamColor(suspect);
SetPlayerWantedLevel(suspect, 0);
ClearAnimations(suspect);
Info[suspect][pEstado] = 0;
DeletePVar(suspect, "PlayerCuffed");
PlayerCuffedTime[suspect] = 0;
}
else if(Team_FBI(playerid)){
TogglePlayerControllable(suspect, 0);
SetPVarInt(suspect, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 4000, 0, "d", suspect);
SetPlayerInterior(suspect, 1);
Info[suspect][pVW] = 600;
Info[suspect][pInt] = 1;
SetPlayerVirtualWorld(suspect, 600);
SetPlayerPos(suspect,315.1677,-1451.5564,-33.5292);
if(Info[suspect][pVIP] >= 2)
{
Info[suspect][pJailTime] = ((time*60)*75)/100;
}
else
{
Info[suspect][pJailTime] = time * 60;
}
Info[suspect][pJailed] = 3;
PhoneOnline[suspect] = 1;
DeletePVar(suspect, "IsFrozen");
Info[suspect][pArrested] += 1;
Info[suspect][pWantedLevel] = 0;
SetPlayerToTeamColor(suspect);
SetPlayerWantedLevel(suspect, 0);
ClearAnimations(suspect);
Info[suspect][pEstado] = 0;
DeletePVar(suspect, "PlayerCuffed");
PlayerCuffedTime[suspect] = 0;
}
else{
JailPrice[suspect] = 0;
format(string, sizeof(string), "Fuiste encarcelado %d segundos. Fianza: No Disponible", Info[suspect][pJailTime]);
SendClientMessageEx(suspect, COLOR_LIGHTBLUE, string);
}
return 1;
}

Reply
#2

pawn Код:
if(sscanf(params, "dd", giveplayerid, time)) return SendClientMessageEx(playerid, COLOR_WHITE, "Utiliza: /arrestar playerid (Minutos) ");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)