Jail command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Jail command (
/showthread.php?tid=631118)
Jail command -
IceWizz - 23.03.2017
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
Re: Jail command -
LazzyBoy - 23.03.2017
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.
Re: Jail command -
IceWizz - 23.03.2017
Код:
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;
}
Re: Jail command -
IceWizz - 24.03.2017
bump
Re: Jail command -
Variable™ - 24.03.2017
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);