Blockland Forums > Modification Help
Getrandom
<< < (2/4) > >>
Axolotl:

--- Quote from: Axolotl on December 11, 2011, 05:21:02 PM ---a better syntax would be announce("The random number selected was SPC getRandom(1,50) @ ".");

--- End quote ---
oops nvm
Ipquarx:
You mean
--- Quote from: Axolotl on December 11, 2011, 05:21:02 PM ---a better syntax would be announce("The random number selected was" SPC getRandom(1,50) @ ".");
--- End quote ---
Headcrab Zombie:
Except there was nothing wrong with the syntax
FFSO:

--- Code: ---function serverCmdRoll(%client)
{
    if(%client.isAdmin) //To reduce abuse of the addon leading to mass chat spam
    {
        messageAll('',"\c6The dice has been rolled by:\c2" @ %client.name "\c6, it landed on:\c2" SPC getRandom(1,50) @ "\c6!");
    }
    else
    {
        messageClient(%client,'',"\c6To reduce chat spam your dice roll request has been denied.");
    }
}

--- End code ---
That would work
Headcrab Zombie:

--- Quote from: FFSO on December 12, 2011, 04:24:08 PM ---since announce(); is not a default command...

--- End quote ---
Yes it is.
Navigation
Message Index
Next page
Previous page

Go to full version