function onPlayerCommand(player, command, arguments)
{
local cmd, text;
cmd = command.tolower();
text = arguments;
if ( cmd == "ann" || cmd == "announce" )
{
if ( !text ) PrivMessage ( player, "Use /" + cmd + " <message>." );
else
{
AnnounceAll ( text + "", 3);
MessagePlayer(">> You have announced: " + text + "",player )
}
}
}
How to change it to admin function and i have to access it till 4 Level to the end 10
function onPlayerCommand(player, command, arguments)
{
local cmd, text;
cmd = command.tolower();
text = arguments;
if ( cmd == "ann" || cmd == "announce" )
{
if ( !text ) PrivMessage ( player, "Use /" + cmd + " <message>." );
else if ( GetLevel(player) < 4 ) PrivMessage ( player, "You must need atleast level 4 to access the command" );
else
{
AnnounceAll ( text + "", 3);
MessagePlayer(">> You have announced: " + text + "",player )
}
}
}