Hyunsu_Oh Posted April 1, 2010 Posted April 1, 2010 sorry, my bad english. What is the difference of addEventHandler("onClientPlayerJoin", getLocalPlayer(), ClientPlayerJoin) and addEventHandler("onClientPlayerJoin", getRootElement(), ClientPlayerJoin)?
dzek (varez) Posted April 1, 2010 Posted April 1, 2010 https://wiki.multitheftauto.com/wiki/AddEventHandler if you put getLocalPlayer() the function will be executed only when local player join the server (so it will be executed once) if you put getRootElement() the function will be executed everytime anobody join the server
Hyunsu_Oh Posted April 1, 2010 Author Posted April 1, 2010 then, If I uses "getLocalPlayer()", if it uses "createFire" function, in only one player the fire this it creates?
DiSaMe Posted April 1, 2010 Posted April 1, 2010 Actually, onClientPlayerJoin isn't triggered by local player because client-side scripts start after player has already joined the server. Use onClientResourceStart attached to getResourceRootElement(getThisResource()) instead.
dzek (varez) Posted April 1, 2010 Posted April 1, 2010 then, If I uses "getLocalPlayer()", if it uses "createFire" function, in only one player the fire this it creates? no, its not workign that way.. read some topics about difference betweeen client-side and server-side scripts, find some tutorials, and good luck btw: are you translating your text with google translate, or by yourself?
Hyunsu_Oh Posted April 2, 2010 Author Posted April 2, 2010 I do not understand still. please, Show the example of the differences. i used Google
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