Jump to content

Karol

Members
  • Posts

    5
  • Joined

  • Last visited

Karol's Achievements

Vic

Vic (3/54)

0

Reputation

  1. am i wrong but this topic is dead ;D ?
  2. Karol

    help

    this is what i made and now it says that it is bad element pointer on line 17 and 18 ? function truckerJob ( theTruck ) theTruckVehicle = theTruck theTruckTrailer = source theTruckTrailerID = getElementModel (source) local theDriver = getVehicleOccupant ( theTruck, 0 ) if ( theDriver ) and ( theTruckTrailerID == 450 ) then outputChatBox ("Bring the trailer to the flag.", theDriver, 255, 0, 0, false) theFinishMarker = createMarker ( -771.58, -119.03, 63.34, "cylinder", 16, 0, 255, 0, 90, theDriver ) theFinishBlip = createBlip ( -771.58, -119.03, 63.34, 53, 2, 255, 0, 0, 255, 0, 99999.0, theDriver ) end addEventHandler ("onMarkerHit", theFinishMarker, truckerJobMarkerHit) end -- end the function her function truckerJobMarkerHit ( hitPlayer, matchingDimension ) givePlayerMoney ( hitPlayer, 150 ) destroyElement ( theFinishMarker ) destroyElement ( theFinishBlip ) respawnVehicle ( theTruckTrailer ) outputChatBox ( "Mission Passed, you earn $150", hitPlayer, 255, 0, 0, false ) end -- here is where you ended the first function, but that's probably not what you want addEventHandler("onTrailerAttach", getRootElement(), truckerJob) function truckerJobFailed ( theTruck ) removeEventHandler ("onMarkerHit", theFinishMarker, truckerJobMarkerHit) local theDriver = getVehicleOccupant ( theTruck, 0 ) respawnVehicle ( theTruckTrailer ) destroyElement ( theFinishMarker ) destroyElement ( theFinishBlip ) outputChatBox ( "Mission Failed!", theDriver, 255, 0, 0, false ) end addEventHandler("onTrailerDetach", getRootElement(), truckerJobFailed)
  3. Karol

    help

    thanks i did just
  4. Karol

    help

    and sory i dont know how to make it smaler )
  5. Karol

    help

    here is file ; and it got bugs like when 2 players got trailers in one time and one of them gets money when he reach final and another not ; but mostly it says in server panel bad element pointer at line 28 ; maybe someone knows how to fix it or set that element id ( circle ) ? u can see taht line 30 at the end of this function truckerJob ( theTruck ) theTruckVehicle = theTruck theTruckTrailer = source theTruckTrailerID = getElementModel (source) local theDriver = getVehicleOccupant ( theTruck, 0 ) if ( theDriver ) and ( theTruckTrailerID == 584 ) then outputChatBox ("Bring the trailer to the flag.", theDriver, 0, 255, 111, false) theFinishMarker = createMarker ( -1605.90, -2713.98, 46.53, "cylinder", 16, 0, 255, 0, 90, theDriver ) theFinishBlip = createBlip ( -1605.90, -2713.98, 46.53, 53, 2, 255, 0, 0, 255, 0, 99999.0, theDriver ) end if ( theDriver ) and ( theTruckTrailerID == 435 ) then outputChatBox ("Bring the trailer to the flag.", theDriver, 255, 0, 0, false) theFinishMarker = createMarker ( -480.59, -514.02, 23.51, "cylinder", 16, 0, 255, 0, 90, theDriver ) theFinishBlip = createBlip ( -480.59, -514.02, 23.51, 53, 2, 255, 0, 0, 255, 0, 99999.0, theDriver ) end if ( theDriver ) and ( theTruckTrailerID == 450 ) then outputChatBox ("Bring the trailer to the flag.", theDriver, 255, 0, 0, false) theFinishMarker = createMarker ( -771.58, -119.03, 63.34, "cylinder", 16, 0, 255, 0, 90, theDriver ) theFinishBlip = createBlip ( -771.58, -119.03, 63.34, 53, 2, 255, 0, 0, 255, 0, 99999.0, theDriver ) end if ( theDriver ) and ( theTruckTrailerID == 591 ) then outputChatBox ("Bring the trailer to the flag.", theDriver, 255, 0, 0, false) theFinishMarker = createMarker ( 344.08, 873.30, 18.40, "cylinder", 16, 0, 255, 0, 90, theDriver ) theFinishBlip = createBlip ( 344.08, 873.30, 18.40, 53, 2, 255, 0, 0, 255, 0, 99999.0, theDriver ) end function truckerJobMarkerHit ( hitPlayer, matchingDimension ) [b]theMarkerID = getElementID (theFinishMarker)[/b] if (source == theFinishMarker) then givePlayerMoney ( hitPlayer, 150 ) destroyElement ( theFinishMarker ) destroyElement ( theFinishBlip ) respawnVehicle ( theTruckTrailer ) outputChatBox ( "Mission Passed, you earn $150", hitPlayer, 255, 0, 0, false ) end end addEventHandler ("onMarkerHit", getRootElement(), truckerJobMarkerHit) end addEventHandler("onTrailerAttach", getRootElement(), truckerJob) function truckerJobFailed ( theTruck ) removeEventHandler ("onMarkerHit", getRootElement(), truckerJobMarkerHit) local theDriver = getVehicleOccupant ( theTruck, 0 ) respawnVehicle ( theTruckTrailer ) destroyElement ( theFinishMarker ) destroyElement ( theFinishBlip ) outputChatBox ( "Mission Failed!", theDriver, 255, 0, 0, false ) end addEventHandler("onTrailerDetach", getRootElement(), truckerJobFailed)
×
×
  • Create New...