get_player_guid 1.0.0

This commit is contained in:
Resxt 2023-01-08 23:31:29 +01:00
parent 0ffa6410a6
commit 4e7e2f0cdc
3 changed files with 31 additions and 0 deletions

7
small_scripts/README.md Normal file
View File

@ -0,0 +1,7 @@
# Small scripts
Simple drag and drop scripts
## get_player_guid.gsc
Print the GUID of a player in the console whenever he connects and whenever he chooses/changes class.

View File

@ -0,0 +1,24 @@
Init()
{
level thread OnPlayerConnect();
}
OnPlayerConnect()
{
for(;;)
{
level waittill("connected", player);
Print(player.name + " GUID: " + player.guid);
player thread OnPlayerSpawned();
}
}
OnPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player");
Print(self.name + " GUID: " + self.guid);
}
}

Binary file not shown.