![]() |
Retrieving another player's variables within a clientside loop..
So I'm working on a script where I need to get an attacking player's stats. The problem is, it doesn't seem like I have a choice but to figure out some way to get this information from within a clientside for loop. Is there any way to get this information? doing a triggerserver() with a return <data>; on the other end doesn't seem to be possible. And while findplayer(acct) works, only player.vars are accessible.
Are there any workarounds? or is this some kind of hopeless endeavor? |
You can't access arbitrary variables (e.g. clientr) of another player on clientside. That would require an enormous amount of data to be constantly synced to every player on the server (or at least in the same level).
Without knowing what your end goal is (would it make sense to do this stuff serverside?), you can always store the data you need in players' "attr" arrays. Those are accessible by other players in the same level (globally if you configure it in server options), although there are restrictions on the amount and format of data you can store. If you want to ask the server explicitly for the data, you can use triggerServer, but instead of using "return" to send back data, you use triggerClient. There are some examples [here](http://forums.graalonline.com/forums...17&postcount=4). |
Quote:
Quote:
|
Sounds like the attr solution would work fine for you.
Quote:
Quote:
|
All times are GMT +2. The time now is 01:20 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.