SA-MP Forums Archive
[Ajuda] Remover Deaths - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Remover Deaths (/showthread.php?tid=576495)



Remover Deaths - ModaLOKO - 04.06.2015

Existe uma forma de Remover deaths e nгo seta-las ?

Tipo:

pawn Код:
CMD:removerdeaths(playerid,params[])
{
    new
        playerID,
        Deathz,
        acstr[200]
    ;
    new
    Arquivo[32]
    ;

    format(Arquivo,sizeof(Arquivo),"Logs/Deaths.ini");

    if(PlayerInfo[playerid][Admin] >= 5)
    {
    if(sscanf(params,"dd",playerID,Deathz)) return SendClientMessage(playerid,cor_vermelho,"Use: /removerdeaths [playerid] [deaths]");
    if(!IsPlayerConnected(playerID)) return SendClientMessage(playerid,cor_vermelho,"Erro: PlayerID desconectado!");
    if(Deathz == PlayerInfo[playerID][Deaths]) return SendClientMessage(playerid,cor_vermelho,"Erro: Jogador jб possui essa quantidade de deaths.");

    format(acstr,sizeof(acstr),"Deaths Removidas! %d.",Deathz);
    PlayerPlaySound(playerid, 1057, 0,0,0);
    SendClientMessage(playerID,cor_verde,acstr);

    format(acstr,sizeof(acstr),"Player Nick: %s(%d) || Deaths: %d || Admin: %s",nome(playerID),playerID,Deathz,nome(playerid));
    SendClientMessage(playerid,cor_verde,acstr);

    PlayerInfo[playerID][Deaths] = -Deathz;
    writeLog(Arquivo,acstr);
    }
    return 1;
}
nesse meu comando as Deaths sгo setadas e nгo removidas de acordo com a quantidade digitada :/


Re: Remover Deaths - ipsLuan - 04.06.2015

PHP код:
PlayerInfo[playerID][Deaths] = PlayerInfo[playerID][Deaths] - quantidade



Re: Remover Deaths - n0minal - 04.06.2015

Quote:
Originally Posted by ipsLuan
Посмотреть сообщение
PHP код:
PlayerInfo[playerID][Deaths] = PlayerInfo[playerID][Deaths] - quantidade
Код:
PlayerInfo[playerID][Deaths] -= quantidade;



Re: Remover Deaths - ModaLOKO - 04.06.2015

Nossa Luan vocк й O Cara , coisa tгo simples '--'

Vlw +rep for all <3

@ й a mesma coisa