Hyunsu_Oh Posted April 1, 2010 Share Posted April 1, 2010 sorry, my bad english. What is the difference of addEventHandler("onClientPlayerJoin", getLocalPlayer(), ClientPlayerJoin) and addEventHandler("onClientPlayerJoin", getRootElement(), ClientPlayerJoin)? Link to comment
dzek (varez) Posted April 1, 2010 Share 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 Link to comment
Hyunsu_Oh Posted April 1, 2010 Author Share Posted April 1, 2010 then, If I uses "getLocalPlayer()", if it uses "createFire" function, in only one player the fire this it creates? Link to comment
DiSaMe Posted April 1, 2010 Share 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. Link to comment
dzek (varez) Posted April 1, 2010 Share 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? Link to comment
Hyunsu_Oh Posted April 2, 2010 Author Share Posted April 2, 2010 I do not understand still. please, Show the example of the differences. i used Google Link to comment
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