[Pedido]/setscore para serv mata mata pelo rcon
#2

pawn Код:
if(strcmp(cmd,"/setscore", true)==0 && IsPlayerAdmin(playerid))
    {
    new string [256];
    new tmp[256];
    new plid, score;
    new nomeentregador[MAX_PLAYER_NAME];
    new nomerecebedor[MAX_PLAYER_NAME];
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)){
    SendClientMessage(playerid, COLOR_BLACK_GRAY, "[ERRO DE SINTAXE] /setscore [id] [score]");
    return 1;
    }
    plid = strval(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) {
    SendClientMessage(playerid, COLOR_BLACK_GRAY, "[ERRO DE SINTAXE] /setscore [id] [score]");
    return 1;
    }
    score = strval(tmp);
    if(IsPlayerConnected(plid)){
    GetPlayerName(plid, nomerecebedor, sizeof(nomerecebedor));
    GetPlayerName(playerid, nomeentregador, sizeof(nomeentregador));
    format(string, sizeof(string), "O Admnistrador %s setou o score de %s para %d.", nomeentregador,nomerecebedor,score);
    SendClientMessageToAll(COLOR_WHITE, string);
    SetPlayerScore(plid,score);
    return 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_BLACK_GRAY, "Jogador nгo conectado.");
    return 1;
    }
    }
Estб ai, testado e aprovado!

Vale reputaзгo?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)