Jump to content

[SOLVED]Help with Spawning


Chronic

Recommended Posts

No errors in the debug, just does not work.

  
function spawn ( thePlayer ) 
playerAccount = getPlayerAccount ( thePlayer ) 
skinid = getAccountData ( playerAccount, "skinid" ) 
    if getAccountData ( playerAccount, "skinid" )   then 
    spawnPlayer ( 0, 0, 5, 0, skinid ) 
    elseif not getAccountData ( playerAccount, "skinid" )   then 
    spawnPlayer ( 0, 0, 5 ) 
    end 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), spawn ) 

What I mean is, it doesn't spawn me when I join, just a black screen.

Edited by Guest
Link to comment

Hmm, no idea why this isn't working.

function spawn ( ) 
playerAccount = getPlayerAccount ( source ) 
skinid = getAccountData ( playerAccount, "skinid" ) 
    if getAccountData ( playerAccount, "skinid" )   then 
    spawnPlayer ( source, 0, 0, 5, 0, skinid ) 
    elseif not getAccountData ( playerAccount, "skinid" )   then 
    spawnPlayer ( source, 0, 0, 5 ) 
    end 
end 
  

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