SA-MP Forums Archive
Vehicle Pickup? - 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: Vehicle Pickup? (/showthread.php?tid=390205)



Vehicle Pickup? - guitarmandanny - 05.11.2012

Hey guys im trying to do a pick-up which brings up a dialogue box whilst in a vehicle, Ive done everything but the Pickup does not recognise there is the vehicle there.

any help would be grateful

Here is my code:
Код:
if(pickupid == Service1) IsPlayerInRangeOfPoint(playerid, 3.0, 1611.0157, 2236.7346, 10.3934), ShowPlayerDialog(playerid, DIALOG_SERVICE, DIALOG_STYLE_LIST, "Service Station.", "Add Nos: Price 500$\nAdd Hydraulics: Price 500$\nChange Vehicle Colour\nRepair Vehicle: Price 750$", "Select", "Close");



Re: Vehicle Pickup? - Glad2BeHere - 05.11.2012

https://sampwiki.blast.hk/wiki/IsPlayerInAnyVehicle


Re: Vehicle Pickup? - guitarmandanny - 05.11.2012

Cheers i'll try that


Re: Vehicle Pickup? - guitarmandanny - 05.11.2012

Quote:
Originally Posted by Glad2BeHere
Посмотреть сообщение
That didn't work unfortunately.


Re: Vehicle Pickup? - Glad2BeHere - 05.11.2012

did u define the pickup?


Re: Vehicle Pickup? - Glad2BeHere - 05.11.2012

pawn Код:
new service[1];
//under gminit
server[0] = CreatePickup(1274, 1, x, y, z);

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == service[0]) ShowPlayerDialog(playerid, DIALOG_SERVICE, DIALOG_STYLE_LIST, "Service Station.", "Add Nos: Price 500$\nAdd Hydraulics: Price 500$\nChange Vehicle Colour\nRepair Vehicle: Price 750$", "Select", "Close");
    return 1;
}



Re: Vehicle Pickup? - guitarmandanny - 05.11.2012

yeah everything is defined, I can pick it up on foot, but not driving.


Re: Vehicle Pickup? - Glad2BeHere - 05.11.2012

ummmmmm hmhmhmhmhmhm what 2 do......ummmmm create a cmd isnt like if playerinrange ofpoint and they do the cmd it showsszzzzzz


Re: Vehicle Pickup? - Ballu Miaa - 05.11.2012

Quote:
Originally Posted by Glad2BeHere
Посмотреть сообщение
pawn Код:
new service[1];
//under gminit
server[0] = CreatePickup(1274, 1, x, y, z);

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == cash) ShowPlayerDialog(playerid, DIALOG_SERVICE, DIALOG_STYLE_LIST, "Service Station.", "Add Nos: Price 500$\nAdd Hydraulics: Price 500$\nChange Vehicle Colour\nRepair Vehicle: Price 750$", "Select", "Close");
    return 1;
}
if(pickupid == cash) and service and server?
Really?

In case your using above example then it should be.
pawn Код:
//Anywhere in the game mode but not in any callback or function
new servercp[1];
//Under OnGameModeInIt()
servercp[0] = CreatePickup(1274, 1, x, y, z);
//Under OnPlayerPickupPickup
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == servercp[0]) ShowPlayerDialog(playerid, DIALOG_SERVICE, DIALOG_STYLE_LIST, "Service Station.", "Add Nos: Price 500$\nAdd Hydraulics: Price 500$\nChange Vehicle Colour\nRepair Vehicle: Price 750$", "Select", "Close");
    return 1;
}



Re: Vehicle Pickup? - CmZxC - 05.11.2012

people learn to read his problem, not just jump into it god damnit.

Quote:
Originally Posted by guitarmandanny
Посмотреть сообщение
yeah everything is defined, I can pick it up on foot, but not driving.
Pickup type 14 is pickupable from vehicle.

with 14 you dont need IsPlayerInAnyVehicle check, cause it will be ONLY in vehicle, not on foot.