Well This is Command For AdminChat but when i type /adminchat it show index plr does not exist
else if ( cmd == "adminchat" )
{
if ( GetLevel( player ) < 3 ) MessagePlayer("You are not allowed to use that command", player );
else
{
for ( local i = 0; i <= GetMaxPlayers(); i++ )
local plr = FindPlayer(i)
if ( ( plr ) && ( GetLevel( plr ) >= 3 ) ) MessagePlayer("[Admin Chat] " + plr.Name + ": " + text + ".", player );
}
}
You didn't put a bracket after the loop.
Fixed code:
else if ( cmd == "adminchat" )
{
if ( GetLevel( player ) < 3 ) MessagePlayer("You are not allowed to use that command", player );
else
{
for ( local i = 0; i <= GetMaxPlayers(); i++ )
{
local plr = FindPlayer(i)
if ( ( plr ) && ( GetLevel( plr ) >= 3 ) ) MessagePlayer("[Admin Chat] " + plr.Name + ": " + text + ".", plr );
}
}
}
Still untested.
Thanks Xmair :D