Page 1 of 1
[ML-Scripting]Is this possible?
Posted: 18 Nov 2014, 23:11
by Rots
Can I determine if a player that is browsing my manialink is in a server or on menus? Some magical maniascript function maybe?
I'd like to change manialink stuff depending on player status
w/o getting MPWS players online_status, i'm not breaking any privacy stuff.
Re: [ML-Scripting]Is this possible?
Posted: 19 Nov 2014, 16:06
by Eole
It's probably not bulletproof, but you could check the value of CurMap. If it's not Null, then there's a high chance that the player is on a server (or editing a map in the editor?).
Code: Select all
<script><!--
main() {
while(True) {
yield;
if (CurMap != Null) {
log(Now^"> I'm on a server");
} else {
log(Now^"> I'm not on a server");
}
}
}
--></script>
Re: [ML-Scripting]Is this possible?
Posted: 19 Nov 2014, 23:19
by Rots
Ah! Nice idea, I'll give it a try
Do I need to #include something?
Re: [ML-Scripting]Is this possible?
Posted: 20 Nov 2014, 14:35
by Eole
Rots wrote:Do I need to #include something?
No.