[Ajuda] Comando /cadeia
#2

pawn Код:
if(strcmp(cmd, "/cadeia", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "Uso correto: /cadeia [ id ] [tempo em minutos] [motivo].");
                return 1;
            }
            new playa;
            new money;
            playa = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            money = strval(tmp);
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "Uso correto: /cadeia [ id ] [tempo em minutos] [motivo].");
                return 1;
            }
            if (PlayerInfo[playerid][pAdmin] >= 2)
            {
                if(admtrampando[playerid] < 1)
                {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                return 1;
                }
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        format(string, sizeof(string), "ADM CMD: %s foi preso por %d minutos pelo admnistrador: %s, motivo: %s.", pNome(playa),money,pNome(playerid),result);
                        ABroadCast(COLOR_LIGHTRED,string,1);
                        format(string, sizeof(string), "Vocк foi preso por %d minutos pelo admnistrador: %s, motivo: %s.", money,pNome(playerid),result);
                        SendClientMessage(playa, COLOR_LIGHTRED, string);
                        ResetPlayerWeapons(playa);
                        WantedPoints[playa] = 0;
                        NathanInfo[playa][pAdmin] = 1;
                        NathanInfo[playa][pAdminTempo] = money*60;
                        SetPlayerInterior(playa, 5);
                        SetPlayerPos(playa, 322.72,306.4,999.11);
                        SendClientMessage(playa, COLOR_LIGHTBLUE, string);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Voce nгo esta autorizado a usar este comando!");
            }
        }
        return 1;
    }
Repu *_*
Reply


Messages In This Thread
[Ajuda] Comando /cadeia - by Vitor_Marfioso - 24.01.2012, 21:59
Re: [Ajuda] Comando /cadeia - by Don_Speed - 24.01.2012, 23:53
Re: [Ajuda] Comando /cadeia - by HarryPoter(Owner) - 24.01.2012, 23:54
Re: [Ajuda] Comando /cadeia - by Vitor_Marfioso - 25.01.2012, 15:05
Re: [Ajuda] Comando /cadeia - by Don_Speed - 25.01.2012, 15:22
Re: [Ajuda] Comando /cadeia - by HarryPoter(Owner) - 25.01.2012, 15:58

Forum Jump:


Users browsing this thread: 1 Guest(s)