![]() |
Gani Scripting and Player Referencing
I have run into an issue that I am not entirely sure how to resolve. I currently am using a gani to display an image above the players' head of that players' specific choosing. I am displaying the gani through a player attribute. This is my gani script:
PHP Code:
I understand this is a tad confusing in the wording, so essentially what is happening is if I am player a, and player b is another player, and we both have different clientr.player_icon images, player a will see his icon image on his screen, and player b's icon will also display player a's clientr.player_icon, even when they are different and vice versa. Any help is appreciated. I also know that the index of the image is always the same, which could be an issue, but I wouldn't think that it would matter if it is stored in a gani and displayed through a player attribute... Though I could be wrong. I have the script clientside in the gani, so I'm not so sure that would make a difference anyways. |
player.attr[#] = "youricon.gani,image.png";
then in the script reference: temp.icon = (@player.attr[#])[1]; |
Jer is right of course, but for context, remember that other players' attributes (client/clientr/most of player except stuff like nick, dir, x, y, attr, etc) are not synced clientside. So you won't be able to access another players' client/clientr variables locally.
(The obvious reason for this is that it would require sending tons of data. Plus it might contain information you don't want to be known to other players.) The suggestion above is to shove them into attr, which is one of the attributes that *is* synced to other players. |
Thanks for the help you two!
I couldn't load the attribute as an array by using (@player.attr[#])[1], so I had to end up treating it as a string and using: PHP Code:
|
Quote:
PHP Code:
Quote:
|
Quote:
|
All times are GMT +2. The time now is 07:37 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.