22.02.2017, 10:44
Quote:
Have you tried to add a debug message like this:
PHP код:
|
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_WEAPONS) { if(response) // If they clicked 'Select' or double-clicked a weapon { // Give them the weapon switch(listitem) { case 0: GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14); // Give them a desert eagle case 1: GivePlayerWeapon(playerid, WEAPON_AK47, 120); // Give them an AK-47 case 2: GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 28); // Give them a Combat Shotgun } } printf("OnPlayerDialog: %i %i %i %i %s", playerid, dialogid, response, listitem, inputtext); return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText. } return 0; // You MUST return 0 here! Just like OnPlayerCommandText. }