Jump to content

Help - Making script workes on player first time join


Recommended Posts

Posted

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

mtaubluascripter.png

~~~ ~~~ av-3828.gif ~~~ ~~~

~~~ ~~~ i94804806_4813_5.gif ~~~ ~~~

Posted

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

Currently working on gamemodes :

  • Reallife Script 70%
  • Breakout Script 10%
Posted
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

If I helped you, please click the like button on the right ;) Thanks!

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