|
Written by eaxs
|
|
Thursday, 27 August 2009 00:34 |
When I started scripting I was a bit confused about the different types of ID's and about what each command or function required as a valid target.
Entities and entity ID's Almost everything in the game is an entity. Entities are simply objects in the game like: Trees, rocks, buildings, NPC's and even players. Each of these entity has it's own ID. Most commands and functions require you to pass them the correct entity ID as a parameter.
Players and player ID's While each player has it's own entity ID (because he is in fact an object in the world), he also has a client ID. This number will be given to the player when joining the server and is used only by a few commands and functions. For example the kick and ban command require the client ID...sounds logical. To get a list of all players including their client id, use the ListClients command.
Useful functions to work with ID's
|