PDA

View Full Version : Jail command


IceWizz
23/03/2017, 01:32 PM
i make jail command it work goods but when i leave jail i use this cordinates
1552.5375,-1675.7814,16.1953
it spawns me at village up of los santos
this cordinates where i set near doors of pd
248.4649,71.9612,1003.6406
it spawn me at los santos help
i want to spawn me near doors in lspd and when i leave to spawn me in front of lspd

LazzyBoy
23/03/2017, 01:49 PM
show us code where u get jailed and also when unjailed. And Please be more specific in what you want cuz i didnt really understand alot from that.

IceWizz
23/03/2017, 02:07 PM
CMD:jail(playerid,params[])
{
if(IsPlayerAdmin(playerid) < 1) return SendClientMessage(playerid, 0x33AA33AA, "[BA:RP]Niste ovlasceni da koristite ovu komandu!");
new targetid;
{
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, 0x33AA33AA, "[BA:RP]Koristi /jail [playerid]");
{
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0x33AA33AA, "[BA:RP]Igrac koga pokusavate jailovati nije online!");
{
if(IsPlayerAdmin(targetid) >1)return SendClientMessage (playerid, 0x33AA33AA, "[BA:RP]Niste ovlasceni da koristite ovu komandu!");
SetPlayerPos(playerid,264.8745,77.5741,1001.0391);
SetPlayerInterior(playerid, 6);
SetCameraBehindPlayer(playerid);
SetTimerEx("EndJail", 1, false, "i", playerid);
new name[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, name, MAX_PLAYER_NAME );
new string[70];
format(string, sizeof(string), "[BA:RP]Admin %s je zatvorio igraca %s Vreme:1800",name);
SendClientMessageToAll(0x33AA33AA, string);
}
}
}
return 1;
}

unjail

forward EndJail(playerid);
public EndJail(playerid)
{
SetPlayerPos(playerid, 248.4649,71.9612,1003.6406);
SetPlayerInterior(playerid, 6);
SendClientMessage(playerid, 0x33AA33AA, "[BA:RP]Izasli ste iz zatvora pokusajte biti bolji gradjanin!");
KillTimer(1);
return 1;
}

IceWizz
24/03/2017, 12:46 PM
bump

Variable™
24/03/2017, 12:51 PM
When your jail time ends you're supposed to be spawned out inside an interior or outside?
If you don't want to spawn inside any interior use;
SetPlayerInterior(playerid, 0);