Dialog on Pickup
#1

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:
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;
}

Reply
#2

pawn Код:
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;
}
Reply
#3

With this edited code, SAME PROBLEM :S
Reply
#4

https://sampwiki.blast.hk/wiki/PickupTypes
Type 2 might fit to you.
Reply
#5

Yeah it fix it, But the pickup disappear, and i can't go again there, i have to wait (i don't know while) and the pickup will appear again! So i don't want to Disappear the Pickup! :S

What i want is: I want while I'm standing in the pickup don't pop up the dialog again and again when i bought something, or click on "cancel" and when I want to walk away from the Pickup.
Reply
#6

pawn Код:
new pickup1;
public OnFilterScriptInit()
{
pickupd1 = CreatePickup(1274, 23, 1310.1128,-1367.7317,13.5398, 1);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{

if(pickupid == pickupd1)
{
ShowPlayerDialog(playerid, pickup1, DIALOG_STYLE_LIST, "Car Dealer", "Elegy $800.000\nInfernus", "Buy", "Cancel");
}
return 1;
}
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);
}
Test This One :\
Reply
#7

The same happening:S
Reply
#8

Just set the player position out of the pickup afther they pick the pickup.
Reply
#9

Oh man this is a good idea! thanks! I'll try it!!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)