![]() |
|
07-13-2012
|
16 |
|
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
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? |
|
07-13-2012
|
17 |
|
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,825
|
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.
|
|
07-13-2012
|
18 | |
|
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
something like for (winner: playerwithmostclientr.ec) { isnt there something like this similar? like I will use winner.setlevel2() if it worked etc.. |
|
|
07-14-2012
|
19 |
|
Registered User
Join Date: Sep 2011
Location: Germany
Posts: 6,122
|
You could do something like this: PHP Code:
|
|
07-15-2012
|
20 |
|
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,825
|
|
|
07-15-2012
|
21 | |
|
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
|
|
|
07-15-2012
|
22 |
|
Registered User
Join Date: Sep 2011
Location: Germany
Posts: 6,122
|
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 |
|
07-15-2012
|
23 |
|
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,825
|
|
|
07-15-2012
|
24 |
|
Registered User
Join Date: Sep 2011
Location: Germany
Posts: 6,122
|
|
|
07-16-2012
|
25 | |
|
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
|
|
|
07-16-2012
|
26 |
|
is Lazy
Join Date: Dec 2011
Location: Graal Guild House
Posts: 245
|
|
|
07-16-2012
|
27 | |
|
Registered User
Join Date: Sep 2011
Location: Germany
Posts: 6,122
|
So captain obvious tell me what is not styled on that.
|
|
|
07-16-2012
|
28 | |
|
is Lazy
Join Date: Dec 2011
Location: Graal Guild House
Posts: 245
|
|
|
|
07-16-2012
|
29 | ||
|
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
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. |
||
|
07-16-2012
|
30 | |
|
Nerd
Join Date: Sep 2011
Location: Berlin
Posts: 3,825
|
Spaces between symbols like + and = Nothing big mango, just pointing it out ;)
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. |
|