Modding, Mission Design, and Coding > The Scripting Workshop

Getting number of players in game

<< < (5/5)

krevett62:
Ok so if i use ba.getCurrentPlayer () to get a name i will have the callsign rather than the ship name? (I mean the player's name not the name of his ship if in-game)

m!m:
Yes, you need to use hv.Player for that but the player may not always be a ship handle (especially not if you are in multiplayer) so you need to make sure that hv.Player:getBreedName() returns "Ship" before using the handle like a ship.

krevett62:
Yes i'm using this currently but still i've not found the cause of the crash.
The script was not causing a crash before but was not working for clients and now that i've added the sexp variables tracking to get a way to handle multiple players something is causing a mess with players other than the host it's weird ^^
Guess i won't use this during my lan games probably...

Navigation

[0] Message Index

[*] Previous page

Go to full version