[Ajuda] Comando
#4

Primeiramente nгo recomendo usar strcmp e sscanf.
pawn Код:
if(strcmp(cmd, "/bust", true) == 0)
{
    if(AdminGeral[playerid] == 1)
    {
        new aname, motivo[256];
        if(sscanf(cmdtext, "s[6]uis[256]", cmd, plid, tempo, motivo))
        {
            SendClientMessage(playerid, Verde, "Uso correto: /bust [id do player] [tempo] [motivo]");
            return 1;
        }
        format(string, sizeof(string), "O(A) Administrador %s (%d) prendeu o jogador %s por %d segundos, Motivo %s .", GetPlayerNameEx(playerid), playerid, GetPlayerNameEx(plid), tempo, motivo);
        SendClientMessageToAll(tcadm, string);
        SetPlayerInterior(plid, 3);
        SetPlayerPos(plid, 197.6661,173.8179,1003.0234);
        SetPlayerArmour(plid, 999999);
        ResetPlayerWeapons(plid);
        SetTimerEx("Bust", 1000*1, false, "i", plid);
    }
    return 1;
}
Antes de dar CTRL + C e CTRL + V, estude sscanf.
Reply


Messages In This Thread
Comando - by Netiinho - 20.07.2014, 20:43
Re: Comando - by MultiKill - 20.07.2014, 20:57
Re: Comando - by Netiinho - 20.07.2014, 20:59
Re: Comando - by MultiKill - 20.07.2014, 21:05
Re: Comando - by Netiinho - 20.07.2014, 21:12
Re: Comando - by MultiKill - 20.07.2014, 21:18
Re: Comando - by Netiinho - 20.07.2014, 21:37
Re: Comando - by MultiKill - 20.07.2014, 21:49
Re: Comando - by Netiinho - 20.07.2014, 21:57
Re: Comando - by MultiKill - 20.07.2014, 21:59

Forum Jump:


Users browsing this thread: 2 Guest(s)