SA-MP Forums Archive
[codigo][cmd]/info em dialog - 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: [codigo][cmd]/info em dialog (/showthread.php?tid=290521)



[codigo][cmd]/info em dialog - geovanni_ - 16.10.2011

no inicio do seu gm
Quote:
pawn Код:
#define info 123

new Kills[MAX_PLAYERS];
new Deaths[MAX_PLAYERS];
no OnPlayerCommandText
Quote:
pawn Код:
if(strcmp(cmdtext, "/info", true) == 0)
{
    new string[256];
    new grana = GetPlayerMoney(playerid);

    format(string,sizeof(string),"Assassinatos (%d) - Mortes (%d) - Ratio (%00.1f) - Dinheiro (%d)",
    Kills[playerid],Deaths[playerid],Float:Kills[playerid]/Float:Deaths[playerid],grana);
    ShowPlayerDialog(playerid,info,DIALOG_STYLE_MSGBOX,"meu-info 1/2",string,"Proximo","sair");

    return 1;
}
em OnDialogResponse
Quote:
pawn Код:
if(dialogid == info)
    {
    if(response == 0)
    {
    SendClientMessage(playerid, 0xF68E00F6, " Vocк Saiu :C");
    }
    if(response == 1)
    {

    new string1[256];
    new ping = GetPlayerPing(playerid);

    new Float:vida;
    GetPlayerHealth(playerid,vida);

    new Float:colete;
    GetPlayerArmour(playerid,colete);

    new Float:vidav;
    GetVehicleHealth(GetPlayerVehicleID(playerid),vidav);

    format(string1,sizeof(string1),"\nVida (%0.1f) - Colete (%0.1f) - Vida Veнculo (%0.1f) - Ping (%d)",
    vida,colete,vidav,ping);
    ShowPlayerDialog(playerid,info+1,DIALOG_STYLE_MSGBOX,"meu-info 2/2",string1,"sair","");
    }
    }



Re: [codigo][cmd]/info em dialog - geovanni_ - 16.10.2011

Assassinatos Mortes Ratio Dinheiro
Vida Colete Vida Veнculo Ping

[ratio]tipo asim se vc morrer 50x e matar 50x vc vai ta com ration 50.0%
se vc morrer 50 e matar 0 vc vai tar com ratio 0.0%
se vc matar 100 ou 50 sei la e morrer 0 vai ficar ration 100.0%


Re: [codigo][cmd]/info em dialog - ViniBorn - 16.10.2011

Que isso?