17.09.2012, 23:16
When I am placing this codes:
My PAWNO is crashing.
Quote:
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext,"/buygun",true) == 0) { if(!IsPlayerInRangeOfPoint(playerid, 7, 123.0, 123.0, 123.0)) return SendClientMessage(playerid, 0xFFFFFFAA, "You need to be at X."); ShowPlayerDialog(playerid, 1000, DIALOG_STYLE_LIST, "Weapons", "1. Weapon\n2. Weapon\n3. Weapon\n4. Weapon", "This one.", "Cancel."); return 1; } return 0; } |
Quote:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 1000) { if(response) { switch(listitem) { case 0: { GivePlayerWeapon(playerid, 0, 0); } case 1: { GivePlayerWeapon(playerid, 0, 0); } default: { GivePlayerWeapon(playerid, 0, 0); } } } } return 1; } |