Best-Killer1 Posted October 4, 2015 Posted October 4, 2015 i can't make armour/weapon ammo / helth/ ........... ect what is problem here ??? this code : function createJobPickup ( x, y, z, id, jobs ) local e = createPickup ( x, y, z, 2, id, 50, 1 ) setElementData ( e, "SAEGJobs:pickup.jobLock", jobs ) addEventHandler ( "onPickupHit", e, function ( p ) if ( getElementType ( p ) ~= "player" or isPedInVehicle ( p ) ) then return end local jobs = getElementData ( source, "SAEGJobs:pickup.jobLock" ) local job = getElementData ( p, "Job" ) or "" local done = false for i, v in ipairs ( jobs ) do if ( v == job ) then done = true break end end if ( not done or isPedInVehicle ( p ) ) then if ( not isPedInVehicle ( p ) ) then exports['SAEGMessages']:sendClientMessage ( "You don't have access to this pickup.", p, 255, 255, 0 ) end cancelEvent ( ) end end ) end createJobPickup ( 1576.18, -1620.43, 13.55, 3, { "Police Officer", "Detective", "Military" , "SWAT" } ) createJobPickup ( 1177.97, -1319.01, 14.1, 14, { "Medic" } )
Noki Posted October 5, 2015 Posted October 5, 2015 What errors does debug throw, if any? If you want to make it give armor or health, you will need to use setPedArmor and setElementHealth.
Best-Killer1 Posted October 5, 2015 Author Posted October 5, 2015 What errors does debug throw, if any?If you want to make it give armor or health, you will need to use setPedArmor and setElementHealth. no no thank you bro for trying to help me already it's fixed
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now