[codigo][cmd]/info em dialog
#1

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","");
    }
    }
Reply
#2

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%
Reply
#3

Que isso?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)