Jaysds1 Posted February 25, 2013 Posted February 25, 2013 Ya, you could set the pickup respawn to 0 to make it respawn right after. Using: setPickupRespawnInterval
Cassandra Posted February 25, 2013 Author Posted February 25, 2013 Ya, you could set the pickup respawn to 0 to make it respawn right after.Using: setPickupRespawnInterval Aren't there are any alternatives for that? To make a pickup not pickable.
Jaysds1 Posted February 25, 2013 Posted February 25, 2013 you could cancel one of the pickup's events: https://wiki.multitheftauto.com/wiki/Ser ... kup_events Example: addEventHandler("onPickupHit",root,function() cancelEvent() end)
Cassandra Posted February 25, 2013 Author Posted February 25, 2013 you could cancel one of the pickup's events: https://wiki.multitheftauto.com/wiki/Ser ... kup_eventsExample: addEventHandler("onPickupHit",root,function() cancelEvent() end) Thanks. It works fine now.
Anderl Posted February 26, 2013 Posted February 26, 2013 Not a good idea, that will cancel the event from being called thus stopping any event triggered when an element hits a pickup.
Moderators IIYAMA Posted February 26, 2013 Moderators Posted February 26, 2013 I reply this because of andrel his reply. Maybe you want this. addEventHandler("onPickupHit",root,function(player) local theType = getPickupType ( source ) if theType == 2 then giveWeapon ( player, getPickupWeapon ( source ), getPickupAmmo ( source ), false ) elseif theType == 1 then setPedArmor ( player, getPedArmor ( player ) + getPickupAmount ( source )) elseif theType == 0 then setElementHealth ( player,getElementHealth ( player) + getPickupAmount ( source )) end cancelEvent() end) -- the maximum health is 200 and only able to reach that with full skill level. It will probably set to the highest possible health(depends on the skill level). (armor is 100)
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