Here is the script:
function startJob ( playerSource )
local x, y, z = getElementPosition ( playerSource )
if ( chauffeurSkins[getElementModel ( playerSource )] ) then
if not playerClients[ playerSource ] then
local numLocations = #taxiLocations
if ( numLocations > 0 ) then
repeatCount = 0;
repeat
local pickupPoint = math.random(numLocations)
pickupx = taxiLocations[pickupPoint]["x"]
pickupy = taxiLocations[pickupPoint]["y"]
pickupz = taxiLocations[pickupPoint]["z"]
pickupr = taxiLocations[pickupPoint]["r"]
local jobDistance = getDistanceBetweenPoints3D ( x, y, z, pickupx, pickupy, pickupz );
repeatCount = repeatCount+1
until jobDistance > 100 and jobDistance < 800 + repeatCount*100
repeat
local id = math.random( 10, 270 )
ped = createPed( tonumber( id ), pickupx, pickupy, pickupz )
setPedRotation ( ped, pickupr )
until ped
playerClients[ playerSource ] = { };
table.insert( playerClients[ playerSource ], ped );
table.insert( jobClients, ped );
local pedBlip = createBlipAttachedTo ( ped, 41, 2, 255, 0, 0, 255, 1, 99999.0, playerSource)
playerBlips[ playerSource ] = { };
table.insert( playerBlips[ playerSource ], pedBlip );
pedMarker = createMarker ( pickupx, pickupy, 0, cylinder, 6.5, 255, 255, 0, 150, playerSource)
playerCols[ playerSource ] = { };
table.insert( playerCols[ playerSource ], pedMarker );
addEventHandler( "onMarkerHit", pedMarker, arrivePickup )
outputChatBox ( "Pickup the passenger located at the marker.", playerSource );
else
outputChatBox ( "No passenger pickup points specified, contact an admin!", playerSource );
end
else
outputChatBox ( "You allready have an assignment!", source );
end
else
outputChatBox ( "You don't have a job!", source );
end
end
addCommandHandler ("startjob", startJob);
how to make binding if i plress f1 to startJob
PS. I tried bindKey ("down","f1",startJob) and it is not working for me