29.01.2012, 18:23
I have a problem with Dialogs on pickups!
If I Stay in a pickup the dialog will pop up and i get it, but when i click to cancel on the dialog, i'll get the message again and again, and i can't step out of it! How can i do when i go into a pickup i get the message and when i click on the cancel and while I am standing on the pickup i won't get the dialog again and again?
Anyone Can help me?
I have got this:
If I Stay in a pickup the dialog will pop up and i get it, but when i click to cancel on the dialog, i'll get the message again and again, and i can't step out of it! How can i do when i go into a pickup i get the message and when i click on the cancel and while I am standing on the pickup i won't get the dialog again and again?
Anyone Can help me?
I have got this:
PHP код:
new pickup1;
Quote:
public OnFilterScriptInit() { pickupd = CreatePickup(1274, 23, 1310.1128,-1367.7317,13.5398, -1); return 1; } |
Quote:
public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == pickupd) { ShowPlayerDialog(playerid, pickup1, DIALOG_STYLE_LIST, "Car Dealer", "Elegy $800.000\nInfernus", "Buy", "Cancel"); } return 1; } |
Quote:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == pickup1) { if(response) { if(listitem == 0) { if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough money"); GivePlayerMoney(playerid, -500); SetVehicleNumberPlate(CreateVehicle(400,1316.2551,-1378.5920,13.8248,178.5096,113,1, 100), inputtext); } } return 1; } return 1; } |