/unjail 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: /unjail command (
/showthread.php?tid=506338)
/unjail command -
whando - 12.04.2014
Hey, I made a command to release someone from admin jail, but it doesn't work. Worst thing is I don't see it myself

!
pawn Код:
YCMD:unjail(playerid, params[], help)
{
if(help) return SCM(playerid, COLOR_GREY, "Not supported");
if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pMod] == 1)
{
new id, string[256];
if(sscanf(params, "u", id)) return SCM(playerid, COLOR_GRAD, "USAGE: /unjail [playerid]");
PlayerInfo[id][pAjailTime] = 0;
PlayerInfo[id][pAjailed] = 0;
SetPlayerInterior(id, 0);
SetPlayerVirtualWorld(id, 0);
TextDrawHideForPlayer(id, Textdraw6969[id]);
format(string, sizeof(string),"[INFO]: Admin %s has unjailed %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(id));
ABroadCast(COLOR_ORANGE,string, 5);
format(string, sizeof(string), "You have unjailed %s.",GetPlayerNameEx(id));
SCM(playerid, COLOR_BLUE, string);
format(string, sizeof(string), "Admin %s has unjailed you.",GetPlayerNameEx(playerid));
SCM(id, COLOR_BLUE, string);
}
return 1;
}
Re: /unjail command -
MrCallum - 12.04.2014
Try use zcmd it will be possibly easier!
Also try use two strings it looks like you are using one
____________________________________
+Rep if i helped
Re: /unjail command -
bool - 12.04.2014
It's not working (I'd assume from the code you're showing us) because you aren't moving the player anywhere.
Re: /unjail command -
MrCallum - 12.04.2014
Yes you are just showing the usage you need to actually send the player to the desired position
Re: /unjail command -
whando - 12.04.2014
Thanks, that was not my problem tho, but it fixed my problem actually, the messages didn't display o.0...