/unjail command
#1

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;
}
Reply
#2

Try use zcmd it will be possibly easier!

Also try use two strings it looks like you are using one

____________________________________
+Rep if i helped
Reply
#3

It's not working (I'd assume from the code you're showing us) because you aren't moving the player anywhere.
Reply
#4

Yes you are just showing the usage you need to actually send the player to the desired position
Reply
#5

Thanks, that was not my problem tho, but it fixed my problem actually, the messages didn't display o.0...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)