Problem whit /jail
#1

Hi guys, well, I have this code /jail

pawn Код:
dcmd_jail(playerid, params[])
    {
        new
            pName[ MAX_PLAYER_NAME ];

        if ( IsPlayerAdmin( playerid ) || pData[ playerid ][ P_LEVEL ] >= _:P_LEVEL_MOD )
        {
            new targetid, minutes;
            if(sscanf(params, "ri", targetid, minutes)) return SendClientMessage(playerid, COLOR_RED,"USO: /jail [id] [minutos]");
            if(minutes <= 0 || minutes > 60) return SendClientMessage(playerid, COLOR_RED, "Minutos validos: {FFFFFF}3, 4, 5");
            if(targetid == playerid) return SendClientMessage(playerid, COLOR_RED, "ERROR: No te puedes encarcelar a ti mismo.");
            else
            {
                new str[128];
                format(str, sizeof(str), ">> %s ha sido encarcelado %d minutos", pName, minutes);
                SendClientMessageToAll(COLOR_ORANGE,str);
                JailTimer[targetid] = SetTimer("Unjail", minutes*60*1000, false);
                SetPlayerPos(targetid, 264.4176, 77.8930, 1001.0391);
                SetPlayerInterior(playerid, 6);
                inJail[targetid] = true;
                GameTextForPlayer(playerid, "~p~HAS SIDO ENCARCELADO", 10000, 6);
                PlayerPlaySound(targetid,1057,0.0,0.0,0.0);
            }
        }
        return 1;
}

But when I put: example "/jail 4 5" ... I get the message saying that the number of minutes is invalid, but I'm putting the right amount. could tell me what is the problem?


Translated by: ******.
The original text it's on spanish.
Reply


Messages In This Thread
Problem whit /jail - by FlavioCesar - 13.08.2014, 23:43
Re: Problem whit /jail - by Toolkit - 13.08.2014, 23:59
Re: Problem whit /jail - by FlavioCesar - 14.08.2014, 00:36
Re: Problem whit /jail - by 1FreeHost - 14.08.2014, 10:01
Respuesta: Problem whit /jail - by FlavioCesar - 14.08.2014, 17:07

Forum Jump:


Users browsing this thread: 3 Guest(s)