![]() |
Player Levels
I have this weapon that allows me to use chat to trigger occurances upon myself or specified players. Things like :osl Account to send someone to OSL immediately. Anyway, I got toying with doing it with all players in the same level as myself and hit a brick wall. To test, I merely used chat rather than jumping right to setLevel2. I stood in a level with around 20 players in it and triggered it with the :test command and it's only finding 1 or 2 people in the same level as me. Basically, could someone check this out and see if I'm missing something. I sought help from kinetaro, and he added the temp stuff to it as he said for messes with player.account sometimes, but even he was unable to figure out why it wasn't working.
PHP Code:
|
findPlayer(thiso.tempacc).level.name is obselete, try replacing it with player.level.name - you never, ever, use findPlayer() to access the current player.
|
Quote:
|
&& pl.level.name != null instead of && pl.level != null? I probably wont be making much sense, as I havent slept for over a day.
|
Quote:
PHP Code:
|
If you want to access people in the current level, why not use players instead of allplayers?
PHP Code:
|
Sadly, I also thought of that :( Still nothing.
|
I told Novo to take a look at the thread, I'm too tired for coding right now. Hopefully he'll help you out.
|
Quote:
|
The return causes the function to terminate. :)
|
PHP Code:
|
NOVO WINS, lmao... stupid me, actually was using : as the initiating symbol in this example, and it was meant to be /
Thanks, rofl <3 |
although, since you're only wanting to find a specific player I wouldn't use players/allplayers...
HTML Code:
//pars = [0-action]HTML Code:
if (temp.action == "summon") { |
return: Leaves the function and returns parameters to the function caller.
break: Immediately ends the loop or switch and jumps to the end of it. continue: Ends the current step of the while/for loop and continues with the next one. Make sure you remember which is which :) |
Geez, would have thought I'd notice such a thing even when tired like hell. :whatever:
|
| All times are GMT +2. The time now is 02:14 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.