new string[1024];
format(string, sizeof string, "{FFFF00} | Seus Coins: %d |\n\
{00FFFF} Comprar VIP\n\
{FF80FF} Comprar S-VIP\n\
{33FF00} Comprar Socio\n\
{2641FE} Ativar Org-VIP\n\
{FFFFFF} Dar Coins\n\
{FFFF00} Shop Coin\n", PlayerInfo[playerid][pCasher]);
ShowPlayerDialog(playerid, menuvip, DIALOG_STYLE_LIST, "Menu - VIP",string,"Selecionar", "Sair");
return 1;
}
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) // Macro pra simplificar
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_SECONDARY_ATTACK)) // Checa se apertou o F ou Enter (key_secondary_attack)
{
if(IsPlayerInRangeOfPoint(playerid, range, x, y, z)) // Alcance e a coordenada
{
ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]); // Mostra o dialog
}
}
return 1;
}
pickuplegal = CreatePickup(1274, 2, 0.0, 0.0, 9.0);
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickuplegal)
{
new string[1024];
format(string, sizeof string, "{FFFF00} | Seus Coins: %d |\n\
{00FFFF} Comprar VIP\n\
{FF80FF} Comprar S-VIP\n\
{33FF00} Comprar Socio\n\
{2641FE} Ativar Org-VIP\n\
{FFFFFF} Dar Coins\n\
{FFFF00} Shop Coin\n", PlayerInfo[playerid][pCasher]);
ShowPlayerDialog(playerid, menuvip, DIALOG_STYLE_LIST, "Menu - VIP",string,"Selecionar", "Sair");
}
return 1;
}
PHP код:
|
Sу checar se o jogador estб no local apуs apertar a tecla
Faz essa checagem https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint dentro dessa callback https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange PHP код:
|
C:\Users\pcpc\Desktop\GM By Eiffel - USANDO\gamemodes\BPS.pwn(30783) : error 017: undefined symbol "dialogid"
C:\Users\pcpc\Desktop\GM By Eiffel - USANDO\gamemodes\BPS.pwn(84546) : error 021: symbol already defined: "abb_OnPlayerKeyStateChange"
PHP код:
esse dialogid й o dessa linha que vocк colocou: ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]); // Mostra o dialog |