[AJUDA] Comandos
#4

tenta assim:

pawn Код:
if(strcmp(cmd, "/darsocio", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))    return SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id] [nivel de 1 a 3]");
        new para1 = ReturnUser(tmp);
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))    return SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id] [nivel de 1 a 3]");
        if (PlayerInfo[playerid][pAdmin] >= 1341)
        {
            if(IsPlayerConnected(para1))
            {
                if(para1 != INVALID_PLAYER_ID)
                {
                    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    new socio_nivel = strval(tmp);
                    PlayerInfo[para1][pSocio] = socio_nivel;
                    SetPlayerScore(para1, 200);
                    GivePlayerMoney(para1, 1000);
                    format(string, sizeof(string), "Vocк ganhou VIP socio nнvel %d do admin %s.", socio_nivel, sendername);
                    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                    format(string, sizeof(string), "Vocк deu VIP socio nнvel %d para %s.", socio_nivel, giveplayer);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    new celulas[100], Nome[24];
                    if(!fexist("Socio.log")) return CriarLog("Socio.log");
                    GetPlayerName(playerid, Nome, 24);
                    format(celulas, sizeof(celulas), "%s deu sуcio nнvel %d para %s.", Nome, socio_nivel, giveplayer);
                    EscreverLog("Socio.log", celulas);
                }
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!");
        }
        return 1;
    }
Sу trocar as linhas:

pawn Код:
SetPlayerScore(para1, 200); //troque o "200" pelo level que quer dar pro player
GivePlayerMoney(para1, 1000); //troque o "1000" pela grana que quer dar pro player
Reply


Messages In This Thread
[AJUDA] Comandos - by Rodrigo_Avenged - 06.01.2012, 13:50
Re: [AJUDA] Comandos - by AleeFerreira - 06.01.2012, 13:59
Re: [AJUDA] Comandos - by Rodrigo_Avenged - 06.01.2012, 14:06
Re: [AJUDA] Comandos - by AleeFerreira - 06.01.2012, 14:10
Re: [AJUDA] Comandos - by Rodrigo_Avenged - 06.01.2012, 14:22
Re: [AJUDA] Comandos - by Rodrigo_Avenged - 06.01.2012, 14:35
Re: [AJUDA] Comandos - by AleeFerreira - 06.01.2012, 14:38
Re: [AJUDA] Comandos - by Rodrigo_Avenged - 06.01.2012, 16:24
Re: [AJUDA] Comandos - by Rodrigo_Avenged - 06.01.2012, 16:45

Forum Jump:


Users browsing this thread: 1 Guest(s)