[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


Messages In This Thread
[codigo][cmd]/info em dialog - by geovanni_ - 16.10.2011, 03:16
Re: [codigo][cmd]/info em dialog - by geovanni_ - 16.10.2011, 03:21
Re: [codigo][cmd]/info em dialog - by ViniBorn - 16.10.2011, 16:33

Forum Jump:


Users browsing this thread: 2 Guest(s)