Jump to content

setelementmodel help


boro

Recommended Posts

Posted

Hi all i make script for set model 165 and 166 when is resource start but when resource start then i have still model number 165 :( and model 166 no only still 165 model what is bad ? please help

addEventHandler("onResourceStart", resourceRoot, 
    function() 
    setElementModel(source, 165 or 166) 
    end 
) 

I'll help When I Can.

Posted
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), 
    setTimer(  
        function(player) 
            if getElementType(player) == "player" then 
                local ID = math.random(165, 166) 
                setElementModel(player, ID) 
            end 
        end, 5000, 0) 
) 

This will change your model every 5 seconds( between 165, 166 only !!)

Tell me if you don't want it with timer

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted

Client Side :

addEventHandler("onClientResourceStart",resourceRoot, 
function () 
triggerServerEvent("SetData",localPlayer) 
end) 

Server Side :

addEvent("SetData",true) 
addEventHandler("SetData",root, 
function () 
setElementModel(source,math.random(165,166)) 
end) 
  

Best To Do it Trigger To Check Players ^^

@ Mr.Alm You're Script Won't work .

  

Posted
@ Mr.Alm You're Script Won't work .

Why ??

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted
The Timer is Wrong .

In what ? :mrgreen:

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted
The Timer is Wrong .

In what ? :mrgreen:

As i say in the "setTimer" !

I know :lol: , I mean what's wrong about it

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

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