Author Topic: No playerlight in a minigame script  (Read 743 times)

I really need this mod for my upcomming server, it would need to disable the regular playerlight, and the green playerlight only while the player is in a mini game. If anyone has something that does this please post here!

Code: [Select]
package nolight {
    function servercmdlight(%cl) {
        if(!isobject(getminigamefromobject(%cl))
            parent::servercmdlight(%cl);
    }
    function servercmdgreenlight(%cl, %a) {
        if(!isobject(getminigamefromobject(%cl))
            parent::servercmdgreenlight(%cl, %a);
    }
};
activatepackage(nolight)
« Last Edit: January 08, 2013, 12:56:03 PM by Zeblote »

Code: [Select]
function servercmdlight(%cl) {
    if(!isobject(getminigamefromobject(%cl))
        parent::servercmdlight(%cl);
}
function servercmdgreenlight(%cl) {
    if(!isobject(getminigamefromobject(%cl))
        parent::servercmdgreenlight(%cl);
}
       

You forgot to put those functions in a package. You're also going to break the greenlight commad, nice work.

You forgot to put those functions in a package. You're also going to break the greenlight commad, nice work.
Whoops forgot package

Also
What
"disable the regular player light, and the green playerlight only while the player is in minigame"
->
"no /light or /greenlight while in mini"

You are still breaking the greenlight command.

You are still breaking the greenlight command.
Um
Does it have extra parameters that I am not aware of atm?

Um
Does it have extra parameters that I am not aware of atm?

Ding ding ding!

servercmdgreenlight(%cl, %pass) ?

servercmdgreenlight(%cl, %pass) ?

It's a pref (boolean) telling the server wether or not the client has clicked to vote or not.


ok, cool. So will that code make it so players are unable to summon any type of light while in a minigame?

ok, cool. So will that code make it so players are unable to summon any type of light while in a minigame?
yes