Jump to content

Scripting help needed!


adamb

Recommended Posts

Posted

Hey, i just got a problem while scripting this, and i would need help with it.

It gives me this error: Bad arguement @ 'setElementParent' [Expected element at arguement 1, got nil]

setTimer(  
            function() 
            victimblip = createBlip(Mx, My, Mz, 0, 0, 0, 0, 1) 
            end, 1000, 0) 
            setElementParent(victimblip, theMugPlace) 
             

Posted

and more easy to no use timer to create blip attacked to theMugPlace

createBlipAttachedTo( theMugPlace, 0, 2, 0, 0, 0 ) 

Giving a Fuck? Nope, That isn't in My Skill Set

castie11.png

Posted

Thanks for the quick reply,

Tho, i need to delay SetElementParent with a timer? Can you show me how?

And i do need time to create the blip.

Posted
setTimer( 
    function ( ) 
        if isElement ( victimblip ) then 
            setElementParent ( victimblip,theMugPlace ) 
        end 
    end,1000,0) 

  

Posted

What's the point of that timer? you had one to create the blip, just add the setElementParent after you create it inside the same function.

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.

Posted
What's the point of that timer? you had one to create the blip, just add the setElementParent after you create it inside the same function.

I'm making a police callout system, and i'm trying to make it as real as possible, so delaying it would make it more realistic, as real police doesn't get all their calls at the same time.

Posted

I'm not saying that you shouldn't use the timer to create it, I'm saying that you can use the same timer that creates it to set the parent.

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