geovanni_
16/10/2011, 03:16 AM
no inicio do seu gm
#define info 123
new Kills[MAX_PLAYERS];
new Deaths[MAX_PLAYERS];
no OnPlayerCommandText
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
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),vida v);
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_MSGB OX,"meu-info 2/2",string1,"sair","");
}
}
#define info 123
new Kills[MAX_PLAYERS];
new Deaths[MAX_PLAYERS];
no OnPlayerCommandText
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
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),vida v);
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_MSGB OX,"meu-info 2/2",string1,"sair","");
}
}