Código:
#include <a_samp>
stock NomeDoJogador(playerid)
{
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
return Nome;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/info", true) == 0)
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "{391BE0}Info Player", "1 {1BE02B}Recuperar\n2 {1BE02B}Reparar\n3 {1BE02B}Creditos", "Ok", "");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[128], vehicleid = GetPlayerVehicleID(playerid);
if(dialogid == 2) { if(response) {
if(listitem == 0)
{
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
format(string, sizeof(string), "{33CCFF}[INFO]{D2D2FF}: %s se recuperou.", NomeDoJogador(playerid));
SendClientMessageToAll(0x20B2AAAA, string);
return 1;
}
if(listitem == 1)
{
SetVehicleHealth(vehicleid, 1000.0);
SendClientMessage(playerid, 0x20B2AAAA, "{33CCFF}[INFO]{D2D2FF}: seu veiculo foi reparado.");
return 1;
}
if(listitem == 2)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"{1BE028}Creditos","\n\n\n{CC1BE0} •By KeneD_FusioN•\n{CC1BE0} •FusioN Games•\n\n","FusioN","");
return 1;
}
}
}
return 1;
}