So es werden ja jobs gesucht also möchte ma was beitragen zum server also es ist ein bus job script(koordinaten nur beistpiele!)
- Code:
Buscolsphere = createColSphere ( -2281.7919921875, 62.826171875, 35.1640625, 5 )
function Busfahrerjob(player,command)if getElementData ( player, "Job" ) ~= 0 then
outputChatBox("Du hast bereits einen Job!", player, 255,0,0)else if ( isElementWithinColShape ( player, Buscolsphere ) ) then
if ( getElementData ( player, "LicA" ) == 1 ) then
setElementData(player, "Job", 12)outputChatBox("Du bist nun Busfahrer!", player,0,255,0)else
outputChatBox("Du braucht Lizens Klasse A", player, 255, 0, 0 )end
end
end
end
addCommandHandler("job", Busfahrerjob)
function Busfahrerjobhelp ( hitPlayer, matchingDimension )local playerjob = getElementData ( hitPlayer, "Job" )if ( playerjob == 12 ) then
outputChatBox ( "Tippe /bus um eine Linie zu bekommen!", hitPlayer )elseif ( playerjob == 0 ) then
outputChatBox ( "Tippe /job um als Busfahrer zu arbeiten!", hitPlayer )else
outputChatBox ( "Du hast bereits einen anderen Job!", hitPlayer )
end
end
addEventHandler ( "onColShapeHit", Buscolsphere, Busfahrerjobhelp )
function Busfahrerstart (thePlayer)Bus = createVehicle ( 431, -2273.6123046875, 74.494140625, 35.262962341309, "Bus" )
warpPedIntoVehicle ( thePlayer, Bus, 0 )BusMarker1 = createMarker ( -2381.3271484375, 789.330078125, 35.117702484131, "checkpoint", 2, 0, 0, 255,thePlayer )
addEventHandler ( "onMarkerHit", BusMarker1, hitMarker1 )givePlayerMoney ( thePlayer, 150 )
setElementData(thePlayer,"marker",BusMarker1,false)
end
addCommandHandler("bus", Busfahrerstart)
function hitMarker1 (hitPlayer)if
getElementType(hitPlayer)=="player" and getElementData(hitPlayer,"marker")==source thendestroyElement ( BusMarker1 )givePlayerMoney ( hitPlayer, 150 )
BusMarker2 = createMarker ( -2752.8740234375, 374.02734375, 4.2541675567627, "checkpoint", 2, 0, 0, 255, hitPlayer )
setElementData(thePlayer,"marker",BusMarker2,false)
addEventHandler ( "onMarkerHit", BusMarker2, hitMarker2 )
end
end
function hitMarker2 (hitPlayer)destroyElement ( BusMarker2 )givePlayerMoney ( hitPlayer, 150 )
BusMarker3 = createMarker ( -2646.8701171875, 215.1240234375, 4.2682104110718, "checkpoint", 2, 0, 0, 255, hitPlayer )
addEventHandler ( "onMarkerHit", BusMarker3, hitMarker3 )
end
function hitMarker3 (hitPlayer)destroyElement ( BusMarker3 )givePlayerMoney ( hitPlayer, 150 )
BusMarker4 = createMarker ( -2009.6533203125, 282.9990234375, 33.683925628662, "checkpoint", 4, 0, 0, 255, hitPlayer )
end
end
end