[ajuda]Tiraradm
#3

Utiliza ZCMD + SSCANF, й muito melhor. ;')

pawn Код:
#tryinclude sscanf2
#tryinclude zcmd

COMMAND \
    :daradmin (playerid, params[])
{

    new
        _1PARAM,
            _2PARAM,
                _1NAME[MAX_PLAYER_NAME],
            _2NAME[MAX_PLAYER_NAME],
        MY_STRING[512 char];
       
    if(unformat(params, "uu", _1PARAM, _2PARAM)) SendClientMessage(playerid, (0xDFD50BFF), "- \"/daradmin <playerid/nickname> <level(1-1340)>\"");
    else if(_1PARAM == INVALID_PLAYER_ID) SendClientMessage(playerid, (0xDFD50BFF), "- PLAYER_NOT_FOUND !");
    else if(PlayerInfo[playerid][pAdmin] == 5000)
    {
        GetPlayerName(playerid, _1NAME, sizeof _1NAME);
        GetPlayerName(_1PARAM, _2NAME, sizeof _2NAME);
       
        PlayerInfo[_1PARAM][pAdmin] = _2PARAM;
       
        printf(
       
            "AdmCmd: %s promoveu %s para Admin Level %d ."

            , _1NAME
            , _2NAME
            , _2PARAM
        );
       
        format(MY_STRING, sizeof(MY_STRING)

            , "  Vocк foi promovido a Admin Level %d por %s"
           
            , _2PARAM
            , _1NAME
        );
        SendClientMessage(_1PARAM, (0xDFD50BFF), MY_STRING);
       
        format(MY_STRING, sizeof(MY_STRING)

            , "  Vocк promoveu %s para Admin Level %d ."
           
            , _2NAME
            , _2PARAM
        );
        SendClientMessage(playerid, (0xDFD50BFF), MY_STRING);
    }
    else return false;
   
    return true;
}
Exprimenta. ;')
Reply


Messages In This Thread
[ajuda]Tiraradm - by Brunow - 28.05.2010, 19:55
Re: [ajuda]Tiraradm - by lomato - 28.05.2010, 19:59
Re: [ajuda]Tiraradm - by pmkrz - 28.05.2010, 20:00
Re: [ajuda]Tiraradm - by Brunow - 28.05.2010, 20:28
Re: [ajuda]Tiraradm - by pmkrz - 28.05.2010, 20:34
Re: [ajuda]Tiraradm - by zSuYaNw - 28.05.2010, 20:41
Re: [ajuda]Tiraradm - by [VGS]Protioso - 28.05.2010, 20:58
Re: [ajuda]Tiraradm - by pmkrz - 28.05.2010, 20:59
Re: [ajuda]Tiraradm - by [VGS]Protioso - 28.05.2010, 21:11

Forum Jump:


Users browsing this thread: 1 Guest(s)