![]() |
Player created by script?
Hey there.
I was browsing through the scripthelp and found something ... let´s say interesting (at least for me). It looks like there are commands to create a player by script? How would that work? Here are two scripts/commands I found with having it included: TServerPlayer.destroy() - deletes the player, only works for players created by script TServerPlayer.loadaccount() - loads the player, only works for players created by script; this function is called automatically when creating a player |
This doesn't create an actual player, just the object.
It allows you to do stuff like read (I believe you can only read the level name right now) and write to offline players. There's TServerPlayer.saveaccount(); in order to do this. |
So is there any use for it?
|
Quote:
One good example for this I can think of would be to have an sqlite database storing each player that has logged on to the server, and eventually you'd be able to retrieve all of those accounts and write stuff to them if you want to apply an update to everyone. This is somewhat better than having an if(condition){} within the login function for each player. |
Hmm ok thx
|
| All times are GMT +2. The time now is 09:44 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.