[Ajuda] Comando
#1

Oi pessoal do forum samp, hoje venho pedir pra vcs ajuda com um comando...

Eu tenho o comando /AJ [playerdid] [minutos] [razгo], mas nгo estб funcionando como eu queria, й o seguinte... Quando eu faзo o comando para mandar um player para o AJ (AdminJail) ex: /aj [1] [2] [teste] o player com o ID 1 vai para o AJ com 2 minutos, mas logo de seguida se eu fizer o mesmo comando para o ID 4 ou 5 ou 6, etc volta a mandar o ID 1 para o AdminJail... Nгo sei porque isto acontece..

o comando й o seguinte:

pawn Код:
if(strcmp(cmd, "/aj", true) == 0)
        {
            if(IsPlayerConnected(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[Comando:] /aj [playerid] [minutes] [Razгo]");
                    return 1;
                }
                giveplayerid = ReturnUser(tmp);
                new playa;
                new money;
                playa = ReturnUser(tmp);
                tmp = strtok(cmdtext, idx);
                money = strval(tmp);
                if (PlayerInfo[playerid][pAdmin] >= 2)
                {
                    if(IsPlayerConnected(playa))
                    {
                        if(playa != INVALID_PLAYER_ID)
                        {
                            new length = strlen(cmdtext);
                            while ((idx < length) && (cmdtext[idx] <= ' '))
                            {
                                idx++;
                            }
                            new offset = idx;
                            new result[128];
                            new playa;
                            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                            {
                                result[idx - offset] = cmdtext[idx];
                                idx++;
                            }
                            result[idx - offset] = EOS;
                            if(!strlen(result))
                            {
                                SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[Comando:] /aj [playerid] [minutes] [Razгo]");
                                return 1;
                            }
                            if(PlayerInfo[playa][pAdmin] == 99999) return 1;
                            format(string, sizeof(string), "[INFO:] Mandaste o %s de adminJail.", GetPlayerNameEx(playa));
                            SendClientMessage(playa, COLOR_LIGHTYELLOW2, string);
                            format(string, sizeof(string), "[INFO:] Foste adminJail por %s durante %d minutos.", GetPlayerNameEx(playerid),money);
                            SendClientMessage(playerid, COLOR_LIGHTYELLOW2, string);
                            format(string, sizeof(string), "O player %s foi de AdminJail por %s durante %d minutos[Razгo:%s].", GetPlayerNameEx(playa),GetPlayerNameEx(playerid),money,(result));
                            SendClientMessageToAll(COLOR_ADMINCMD, string);
                            ResetPlayerWeapons(playa);
                            WantedPoints[playa] = 0;
                            PlayerInfo[playa][pJailed] = 1;
                            PlayerInfo[playa][pJailTime] = money*60;
                            TogglePlayerControllable(playa, 0);
                            SetPlayerPos(playa, -56521122891,-14515454563,9.295454452646);
                            /*SetPlayerInterior(playa, 3);
                            SetPlayerVirtualWorld(playa,0);*/

                        }
                    }
                }
Reply


Messages In This Thread
[Ajuda] Comando - by Slayer1 - 04.05.2012, 19:00
Re: [Ajuda] Comando - by Joker_OutLock - 04.05.2012, 20:36

Forum Jump:


Users browsing this thread: 1 Guest(s)