[AJUDA] Comando de admin
#2

pawn Код:
CMD:darscore(playerid,params[])
{
    static giveplayerid,iScore,AdminName[MAX_PLAYER_NAME],pName[MAX_PLAYER_NAME],string[256];
    if (sscanf(params,"ii",giveplayerid,iScore))
        return SendClientMessage(playerid,0xFF0000AA,"Digite: /darscore [ID do Jogador] [Quantia de Score]");
       
    if (!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid,0xFF0000AA,"Vocк nгo esta conectado com admin RCON");
       
    if (!IsPlayerConnected(giveplayerid))
        return SendClientMessage(playerid,0xFF0000AA,"Este jogador nгo esta conectado no servidor");
       
    if (iScore < 1 || iScore > 1000000)
        return SendClientMessage(playerid,0xFF0000AA,"Quantia de score invalida. Minimo 1 Maximo 1.000.000");

      GetPlayerName(playerid,AdminName,sizeof(AdminName));
      GetPlayerName(giveplayerid,pName,sizeof(pName));

    new pScore = GetPlayerScore(giveplayerid);
    SetPlayerScore(giveplayerid,pScore+iScore);
    format(string,256,"O RCON ADMIN %s(id:%i) setou o score do jogador %s(id:%i) para %i TOTAL: %i",AdminName,playerid,pName,giveplayerid,iScore,pScore+iScore);
    SendClientMessageToAll(0xFFFFFFAA,string);
    return true;
}
Espero ter ajudado =)
Reply


Messages In This Thread
[AJUDA] Comando de admin - by mengueh - 15.06.2011, 23:18
Re: [AJUDA] Comando de admin - by Dark.Angel - 15.06.2011, 23:46
Re: [AJUDA] Comando de admin - by mengueh - 15.06.2011, 23:57
Re: [AJUDA] Comando de admin - by Ricop522 - 16.06.2011, 02:03

Forum Jump:


Users browsing this thread: 2 Guest(s)