![]() |
Okay Thanks Emera...
am currently working on an Event, but is there a way to find (in the level) the guy with the most ... lets say clientr.ec anyway I can warp him and find the command? like is there something like player.most.clientr.ec.setlevel2? |
Use for (temp.pl : players) { to scan through all of the players in the level. You can then use temp.pl.clientr.ec to check their ec clientr flag.
|
Quote:
something like for (winner: playerwithmostclientr.ec) { isnt there something like this similar? like I will use winner.setlevel2() if it worked etc.. |
You could do something like this:
PHP Code:
|
Quote:
|
Quote:
|
You can call it however you want to. You can also call it temp.stefan, temp.john, ... . On Graal it's mostly called temp.pl for one player and temp.plyrs/temp.plys for more players. It's just easier for others to see what you want to do with it. Kinda like organisation but there are no rules for that.
The 2nd "param", in this case players, is always an array. In this case players is an array, just like allplayers, serveroptions.staff, ... . You could also do something like PHP Code:
PHP Code:
I just prefer the for() loop in this case |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
Quote:
|
Quote:
|
Quote:
Quote:
And second : is there any other way without using this.number? Thanks a lot! P.S @iPad : his script style is readable and nice to the eye. |
Quote:
Nothing big mango, just pointing it out ;) Quote:
Here's some links to help get you started: http://forums.graalonline.com/forums...ad.php?t=61805 http://fp4.ca/gs2beautifier/ Also, I don't get what you're trying to say about this.number and temp.number. |
| All times are GMT. The time now is 02:02 PM. |
Powered by vBulletin/Copyright ©2000 - 2025, vBulletin Solutions Inc.