DeletedAccount1111 Posted February 14, 2014 Share Posted February 14, 2014 What I can change in the freeroam script so instead of random, they spawn as CJ? function spawnMe(x, y, z) if not x then x, y, z = getElementPosition(source) end if isPedTerminated(source) then repeat until spawnPlayer(source, x, y, z, 0, math.random(0, 0)) else spawnPlayer(source, x, y, z, 0, getPedSkin(source)) end setCameraTarget(source, source) setCameraInterior(source, getElementInterior(source)) end Link to comment
Anubhav Posted February 14, 2014 Share Posted February 14, 2014 function spawnMe(x, y, z) if not x then x, y, z = getElementPosition(source) end if isPedTerminated(source) then repeat until spawnPlayer(source, x, y, z, 0, 0) else spawnPlayer(source, x, y, z, 0, getPedSkin(source)) end setCameraTarget(source, source) setCameraInterior(source, getElementInterior(source)) end Link to comment
DeletedAccount1111 Posted February 14, 2014 Author Share Posted February 14, 2014 Somehow doesn't work Link to comment
Moderators Citizen Posted February 14, 2014 Moderators Share Posted February 14, 2014 (edited) Try this, put it anywhere in the server side: function forceCJSkin() setElementModel(source, 0) end addEventHandler("onPlayerSpawn", root, forceCJSkin) Regards, Citizen *Edited*: Fixed the typo (cf. next post) Edited February 14, 2014 by Guest Link to comment
Castillo Posted February 14, 2014 Share Posted February 14, 2014 You got a typo there in "fonction". Link to comment
Moderators Citizen Posted February 14, 2014 Moderators Share Posted February 14, 2014 Yeah fixed, thanks Link to comment
DeletedAccount1111 Posted February 15, 2014 Author Share Posted February 15, 2014 Try this, put it anywhere in the server side: function forceCJSkin() setElementModel(source, 0) end addEventHandler("onPlayerSpawn", root, forceCJSkin) Regards, Citizen *Edited*: Fixed the typo (cf. next post) Is this supossed to work as a server side, standalone script Or being inside the freeroam resource? Link to comment
Controlled Posted February 15, 2014 Share Posted February 15, 2014 It can be placed in your freeroam resource. Link to comment
Anubhav Posted February 15, 2014 Share Posted February 15, 2014 Use that script as server. Link to comment
Saml1er Posted February 15, 2014 Share Posted February 15, 2014 Where is source defined? You're calling this function, right? Anyways why don't you try debugging it? 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