Jump to content

Making default spawn script as CJ


Recommended Posts

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
  
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
  • Moderators

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 by Guest
Link to comment

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