Jump to content

Help - Making script workes on player first time join


Recommended Posts

I made a spawn script .. i want it to work only with players that first time they join ... ...

I mean i use login gui it covers the spawn button .. when a player(not new) login the spawn button or the script to disappear

And if a player register the login gui dissapear but the script keep working... sorry for my bad english :|

Link to comment

Try to use SQLite. Or :

  
function join ( ) 
if getElementData (source, "firstTime") == false then 
setElementData ( source, "firstTime", true ) 
--... 
end 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), join ) 
  

I'm not sure if this can work, because if the getElementData doesn't exist for a new player, then there will be an error

Link to comment
Try to use SQLite. Or :
  
function join ( ) 
if getElementData (source, "firstTime") == false then 
setElementData ( source, "firstTime", true ) 
--... 
end 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), join ) 
  

I'm not sure if this can work, because if the getElementData doesn't exist for a new player, then there will be an error

get/setAccountData

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