![]() |
Custom Name System
vHere is what have been able to come up with, but im still wondering, is there any way to check if the player is staff and if so make their name gold? iv managed to achieve this clientside but not serverside, meaning it only displays as gold to your self.
PHP Code:
|
Again, you need to work on your styling. In addition, the smallest timeout possible is 0.05 seconds, not 0.001 seconds.
The best way is probably to store some value in a player attribute (the attr array) so that you can check it clientside on other clients. |
Iv changed to 0.05 il remember that for next time :) and yeah sorry about my styling. i fixed that too. i keep forgetting that it makes it hard to read for others :3
as for storing it in attributes. not to be too suddle, but how the hell would i do that? would you be ever so kind to link me or show an example? thanks. |
Quote:
First of all you do not need to use "@" to use a single variable such as how you do with "@players[a].nick", this is the type of thing you'd want to do in order to create an object from a dynamic string value, for instance: PHP Code:
The 2nd parameter also does not require the first "@", it can be "players[a].hearts @ "/" @ players[a].maxhp", for the sake of read-ability it would also be better to space those separate values out. Something more important is that when using indexes of 201 + a, and 202 + 1 and incrementing a by 1, the 2nd part of the loop will be over-writing one of the displays from the first part of the loop and so on. For this you should be incrementing a by 2, this would do 201 and 202 for the first part of the loop, then 203 and 204 for the second part. Having said that, it would be much better to simply do: PHP Code:
If you keep track of the amount of displays created, you can do something simple such as : PHP Code:
I'm not 100% sure but I think the playerscount variable is a now deprecated relic of old GS1, you may for example have to use temp.s = players.size(); and refer to temp.s within the loop. |
wow thats alot to chew.
yes i am still piecing together things on this script. i would like to also learn about paramaters. like for example if i had a triggerserver then at the end after it had the server param to trigger i did , player.whatever) iv noticed some scripts have this and then at the top it reads that param but im still confused on how that works. thanks very much for your time and effort i really do want to learn GS2. i think il abandon the custom name system. what does the players[a].health does that mean all players? and why is it players and not player? that confuses me too :$ if you want to see what iv done so far have a look at dev draze. anyway thanks for your help thor, il be sure to keep your afvice in mind :) i think im trying to make things out of my abilities again :3 |
also sorry il have to rep you when i get home, my iDevice doesnt seem capable of it.
|
How do you type that poorly on an iDevice? Doesn't it capitalize stuff for you...?
|
Quote:
|
Beaides the fact autocorrect is off, im also typing while im at work and doing other things.
So sorry youl have to excuse my poor grammar. |
Quote:
|
All times are GMT +2. The time now is 10:44 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.