![]() |
for(pl:allplayers)
How can i access client.strings via for(pl:allplayers) ?
|
If done client side, you cant. Serverside do pl.client.string. You can only read player information clientside (very limited though) if the player is in the same level as you are.
|
Someone told me you can set player.attr[28] or player.attr[29] to a value of your choice which can be read by other players... I've not tried it yet, but it may be useful to experiment. Also, does anyone know if arrays work with it? I did try that and had no success, but I could be doing something wrong.
|
Quote:
The same goes for clientr variables. However, you don't always need to use player. An example would be addweapon, which is really player.addweapon. So yes, pl.client.foo |
You cannot access other people's client variables on your clientside.
However if there are client variables you need accessible to all on the clientside set it to player.attr[index]. You would also use the serveroption sendtoallattr which is an array of the player attribute indexes you want sent to all other players even if they're not in the level. |
Quote:
Stefan really needs to add those mostly-unknown serveroptions to the wiki. |
Quote:
|
Quote:
Quote:
|
Thank You all for the help and, and a special thanks to Inverness <3
|
Hmm, well it seems allplayers is for all players on the server... is there one for just all the players in the level?
|
Quote:
for ( pl: players ) |
There is players[] which is for the players in the current level, or the players around you (3x3 levels) if you are on a gmap.
If you want to access all players of the level even if you are on gmap, then use this.level.players[]. To access all players use allplayers[] |
| All times are GMT +2. The time now is 11:32 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.