if (strcmp("/comandos", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "~b~Comandos", "Nenhum no momento", "Fechar", "");
return 1;
if (strcmp("/armas", cmdtext, true, 10) == 0)
ShowPlayerDialog(playerid, Armas, DIALOG_STYLE_LIST, "Lista de Armas", "Eagle\nMP5\nM4\nKnife\nShotgun\n", "Selecionar", "Sair");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == Armas)
{
if(response)
{
if(listitem == 0)
{
GetPlayerMoney(playerid >= 250);
GivePlayerWeapon(playerid, 24, 50);
SendClientMessage(playerid, COR_VERDE, "[Info]Vocк adquiriu uma Eagle por 250 pratas.");
ApplyAnimation(playerid, "DEALER", "shop_pay", 4.0, 0, 0, 0, 0, 0);
}
else if(listitem == 1)
{
GetPlayerMoney(playerid >= 600);
GivePlayerWeapon(playerid, 29, 120);
GivePlayerMoney(playerid, -400);
SendClientMessage(playerid, COR_VERDE, "[Info]Vocк adquiriu uma MP5 por 600 pratas.");
ApplyAnimation(playerid, "DEALER", "shop_pay", 4.0, 0, 0, 0, 0, 0);
}
else if(listitem == 2)
{
GetPlayerMoney(playerid >= 1100);
GivePlayerWeapon(playerid, 31, 170);
SendClientMessage(playerid, COR_VERDE, "[INFO]Vocк adquiriu uma M4 por 1.100 pratas.");
ApplyAnimation(playerid, "DEALER", "shop_pay", 4.0, 0, 0, 0, 0, 0);
}
else if(listitem == 3)
{
GetPlayerMoney(playerid >= 50);
GivePlayerWeapon(playerid, 4, 1);
SendClientMessage(playerid, COR_VERDE, "[INFO]Vocк adquiriu uma Knife por 50 pratas.");
ApplyAnimation(playerid, "DEALER", "shop_pay", 4.0, 0, 0, 0, 0, 0);
}
else if(listitem == 4)
{
GetPlayerMoney(playerid >= 550);
GivePlayerWeapon(playerid, 25, 35);
SendClientMessage(playerid, COR_VERDE, "[INFO]Vocк adquiriu uma Shotgun por 550 pratas.");
ApplyAnimation(playerid, "DEALER", "shop_pay", 4.0, 0, 0, 0, 0, 0);
}
}
}
return 1;
}
|
Ta mal identado , creio que nгo seja isso , mais oque eu fiz vai melhorar , PS: Adicionar #include zcmd
Code: http://pastebin.com/yTLc8x1J O problema esta na public OnPlayerCommandText poste ela ai ... |
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/comandos", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "~b~Comandos", "Nenhum no momento", "Fechar", "");
return 1;
}
CMD:armas(playerid, params[]) {
ShowPlayerDialog(playerid, Armas, DIALOG_STYLE_LIST, "Lista de Armas", "Eagle\nMP5\nM4\nKnife\nShotgun\n", "Selecionar", "Sair");
return 1;
}
|
Bom, aqui esta a a minha OnPlayerCommandText:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/comandos", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "~b~Comandos", "Nenhum no momento", "Fechar", "");
return 1;
}
CMD:armas(playerid, params[]) {
ShowPlayerDialog(playerid, Armas, DIALOG_STYLE_LIST, "Lista de Armas", "Eagle\nMP5\nM4\nKnife\nShotgun\n", "Selecionar", "Sair");
return 1;
}
|
#include zcmd
#include <a_samp>