05.02.2015, 09:14
Hello Guys , I Made A Weapon Spawner System , But When I Click On Dialog's Weapon And Nothing Happen , Dialog Just Disappear After I Click It , Does Anyone Know How To Fix This Bug? Or I Do Something Wrong? But I Compile It And No Error Pop Up ...
So Here Is My Weapons.pwn File.
So Here Is My Weapons.pwn File.
PHP код:
#include < a_samp >
#include < zcmd >
#define DIALOG_WEPS 2013
CMD:weaps(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_WEPS, DIALOG_STYLE_LIST, "{80FFFF}Weapon Spawner", "{80FFFF}Brassknuckle\nGoldclub\nNitestick\nKnife\nBat\nShovel\nPoolstick\nKatana\nChainsaw\n", "Select", "Close");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_WEPS)
{
if(response)
{
switch(listitem)
{
case 1: GivePlayerWeapon(playerid, 1, 1);
case 2: GivePlayerWeapon(playerid, 2, 1);
case 3: GivePlayerWeapon(playerid, 3, 1);
case 4: GivePlayerWeapon(playerid, 4, 1);
case 5: GivePlayerWeapon(playerid, 5, 1);
case 6: GivePlayerWeapon(playerid, 6, 1);
case 7: GivePlayerWeapon(playerid, 7, 1);
case 8: GivePlayerWeapon(playerid, 8, 1);
case 9: GivePlayerWeapon(playerid, 9, 1);
}
}
return 1;
}
return 0;
}