Jump to content

Anybody can help me?


3HAXAPb94

Recommended Posts

Posted

This function not work I dont know how to fix it...

function pic() 
for i,pickup in pairs(getElementsByType("pickup")) do 
local elementID = getElementModel(pickup) 
if elementID == 1242 then 
    destroyElement (pickup) 
end 
end 
end 
addEventHandler("onClientResourceStart",resourceRoot,pic) 

Posted
function pic ( ) 
    for i, pickup in ipairs ( getElementsByType ( "pickup" ) ) do 
        if ( getPickupType ( pickup ) == 1 ) then 
            destroyElement ( pickup ) 
        end 
    end 
end 
addEventHandler( "onClientResourceStart", resourceRoot, pic ) 

Use this if you want to destroy all armour pickups..

F4MZM4.gif

Posted
function pic ( ) 
    for i, pickup in ipairs ( getElementsByType ( "pickup" ) ) do 
        if ( getPickupType ( pickup ) == 3 ) and ( getElementModel ( pickup ) == 1242 ) then 
            destroyElement ( pickup ) 
        end 
    end 
end 
addEventHandler ( "onClientResourceStart", resourceRoot, pic ) 

This should work i guess

(P.S. Make sure you pasted it on clientside)

F4MZM4.gif

Posted

If you're using race maps, then you cannot get race pickups this way, because race pickups are not mta built-in elements, there must be a certain way to get them, you can find this out by reading race lua files.

F4MZM4.gif

Posted

Try to use a command handler, and check after the map is loaded if it will destroy, because the map might not be loaded yet on the client's pc.

Sometimes I dream about cheese

Posted

Thanks. But I now know how I need make. It was be wrong with make createPickup. Now I need make looks like racepickup...

Now looking code in race how to make racepickup :D

Posted

See how the current ones are made, and then do the same.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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...