Admin Jail issue..
#1

Okay, Admin Jail works fine but the problem is it Jails me myself..
Like /ajail 2 1 which is Jail id 2 for 1 min but instead of jailing id 2, It jails me..

pawn Код:
CMD:ajail(playerid, params[])
{
        new id, mins, str[128];
        new JailTimer[MAX_PLAYERS];
        if(PlayerInfo[playerid][Adminlevel] < 2) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]: You are not authorized to use this command ");
        if(sscanf(params, "ud", id, mins)) return SendClientMessage(playerid, COLOR_RED, "[SYNTAX]: /ajail [PlayerID/PartOfName] [Mins]");
        if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Invalid Player ID");
        SetPlayerPos(playerid, 264.4176, 77.8930, 1001.0391);
        SetPlayerInterior(playerid, 6);
        JailTimer[id] = SetTimerEx("Unjail", mins*60*1000, 0, "d", id);
        format(str, sizeof(str), "You jailed %s for %d mins.", GetName(id), mins);
        SendClientMessage(playerid, COLOR_RED, str);
        format(str, sizeof(str), "%s jailed you for %d mins.", GetName(playerid), mins);
        SendClientMessage(id, COLOR_RED, str);
        format(str, sizeof(str), "ADMIN %s has jailed %s for %d mins!", GetName(playerid), GetName(id), mins);
        SendClientMessageToAll(COLOR_RED, str);
        return 1;
}
Reply
#2

Not:
SetPlayerPos(playerid, 264.4176, 77.8930, 1001.0391);
SetPlayerInterior(playerid, 6);

SO is it right:
SetPlayerPos(id, 264.4176, 77.8930, 1001.0391);
SetPlayerInterior(id, 6);

If you jail someone with this command he can break out with a relog
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)