HELP morepickups to 1 dialog - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: HELP morepickups to 1 dialog (
/showthread.php?tid=496681)
HELP morepickups to 1 dialog -
djfarmer - 23.02.2014
hello
im am pretty new in pawnocoding. and i am making my own server
now i am having a little problem.
i need to have 4 pickups doing the same thing.
but i can't get it to work
screen shot pickupcode
what i want to do is make Pickup_boatdelivery = to al 4 pickups at the same time
Код:
//change skin pickups
//boatdriver
Pickup_boatdriver = CreatePickup(1247, 2,-1697.5472,-1677.4404,5.2494, 0);
Pickup_boatdriver = CreatePickup(1247, 2,2288.8477,521.9287,1.9425, 0);
Pickup_boatdriver = CreatePickup(1247, 2,2359.6619,525.5380,1.7969, 0);
Pickup_boatdriver = CreatePickup(1247, 2,-3771.3081,648.2825,1.8708, 0);
Код:
// This callback gets called when a player picks up any pickup
public OnPlayerPickUpPickup(playerid, pickupid)
{
if( pickupid == Pickup_boatdriver)
{
ShowPlayerDialog(playerid, Dialogboatdelivery, DIALOG_STYLE_LIST, "select a skin:"," skin1\r\n skin2", "select", "cancel"); // Let the player pick a skin and relcass
}
// If the player picks up the Buy_License pickup at the driving school in Doherty
if (pickupid == Pickup_License)
// Ask the player which license he wants to buy
ShowPlayerDialog(playerid, DialogBuyLicenses, DIALOG_STYLE_LIST, TXT_DialogLicenseTitle, TXT_DialogLicenseList, TXT_DialogButtonBuy, TXT_DialogButtonCancel); // Let the player buy a license
return 1;
}
Код:
// pick skin dialogs
Dialog_boatdeliveryskint(playerid, response, listitem)
{
// Just close the dialog if the player clicked "Cancel"
if(!response) return 1;
switch ( listitem )
{
case 0:{
APlayerData[playerid][PlayerClass] = Classboatdelivery ; // zet de class van de speler gelijk aan boatdelivery
SetPlayerSkin(playerid, 19);
}
case 1: {
APlayerData[playerid][PlayerClass] = Classboatdelivery ; // zet de class van de speler gelijk aan boatdelivery
SetPlayerSkin(playerid, 18);
}
}
return 1;
}
Код:
case Dialogboatdelivery: Dialog_boatdeliveryskint(playerid, response, listitem);
Re: HELP morepickups to 1 dialog -
Necip - 23.02.2014
Did you even compile your code? I can see some mistakes there. Also, give us the code with [pawn] [/*pawn] tags(without the *).
Re: HELP morepickups to 1 dialog -
djfarmer - 23.02.2014
ow oke and yea i did compile the code it used to work when i only had 1 pickup but beceause there are 3 pickups more now only the last 1 works so i try'd with an array and then it gave some problems