Jump to content

[HELP] Need help


mint3d

Recommended Posts

Example:

function onPickupHitFunction ( thePlayer ) 
    if getPickupType ( source ) ~= 2 then return end   -- if the pickup is no weapon, stop 
    local ammo = getPickupAmmo ( source )              -- get the amount of ammo 
    local weapon = getPickupWeapon ( source )          -- get the weapon of the pickup 
    outputChatBox ( "You just picked up a " .. getWeaponNameFromID(weapon) .. " with " .. ammo .. " ammo", thePlayer ) -- output a message to the player 
end 
addEventHandler ( "onPickupHit", getRootElement(), onPickupHitFunction ) -- add an event handler for onPickupHit 

Link to comment

I'm still new so I don't know if i'm doing right but i try to help;

function pickupUse (source) 
    local pickup = createPickup(x, y, z, 3, 1239) -- Create a pickup  
    usePickup(pickup,getRandomPlayer()) -- Make a random player use the pickup 
    outputChatBox ( "INFO: This is a building from 1982", thePlayer ) -- output a message to the player 
end 
  
addEventHandler("onResourceStart", getRootElement(), pickupUse) 

I hope it works

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...