Vehicle Pickup?
#1

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");
Reply
#2

https://sampwiki.blast.hk/wiki/IsPlayerInAnyVehicle
Reply
#3

Cheers i'll try that
Reply
#4

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

did u define the pickup?
Reply
#6

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;
}
Reply
#7

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

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

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;
}
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)