Search the Community
Showing results for tags 'triggers'.
-
Hi, I will doing job, but I always have got problem with arguments in trigger I read Elements Tree on wiki, but I still do not know what this is about When player hit marker then s-side must create vehicle. C-side StartJobM = createMarker (-165.35049, 1059.69141, 18.74219, 'cylinder', 1.0, 22, 38, 199, 255) function StartJob (hitPlayer, matchingDimension) if isPedInVehicle (hitPlayer) then outputChatBox ("You can't hit marker when u are in vehicle!") cancelEvent () if getElementType(hitPlayer) == getlocalPlayer then triggerServerEvent ("poj", localPlayer ) outputChatBox ("Created vehicle!") end end end addEventHandler ("onClientMarkerHit", StartJobM, StartJob) StartJobM = createMarker (-165.35049, 1059.69141, 18.74219, 'cylinder', 1.0, 22, 38, 199, 255) function StartJob (hitPlayer, matchingDimension) if isPedInVehicle (hitPlayer) then outputChatBox ("You can't hit marker when u are in vehicle!") cancelEvent () if getElementType(hitPlayer) == getlocalPlayer then triggerServerEvent ("poj", localPlayer ) outputChatBox ("Created vehicle!") end end end addEventHandler ("onClientMarkerHit", StartJobM, StartJob) S-side: function VehicleC() lcvehi = createVehicle (422, -158.49141, 1051.20691, 19.75892) end addEvent("poj") addEventHandler("poj", getRootElement(), VehicleC) Please, explain me how i Can triggering
- 3 replies
-
- how trigger
- trigger veh
- (and 5 more)