Admin Commands with Functions

Started by =RK=MarineForce, Sep 08, 2018, 03:12 PM

Previous topic - Next topic

=RK=MarineForce

[noae][noae][noae]///////////// Spamming System? [url]https://forum.vc-mp.org/?topic=1717.0[/url] Add this on ur script.for mute o r unmute
////////// Ban System ? [url]https://forum.vc-mp.org/?topic=346.0[/url]
///////// Commands /////////////
//// Hello Guyz this made by Mahmoud Tornado and me and some helps .
[/noae][/noae][/noae]

[noae][noae][noae][noae]else if ( ( cmd == "acmds" ) || ( cmd == "admincmds" ) )
{
if( stats[ player.ID ].Log == false && pstats[ player.ID ].Reg == false ) MessagePlayer( "You Need Login or Register First.", player );
else if ( stats[ player.ID ].Level < 2 ) MessagePlayer( "You Are Not Authorized To use This Command", player );
{
if ( stats[ player.ID ].Level < 2 ) MessagePlayer("[#00FFFF]VIP", player);
if ( stats[ player.ID ].Level < 3 ) MessagePlayer("[#00FFFF]Moderator",player);
if ( stats[ player.ID ].Level < 4 ) MessagePlayer("[#00FFFF]Admin",player);
if ( stats[ player.ID ].Level < 5 ) MessagePlayer("[#00FFFF]Head-Admin",player);
if ( stats[ player.ID ].Level < 6 ) MessagePlayer("[#00FFFF]Manager",player);
if ( stats[ player.ID ].Level < 7 ) MessagePlayer("[#00FFFF]Owner",player);
}
}
 ///// Admin Cmd by Mohammed some things by me ./////////

 else if ( ( cmd == "admin" ) || ( cmd == "admins" ) )
{
if( stats[ player.ID ].Log == false && stats[ player.ID ].Reg == false ) MessagePlayer( "You Need Login or Register First.", player );
else {
local plr, b;
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
plr = FindPlayer( i );
if ( ( plr ) && ( stats[ plr.ID ].Level >= 2 ) )
{
if ( b ) b = b + ", " + plr.Name + " - " + LevelTag( plr ) + ""
else b = plr.Name + " - " + LevelTag( plr ) + ""
}
}
if ( b ) Message( " Admins Online: " + b + "  " );
else Message( "No Admins Online." );
Message( " Requested By " + player.Name +"" );
}
}

else if ( cmd == "settime" )
    {
if ( stats[player.ID].Level < 3 )
{
     if ( !text ) MessagePlayer( "[#ff0000]Correct syntax : /settime <hr> <min>", player );
      else if ( split(text, " ").len() < 2) return MessagePlayer("[#ff0000]Correct syntax : /settime <hr> <min>", player )
      else
   {
   local a = split(text, " ");
      if ( !IsNum( a[0] )) MessagePlayer( "[#ffbb00]Format: /settime <hr> <min>", player );
      else if ( !IsNum( a[1] )) MessagePlayer( "[#ffbb00]Format: /settime <hr> <min>", player );
      else SetTime( a[0].tointeger(), a[1].tointeger() ) ; 
      }
   }
        else MessagePlayer( "[#FF0000] You're not allowed to use this command. " , player )
}

else if( cmd == "sethp" )
{
if ( stats[player.ID].Level < 3 )
{
      if( !text )
      MessagePlayer("Use /sethp <plr> <hp>", player);
      local params = split( text, " " );
      if( params.len() < 1 ) MessagePlayer("Wrong no. of parameters.", player);
      else if( !IsNum( params[1] ) ) return MessagePlayer("HP must be an integer.", player);
      else if( params[1].tointeger() > 100 || params[1].tointeger() < 0 ) return MessagePlayer("It can't be more than 100 or less than 0.", player);
      local plr = IsNum( params[0] ) ? FindPlayer( params[0].tointeger() ) : FindPlayer( params[0] );
      if( !plr ) return MessagePlayer( "Wrong player.", player );
      else plr.Health = params[1].tointeger();
}
        else MessagePlayer( "[#FF0000] You're not allowed to use this command. " , player )
}

else if ( cmd == "setweather" )
{
if ( stats[player.ID].Level < 3 )
{
if ( !text ) return MessagePlayer( "[#ff0000]Usage: setweather [Weather/ID]", player );
if ( !IsNum(text) ) return MessagePlayer( "[#ff0000]Use integers/numbers", player );
SetWeather( text.tointeger() );
Message( "[#4acc0a] Admin "+ player.Name +" Set The Weather To "+GetWeatherName());
return;
}
        else MessagePlayer( "[#FF0000] You're not allowed to use this command. " , player )
}

  else if (cmd == "ann")
    {
if ( stats[player.ID].Level < 3 )
    {
        if (!text) return ClientMessage("[#FF0000][Syntax]/ann <ID> <All/Nick/ID> <Text>", player, 0, 0, 0);
        local v = split(text, " ");
        if (v.len() < 3) return ClientMessage("[#FF0000][Syntax]/ann <ID> <All/Nick/ID> <Text>", player, 0, 0, 0);
        if (v[1].tolower() == "all") AnnounceAll(text.slice(v[0].len() + v[1].len() + 2), v[0].tointeger());
        else Announce(text.slice(v[0].len() + v[1].len() + 2), FindPlayer(v[1]), v[0].tointeger());
    }
        else MessagePlayer( "[#FF0000] You're not allowed to use this command. " , player )
}

    else if ( cmd == "kick" )
    {
if ( stats[player.ID].Level < 3 )
        {
            if ( text )
            {
                local plr = FindPlayer( text );
                if ( plr )
                {
                    KickPlayer( plr );
                }
                else MessagePlayer( "[#ff0000]Cannot find player "+text+"." , player );
            }
            else MessagePlayer( "[#ff0000]Usage: /"+cmd+" <player>" , player );
        }
        else MessagePlayer( "[#ff0000]You are not allowed to use this command." , player )
    }

else if( cmd == "setarmour" )
{
if ( stats[player.ID].Level < 3 )
{
      if( !text )
      MessagePlayer("Use /setarmour <plr> <hp>", player);
      local params = split( text, " " );
      if( params.len() < 1 ) MessagePlayer("Wrong no. of parameters.", player);
      else if( !IsNum( params[1] ) ) return MessagePlayer("Armour must be an integer.", player);
      else if( params[1].tointeger() > 100 || params[1].tointeger() < 0 ) return MessagePlayer("It can't be more than 100 or less than 0.", player);
      local plr = IsNum( params[0] ) ? FindPlayer( params[0].tointeger() ) : FindPlayer( params[0] );
      if( !plr ) return MessagePlayer( "Wrong player.", player );
      else plr.Armour = params[1].tointeger();
}
        else MessagePlayer( "[#FF0000] You're not allowed to use this command. " , player )
}


else if ( cmd == "drown" )
{
if ( stats[player.ID].Level < 3 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
plr.Pos = Vector( -761.1595 -340.6097 9.9061 );
Message( "[#FFbb00]** Admin " + player.Name + " Drowned " + plr.Name + " for Reason " + reason );
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}

else if ( cmd == "get" )
{
if ( stats[player.ID].Level < 4 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
plr.Pos = player.Pos;
Message( "[#FFbb00]** Admin " + player.Name + " Bring " + plr.Name + " for Reason " + reason );
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}

else if ( cmd == "freeze" )
{
if ( stats[player.ID].Level < 3 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( plr.IsFrozen ) MessagePlayer( "[#FF0000]The Player is already Freezed", player );
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
plr.IsFrozen = true;
Message( "[#FFbb00]** Admin " + player.Name + " has Frozen " + plr.Name + " for Reason " + reason );
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}

else if ( cmd == "unfreeze" )
{
if ( stats[player.ID].Level < 3 )
{
if ( !text ) MessagePlayer( "[#FF0000]Syntax, /" + cmd + " <Nick/ID>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( !plr.IsFrozen ) MessagePlayer( "[#FF0000]" + plr.Name + " is not Freezed.", player);
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
plr.IsFrozen = false;
Message( "[#FFBB00]>> Admin " + player + " has un-freezed " + plr.Name );
}
}
}
        else MessagePlayer( "[#FF0000] You're not allowed to use this command. " , player )
}

/// You need add any spam system when player spam will be muted add it from kakan

else if ( cmd == "mute" )
{
if ( stats[player.ID].Level < 3 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
   IsMuted[ player.ID ] = false;
Message( "[#FFbb00]** Admin " + player.Name + " Muted " + plr.Name + " for Reason " + reason );
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}

else if ( cmd == "unmute" )
{
if ( stats[player.ID].Level < 3 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
   IsMuted[ player.ID ] = false;
Message( "[#FFbb00]** Admin " + player.Name + " unMuted " + plr.Name + " for Reason " + reason );
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}

///////////// All


else if ( cmd == "muteall" )
{
if ( stats[player.ID].Level < 4 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );
IsMuted[ p.ID ] = true;
Message( "[#FFbb00]** Admin " + player.Name + " Muted All Players ");
}
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}


else if ( cmd == "unmuteall" )
{
if ( stats[player.ID].Level < 4 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );

   IsMuted[ p.ID ] = false;
Message( "[#FFbb00]** Admin " + player.Name + " UnMuted All Players ");
}
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}

else if ( cmd == "freezeall" )
{
if ( stats[player.ID].Level < 4 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( plr.IsFrozen ) MessagePlayer( "[#FF0000]The Player is already Freezed", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );

p.IsFrozen = true;
Message( "[#FFbb00]** Admin " + player.Name + " Freeze All Players ");
}
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}

else if ( cmd == "unfreezeall" )
{
if ( stats[player.ID].Level < 4 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( plr.IsFrozen ) MessagePlayer( "[#FF0000]The Player is already Freezed", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );

p.IsFrozen = false;
Message( "[#FFbb00]** Admin " + player.Name + " UnFreezed All Players ");
}
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}

else if ( cmd == "drownall" )
{
if ( stats[player.ID].Level < 4 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );

p.Pos = Vector( -761.1595 -340.6097 9.9061 );
Message( "[#FFbb00]** Admin " + player.Name + " Drowned All Players ");
}
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}

else if ( cmd == "getall" )
{
if ( stats[player.ID].Level < 4 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );
p.Pos == player.Pos;
Message( "[#FFbb00]** Admin " + player.Name + " Bring All Players To Him ");
}
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}


else if ( cmd == "healall" )
{
if ( stats[player.ID].Level < 4 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );
p.Health == 100;
Message( "[#FFbb00]** Admin " + player.Name + " Set 100% HP To all Players ");
}
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}

else if ( cmd == "armourall" )
{
if ( stats[player.ID].Level < 4 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );
p.Armour == 100;
Message( "[#FFbb00]** Admin " + player.Name + " Set 100% Armour To all Players ");
}
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}

else if ( cmd == "kickall" )
{
if ( stats[player.ID].Level < 4 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );
KickPlayer( p );
Message( "[#FFbb00]** Admin " + player.Name + " Kicked all Players From SERVER BYE BYE BABIES ");
}
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}

                   


//////// Setlevel by Kelvin /////////
 else if ( ( cmd == "setlevel" ) || ( cmd == "setlvl" ) )
 {
  if ( stats[ player.ID ].level < 7 ) PrivMessage( player, "Error: You are not authorized to use this command." );
  else if ( !stats[ player.ID ].logged ) PrivMessage( player, "Error: You are not logged-in." );
  else if ( !text ) PrivMessage( player, format( "Error: Use /%s <player> <level>", cmd ) );
  else
  {
   local txt = split( text, " " );
   if ( txt.len() >= 2 )
   {
    local plr = FindPlayer( txt[ 0 ] ), lvl = txt[ 1 ];
    if ( !plr ) PrivMessage( player, "Error: Unknown player." );
    else if ( !IsNum( lvl ) ) PrivMessage( player, "Error: Level must be numbers..." );
    else if ( ( lvl.tointeger() < 1 ) || ( lvl.tointeger() > 7 ) ) ClientMessage( "ERROR: Allowed level amount are between 1 and 7.", player, 255, 0, 0 );
    else if ( stats[ plr.ID ].level == lvl.tointeger() ) PrivMessage( player, format( "Error: %s's level is %d already.", plr.Name, lvl.tointeger() ) );
    else
    {
     stats[ plr.ID ].level = lvl.tointeger();
     ClientMessageToAll( format( "* Admin %s changed %s's level to:[ %d ]", player.Name, plr.Name, lvl.tointeger() ), 0, 255, 0 );
    }
   }
   else PrivMessage( player, format( "Error: Use /%s <player> <level>", cmd ) );
  }
 }
 return 1;
}
[/noae][/noae][/noae][/noae]

[noae][noae][noae][noae]/////// Functions

function LevelTag( p )
{
local lvl = stats[ p.ID ].Level;
switch (lvl)
{
    case 1: return "Member";
    case 2: return "VIP";
    case 3: return "Moderator";
    case 4: return "Admin";
    case 5: return "Head-Admin";
    case 6: return "Manager";
    case 7: return "Developer";
    default: return "Visitor";
}
}

//// This By Mahmoud Tornado

function GetPlayer( target )
{
 target = target.tostring();
 
 if ( IsNum( target ) )
 {
  target = target.tointeger();
 
  if ( FindPlayer( target ) ) return FindPlayer( target );
  else return null;
 }
 else if ( FindPlayer( target ) ) return FindPlayer( target );
 else return null;
}

function GetTok(string, separator, n, ...)
{
 local m = vargv.len() > 0 ? vargv[0] : n,
    tokenized = split(string, separator),
    text = "";
 
 if (n > tokenized.len() || n < 1) return null;
 for (; n <= m; n++)
 {
  text += text == "" ? tokenized[n-1] : separator + tokenized[n-1];
 }
 return text;
}

function NumTok(string, separator)
{
 local tokenized = split(string, separator);
 return tokenized.len();
}

/// by Zeus
function GetWeatherName( )
{
switch( GetWeather() )
  {
  case 0 : return "Clear Skies";
  case 1 : return "OverCast";
  case 2 : return "Rainy-Lightning";
  case 3 : return "Foggy";
  case 4 : return "Sunny";
  case 5 : return "Rainy";
  case 6 : return "Dark Sky Partly Cloudy";
  case 7 : return "Light Sky Partly Cloudy";
  case 8 : return "OverCast Partly Cloudy";
  case 9 : return "Grey Sky Black Clouds";
  case 10 : return "Fog And Gray";
  default : return "Unknown";
  }
}
[/noae][/noae][/noae][/noae]

if u want other cmds tell me if i can made it.
if you got any bug so call me :Dd

Bro Can You give best level for cmds

Untested IT.

Mahmoud Tornado

One thing i wanna say, in acmds you didn't add the commands you just added the admin rank so add cmds, you can make an const if u will make it like VIP, Moderator, Admin, etc.... So u can make it like that...

In main:
const VIP = "Any vip command. <admin lvl2>";
const Moderator = "Any Moderator command. <admin lvl3>";
etc.......

And in /acmds do this.
else if ( ( cmd == "acmds" ) || ( cmd == "admincmds" ) )
{
if( stats[ player.ID ].Log == false && pstats[ player.ID ].Reg == false ) MessagePlayer( "You Need Login or Register First.", player );
else if ( stats[ player.ID ].Level < 2 ) MessagePlayer( "You Are Not Authorized To use This Command", player );
{
if ( stats[ player.ID ].Level < 2 ) MessagePlayer("[#00FFFF]"+VIP+".", player);
if ( stats[ player.ID ].Level < 3 ) MessagePlayer("[#00FFFF]"+Moderator+".",player);
etc.......
}
}

This to get the list of commands or you can make it simply in msg.

Btw, Nice, and keep going!

=RK=MarineForce

BRO There is no bug? i didn't tested it okay let me test xD

Mahmoud Tornado

Quote from: =RK=MarineForce on Sep 08, 2018, 09:19 PMBRO There is no bug? i didn't tested it okay let me test xD
This is not a bug, it's just not the information command.

=RK=MarineForce

[noae]else if ( cmd == "settime" )
    {
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
     if ( !text ) MessagePlayer( "[#ff0000]Correct syntax : /settime <hr> <min>", player );
      else if ( split(text, " ").len() < 2) return MessagePlayer("[#ff0000]Correct syntax : /settime <hr> <min>", player )
      else
   {
   local a = split(text, " ");
      if ( !IsNum( a[0] )) MessagePlayer( "[#ffbb00]Format: /settime <hr> <min>", player );
      else if ( !IsNum( a[1] )) MessagePlayer( "[#ffbb00]Format: /settime <hr> <min>", player );
      else SetTime( a[0].tointeger(), a[1].tointeger() ) ; 
      }
   }
      }

else if( cmd == "sethp" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
      if( !text )
      MessagePlayer("Use /sethp <plr> <hp>", player);
      local params = split( text, " " );
      if( params.len() < 1 ) MessagePlayer("Wrong no. of parameters.", player);
      else if( !IsNum( params[1] ) ) return MessagePlayer("HP must be an integer.", player);
      else if( params[1].tointeger() > 100 || params[1].tointeger() < 0 ) return MessagePlayer("It can't be more than 100 or less than 0.", player);
      local plr = IsNum( params[0] ) ? FindPlayer( params[0].tointeger() ) : FindPlayer( params[0] );
      if( !plr ) return MessagePlayer( "Wrong player.", player );
      else plr.Health = params[1].tointeger();
}
   
}

else if ( cmd == "setweather" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) return MessagePlayer( "[#ff0000]Usage: setweather [Weather/ID]", player );
if ( !IsNum(text) ) return MessagePlayer( "[#ff0000]Use integers/numbers", player );
SetWeather( text.tointeger() );
Message( "[#4acc0a] Admin "+ player.Name +" Set The Weather To "+GetWeatherName());
return;
}

}

  else if (cmd == "ann")
    {
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
        if (!text) return ClientMessage("[#FF0000][Syntax]/ann <ID> <All/Nick/ID> <Text>", player, 0, 0, 0);
        local v = split(text, " ");
        if (v.len() < 3) return ClientMessage("[#FF0000][Syntax]/ann <ID> <All/Nick/ID> <Text>", player, 0, 0, 0);
        if (v[1].tolower() == "all") AnnounceAll(text.slice(v[0].len() + v[1].len() + 2), v[0].tointeger());
        else Announce(text.slice(v[0].len() + v[1].len() + 2), FindPlayer(v[1]), v[0].tointeger());
    }
        else MessagePlayer( "[#FF0000] You're not allowed to use this command. " , player )
}

   if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{

else if( cmd == "setarmour" )
{
if ( stats[player.ID].Level < 4 )
{
      if( !text )
      MessagePlayer("Use /setarmour <plr> <hp>", player);
      local params = split( text, " " );
      if( params.len() < 1 ) MessagePlayer("Wrong no. of parameters.", player);
      else if( !IsNum( params[1] ) ) return MessagePlayer("Armour must be an integer.", player);
      else if( params[1].tointeger() > 100 || params[1].tointeger() < 0 ) return MessagePlayer("It can't be more than 100 or less than 0.", player);
      local plr = IsNum( params[0] ) ? FindPlayer( params[0].tointeger() ) : FindPlayer( params[0] );
      if( !plr ) return MessagePlayer( "Wrong player.", player );
      else plr.Armour = params[1].tointeger();
}

}


else if ( cmd == "drown" )
{
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
plr.Pos = Vector( -761.1595 -340.6097 9.9061 );
Message( "[#FFbb00]** Admin " + player.Name + " Drowned " + plr.Name + " for Reason " + reason );
}
}
}
       
}

else if ( cmd == "get" )
{
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
plr.Pos = player.Pos;
Message( "[#FFbb00]** Admin " + player.Name + " Bring " + plr.Name + " for Reason " + reason );
}
}
}
       
}

else if ( cmd == "freeze" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( plr.IsFrozen ) MessagePlayer( "[#FF0000]The Player is already Freezed", player );
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
plr.IsFrozen = true;
Message( "[#FFbb00]** Admin " + player.Name + " has Frozen " + plr.Name + " for Reason " + reason );
}
}
}
       
}

else if ( cmd == "unfreeze" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "[#FF0000]Syntax, /" + cmd + " <Nick/ID>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( !plr.IsFrozen ) MessagePlayer( "[#FF0000]" + plr.Name + " is not Freezed.", player);
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
plr.IsFrozen = false;
Message( "[#FFBB00]>> Admin " + player + " has un-freezed " + plr.Name );
}
}
}

}

/// You need add any spam system when player spam will be muted add it from kakan

else if ( cmd == "mute" )
{
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
   IsMuted[ player.ID ] = false;
Message( "[#FFbb00]** Admin " + player.Name + " Muted " + plr.Name + " for Reason " + reason );
}
}
}
       
}

else if ( cmd == "unmute" )
{
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
   IsMuted[ player.ID ] = false;
Message( "[#FFbb00]** Admin " + player.Name + " unMuted " + plr.Name + " for Reason " + reason );
}
}
}
 
}

///////////// All


else if ( cmd == "muteall" )
{
if ( stats[ player.ID ].level < 5 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );
IsMuted[ p.ID ] = true;
Message( "[#FFbb00]** Admin " + player.Name + " Muted All Players ");
}
}
}
}




else if ( cmd == "unmuteall" )
{
if ( stats[ player.ID ].level < 5 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );

   IsMuted[ p.ID ] = false;
Message( "[#FFbb00]** Admin " + player.Name + " UnMuted All Players ");
}
}

}

}

else if ( cmd == "freezeall" )
{
if ( stats[ player.ID ].level < 5 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( plr.IsFrozen ) MessagePlayer( "[#FF0000]The Player is already Freezed", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );

p.IsFrozen = true;
Message( "[#FFbb00]** Admin " + player.Name + " Freeze All Players ");
}
}

}

}

else if ( cmd == "unfreezeall" )
{
if ( stats[ player.ID ].level < 5 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( plr.IsFrozen ) MessagePlayer( "[#FF0000]The Player is already Freezed", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );

p.IsFrozen = false;
Message( "[#FFbb00]** Admin " + player.Name + " UnFreezed All Players ");
}
}

}

}

else if ( cmd == "drownall" )
{
if ( stats[ player.ID ].level < 5 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{

local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );

p.Pos = Vector( -761.1595 -340.6097 9.9061 );
Message( "[#FFbb00]** Admin " + player.Name + " Drowned All Players ");

}
}
}

}

else if ( cmd == "getall" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );
p.Pos == player.Pos;
Message( "[#FFbb00]** Admin " + player.Name + " Bring All Players To Him ");
}
}
}


}


else if ( cmd == "healall" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );
p.Health == 100;
Message( "[#FFbb00]** Admin " + player.Name + " Set 100% HP To all Players ");
}

}
}
 
}

else if ( cmd == "armourall" )
{
if ( stats[ player.ID ].level < 5 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{

local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );
p.Armour == 100;
Message( "[#FFbb00]** Admin " + player.Name + " Set 100% Armour To all Players ");

}
}
}

}

else if ( cmd == "kickall" )
{
if ( stats[ player.ID ].level < 6 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{

local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );
KickPlayer( p );
Message( "[#FFbb00]** Admin " + player.Name + " Kicked all Players From SERVER BYE BYE BABIES ");
}
}

}
       
}

                   
[/noae]

I Think all fixed

rww

else if ( cmd == "drownall" )
{
if ( stats[player.ID].Level < 4 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );

p.Pos = Vector( -761.1595 -340.6097 9.9061 );
Message( "[#FFbb00]** Admin " + player.Name + " Drowned All Players ");
}
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}

lol? why /drownall [plr name] [reason] for drown all? why not /drownall [reason]?
Join to Irrelevant Club Discord: https://discord.gg/MsPPZ5uV4X

=RK=MarineForce


=RK=MarineForce

Quote from: =RK=MarineForce on Sep 09, 2018, 04:10 PM[noae][noae]else if ( cmd == "settime" )
    {
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
     if ( !text ) MessagePlayer( "[#ff0000]Correct syntax : /settime <hr> <min>", player );
      else if ( split(text, " ").len() < 2) return MessagePlayer("[#ff0000]Correct syntax : /settime <hr> <min>", player )
      else
   {
   local a = split(text, " ");
      if ( !IsNum( a[0] )) MessagePlayer( "[#ffbb00]Format: /settime <hr> <min>", player );
      else if ( !IsNum( a[1] )) MessagePlayer( "[#ffbb00]Format: /settime <hr> <min>", player );
      else SetTime( a[0].tointeger(), a[1].tointeger() ) ; 
      }
   }
      }

else if( cmd == "sethp" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
      if( !text )
      MessagePlayer("Use /sethp <plr> <hp>", player);
      local params = split( text, " " );
      if( params.len() < 1 ) MessagePlayer("Wrong no. of parameters.", player);
      else if( !IsNum( params[1] ) ) return MessagePlayer("HP must be an integer.", player);
      else if( params[1].tointeger() > 100 || params[1].tointeger() < 0 ) return MessagePlayer("It can't be more than 100 or less than 0.", player);
      local plr = IsNum( params[0] ) ? FindPlayer( params[0].tointeger() ) : FindPlayer( params[0] );
      if( !plr ) return MessagePlayer( "Wrong player.", player );
      else plr.Health = params[1].tointeger();
}
   
}

else if ( cmd == "setweather" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) return MessagePlayer( "[#ff0000]Usage: setweather [Weather/ID]", player );
if ( !IsNum(text) ) return MessagePlayer( "[#ff0000]Use integers/numbers", player );
SetWeather( text.tointeger() );
Message( "[#4acc0a] Admin "+ player.Name +" Set The Weather To "+GetWeatherName());
return;
}

}

  else if (cmd == "ann")
    {
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
        if (!text) return ClientMessage("[#FF0000][Syntax]/ann <ID> <All/Nick/ID> <Text>", player, 0, 0, 0);
        local v = split(text, " ");
        if (v.len() < 3) return ClientMessage("[#FF0000][Syntax]/ann <ID> <All/Nick/ID> <Text>", player, 0, 0, 0);
        if (v[1].tolower() == "all") AnnounceAll(text.slice(v[0].len() + v[1].len() + 2), v[0].tointeger());
        else Announce(text.slice(v[0].len() + v[1].len() + 2), FindPlayer(v[1]), v[0].tointeger());
    }
        else MessagePlayer( "[#FF0000] You're not allowed to use this command. " , player )
}

   if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{

else if( cmd == "setarmour" )
{
if ( stats[player.ID].Level < 4 )
{
      if( !text )
      MessagePlayer("Use /setarmour <plr> <hp>", player);
      local params = split( text, " " );
      if( params.len() < 1 ) MessagePlayer("Wrong no. of parameters.", player);
      else if( !IsNum( params[1] ) ) return MessagePlayer("Armour must be an integer.", player);
      else if( params[1].tointeger() > 100 || params[1].tointeger() < 0 ) return MessagePlayer("It can't be more than 100 or less than 0.", player);
      local plr = IsNum( params[0] ) ? FindPlayer( params[0].tointeger() ) : FindPlayer( params[0] );
      if( !plr ) return MessagePlayer( "Wrong player.", player );
      else plr.Armour = params[1].tointeger();
}

}


else if ( cmd == "drown" )
{
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
plr.Pos = Vector( -761.1595 -340.6097 9.9061 );
Message( "[#FFbb00]** Admin " + player.Name + " Drowned " + plr.Name + " for Reason " + reason );
}
}
}
       
}

else if ( cmd == "get" )
{
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
plr.Pos = player.Pos;
Message( "[#FFbb00]** Admin " + player.Name + " Bring " + plr.Name + " for Reason " + reason );
}
}
}
       
}

else if ( cmd == "freeze" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( plr.IsFrozen ) MessagePlayer( "[#FF0000]The Player is already Freezed", player );
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
plr.IsFrozen = true;
Message( "[#FFbb00]** Admin " + player.Name + " has Frozen " + plr.Name + " for Reason " + reason );
}
}
}
       
}

else if ( cmd == "unfreeze" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "[#FF0000]Syntax, /" + cmd + " <Nick/ID>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( !plr.IsFrozen ) MessagePlayer( "[#FF0000]" + plr.Name + " is not Freezed.", player);
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
plr.IsFrozen = false;
Message( "[#FFBB00]>> Admin " + player + " has un-freezed " + plr.Name );
}
}
}

}

/// You need add any spam system when player spam will be muted add it from kakan

else if ( cmd == "mute" )
{
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
   IsMuted[ player.ID ] = false;
Message( "[#FFbb00]** Admin " + player.Name + " Muted " + plr.Name + " for Reason " + reason );
}
}
}
       
}

else if ( cmd == "unmute" )
{
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
   IsMuted[ player.ID ] = false;
Message( "[#FFbb00]** Admin " + player.Name + " unMuted " + plr.Name + " for Reason " + reason );
}
}
}
 
}

///////////// All


else if ( cmd == "muteall" )
{
if ( stats[ player.ID ].level < 5 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );
IsMuted[ p.ID ] = true;
Message( "[#FFbb00]** Admin " + player.Name + " Muted All Players ");
}
}
}
}




else if ( cmd == "unmuteall" )
{
if ( stats[ player.ID ].level < 5 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );

   IsMuted[ p.ID ] = false;
Message( "[#FFbb00]** Admin " + player.Name + " UnMuted All Players ");
}
}

}

}

else if ( cmd == "freezeall" )
{
if ( stats[ player.ID ].level < 5 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( plr.IsFrozen ) MessagePlayer( "[#FF0000]The Player is already Freezed", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );

p.IsFrozen = true;
Message( "[#FFbb00]** Admin " + player.Name + " Freeze All Players ");
}
}

}

}

else if ( cmd == "unfreezeall" )
{
if ( stats[ player.ID ].level < 5 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( plr.IsFrozen ) MessagePlayer( "[#FF0000]The Player is already Freezed", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );

p.IsFrozen = false;
Message( "[#FFbb00]** Admin " + player.Name + " UnFreezed All Players ");
}
}

}

}

else if ( cmd == "drownall" )
{
if ( stats[ player.ID ].level < 5 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{

local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );

p.Pos = Vector( -761.1595 -340.6097 9.9061 );
Message( "[#FFbb00]** Admin " + player.Name + " Drowned All Players ");

}
}
}

}

else if ( cmd == "getall" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );
p.Pos == player.Pos;
Message( "[#FFbb00]** Admin " + player.Name + " Bring All Players To Him ");
}
}
}


}


else if ( cmd == "healall" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );
p.Health == 100;
Message( "[#FFbb00]** Admin " + player.Name + " Set 100% HP To all Players ");
}

}
}
 
}

else if ( cmd == "armourall" )
{
if ( stats[ player.ID ].level < 5 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{

local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );
p.Armour == 100;
Message( "[#FFbb00]** Admin " + player.Name + " Set 100% Armour To all Players ");

}
}
}

}

else if ( cmd == "kickall" )
{
if ( stats[ player.ID ].level < 6 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{

local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );
KickPlayer( p );
Message( "[#FFbb00]** Admin " + player.Name + " Kicked all Players From SERVER BYE BYE BABIES ");
}
}

}
       
}

                   
[/noae][/noae]

I Think all fixed

Mahmoud Tornado

Quote from: rww on Sep 09, 2018, 06:41 PMelse if ( cmd == "drownall" )
{
if ( stats[player.ID].Level < 4 )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
p = FindPlayer( i );

p.Pos = Vector( -761.1595 -340.6097 9.9061 );
Message( "[#FFbb00]** Admin " + player.Name + " Drowned All Players ");
}
}
}
}
        else MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player )
}

lol? why /drownall [plr name] [reason] for drown all? why not /drownall [reason]?

I can see that there's no reason in the command also. xD

=RK=MarineForce

#9
[noae][noae]//////////////////////////////////////////////////////////////////////////////////////////////////////

else if ( cmd == "settime" )
    {
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
     if ( !text ) MessagePlayer( "[#ff0000]Correct syntax : /settime <hr> <min>", player );
      else if ( split(text, " ").len() < 2) return MessagePlayer("[#ff0000]Correct syntax : /settime <hr> <min>", player )
      else
   {
   local a = split(text, " ");
      if ( !IsNum( a[0] )) MessagePlayer( "[#ffbb00]Format: /settime <hr> <min>", player );
      else if ( !IsNum( a[1] )) MessagePlayer( "[#ffbb00]Format: /settime <hr> <min>", player );
      else SetTime( a[0].tointeger(), a[1].tointeger() ) ; 
      }
   }
      }

else if( cmd == "sethp" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
      if( !text )
      MessagePlayer("Use /sethp <plr> <hp>", player);
      local params = split( text, " " );
      if( params.len() < 1 ) MessagePlayer("Wrong no. of parameters.", player);
      else if( !IsNum( params[1] ) ) return MessagePlayer("HP must be an integer.", player);
      else if( params[1].tointeger() > 100 || params[1].tointeger() < 0 ) return MessagePlayer("It can't be more than 100 or less than 0.", player);
      local plr = IsNum( params[0] ) ? FindPlayer( params[0].tointeger() ) : FindPlayer( params[0] );
      if( !plr ) return MessagePlayer( "Wrong player.", player );
      else plr.Health = params[1].tointeger();
     Message("Admin [#FF0000] " + player.Name + " [#FF0000] Set Health [#0000cc]" + plr.Name + "  [#ccff00]  " + player.Health + " ");
}
   
}

else if ( cmd == "setweather" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) return MessagePlayer( "[#ff0000]Usage: setweather [Weather/ID]", player );
if ( !IsNum(text) ) return MessagePlayer( "[#ff0000]Use integers/numbers", player );
SetWeather( text.tointeger() );
Message( "[#ff0000] Admin "+ player.Name +" Set The Weather To "+GetWeatherName());
return;
}

}

  else if (cmd == "ann")
    {
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
        if (!text) return ClientMessage("[#FF0000][Syntax]/ann <ID> <All/Nick/ID> <Text>", player, 0, 0, 0);
        local v = split(text, " ");
        if (v.len() < 3) return ClientMessage("[#FF0000][Syntax]/ann <ID> <All/Nick/ID> <Text>", player, 0, 0, 0);
        if (v[1].tolower() == "all") AnnounceAll(text.slice(v[0].len() + v[1].len() + 2), v[0].tointeger());
        else Announce(text.slice(v[0].len() + v[1].len() + 2), FindPlayer(v[1]), v[0].tointeger());
    }
       
}

 
else if( cmd == "setarmour" )
{
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
      if( !text )
      MessagePlayer("Use /setarmour <plr> <hp>", player);
      local params = split( text, " " );
      if( params.len() < 1 ) MessagePlayer("Wrong no. of parameters.", player);
      else if( !IsNum( params[1] ) ) return MessagePlayer("Armour must be an integer.", player);
      else if( params[1].tointeger() > 100 || params[1].tointeger() < 0 ) return MessagePlayer("It can't be more than 100 or less than 0.", player);
      local plr = IsNum( params[0] ) ? FindPlayer( params[0].tointeger() ) : FindPlayer( params[0] );
      if( !plr ) return MessagePlayer( "Wrong player.", player );
      else plr.Armour = params[1].tointeger();
      Message("Admin [#0000FF] " + player.Name + " [#FFFF00] Set Arm [#0000ff] of " + plr.Name + "  [#ccff00]  " + player.Armour + " ");
}

}


else if ( cmd == "drown" )
{
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
plr.Pos = Vector( -1270.09, -365.934, 5.14675 );
Message( "[#FFbb00]** Admin " + player.Name + " Drowned " + plr.Name + " for Reason " + reason );
}
}
}
       
}

else if ( cmd == "disarm" )
{
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
plr.Disarm();
Message( "[#FF0000]** Admin " + player.Name + " Disarmed " + plr.Name + " for Reason " + reason );
}
}
}
       
}

else if ( cmd == "get" )
{
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
plr.Pos = player.Pos;
Message( "[#FF0000]** Admin " + player.Name + " Bring " + plr.Name + " for Reason " + reason );
}
}
}
       
}

else if ( cmd == "freeze" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( plr.IsFrozen ) MessagePlayer( "[#FF0000]The Player is already Freezed", player );
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
plr.IsFrozen = true;
Message( "[#FF000]** Admin " + player.Name + " has Frozen " + plr.Name + " for Reason " + reason );
}
}
}
       
}

else if ( cmd == "unfreeze" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "[#FF0000]Syntax, /" + cmd + " <Nick/ID>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else if ( !plr.IsFrozen ) MessagePlayer( "[#FF0000]" + plr.Name + " is not Freezed.", player);
else if ( !plr.IsSpawned ) MessagePlayer( "[#FF0000]The Player hasn't spawned yet..", player );
else {
plr.IsFrozen = false;
Message( "[#FF0000]>> Admin " + player + " has un-freezed " + plr.Name );
}
}
}

}

/// You need add any spam system when player spam will be muted add it from kakan

else if ( cmd == "mute" )
{
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
   IsMuted[ player.ID ] = true;
Message( "[#FF0000]** Admin " + player.Name + " Muted " + plr.Name + " for Reason " + reason );
}
}
}
       
}

else if ( cmd == "unmute" )
{
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
   IsMuted[ player.ID ] = false;
Message( "[#FF0000]** Admin " + player.Name + " unMuted " + plr.Name + " for Reason " + reason );
}
}
}
 
}

else if ( cmd == "eject" )
{
if ( stats[ player.ID ].level < 4 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
plr.Eject();
Message( "[#FF0000]** Admin " + player.Name + " Ejected " + plr.Name + " for Reason " + reason );
}
}
}
 
}

else if ( cmd == "kick" )
{
if ( stats[ player.ID ].level < 3 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
else {
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
KickPlayer( plr );
Message( "[#FF0000]** Admin " + player.Name + " Kicked " + plr.Name + " for Reason " + reason );
}
}
}
 
}

if ( cmd == "kickall" )
        {
if ( stats[ player.ID ].level < 6 ) MessagePlayer( "[#008000]**pm >> [#FF0000]You are not authorized to use this command.", player );
else{
Message( "[#ffffff]** Admin " + player.Name+  " [#FF0000]Kicked All Players From Server");
for (local i=0; i<GetMaxPlayers(); i++)
{
local p=FindPlayer(i);
if(p)
{
KickPlayer( p );
}
}
}
}

if ( cmd == "drownall" )
        {
if ( stats[ player.ID ].level < 5 ) MessagePlayer( "[#008000]**pm >> [#FF0000]You are not authorized to use this command.", player );
else{
Message( "[#ffffff]** Admin " + player.Name+  " [#FF0000]Drowned All Players");
for (local i=0; i<GetMaxPlayers(); i++)
{
local p=FindPlayer(i);
if(p)
{
p.Pos = Vector( -1273.38, -341.398, 5.2758 );
}
}
}
}


if ( cmd == "freezeall" )
        {
if ( stats[ player.ID ].level < 5 ) MessagePlayer( "[#008000]**pm >> [#FF0000]You are not authorized to use this command.", player );
else{
Message( "[#ffffff]** Admin " + player.Name+  " [#FF0000] Freezed All Players");
for (local i=0; i<GetMaxPlayers(); i++)
{
local p=FindPlayer(i);
if(p)
{
p.IsFrozen = true;
}
}
}
}


if ( cmd == "unfreezeall" )
        {
if ( stats[ player.ID ].level < 5 ) MessagePlayer( "[#008000]**pm >> [#FF0000]You are not authorized to use this command.", player );
else{
Message( "[#ffffff]** Admin " + player.Name+  " [#FF0000]Unfreezeall");
for (local i=0; i<GetMaxPlayers(); i++)
{
local p=FindPlayer(i);
if(p)
{
p.IsFrozen = false;
}
}
}
}


if ( cmd == "muteall" )
        {
if ( stats[ player.ID ].level < 6 ) MessagePlayer( "[#008000]**pm >> [#FF0000]You are not authorized to use this command.", player );
else{
Message( "[#ffffff]** Admin " + player.Name+  " [#FF0000]Muted All Players");
for (local i=0; i<GetMaxPlayers(); i++)
{
local p=FindPlayer(i);
if(p)
{
IsMuted[p.ID] = true;
}
}
}
}

if ( cmd == "unmuteall" )
        {
if ( stats[ player.ID ].level < 5 ) MessagePlayer( "[#008000]**pm >> [#FF0000]You are not authorized to use this command.", player );
else{
Message( "[#ffffff]** Admin " + player.Name+  " [#FF0000]Un Muted All Players");
for (local i=0; i<GetMaxPlayers(); i++)
{
local p=FindPlayer(i);
if(p)
{
IsMuted[p.ID] = false;
}
}
}
}


if ( cmd == "getall" )
        {
if ( stats[ player.ID ].level < 5 ) MessagePlayer( "[#008000]**pm >> [#FF0000]You are not authorized to use this command.", player );
else{
Message( "[#ffffff]** Admin " + player.Name+  " [#FF0000]Bring All Players to Him Location");
for (local i=0; i<GetMaxPlayers(); i++)
{
local p=FindPlayer(i);
if(p)
{
p.Pos == player.Pos;
}
}
}
}


if ( cmd == "healall" )
        {
if ( stats[ player.ID ].level < 5 ) MessagePlayer( "[#008000]**pm >> [#FF0000]You are not authorized to use this command.", player );
else{
Message( "[#ffffff]** Admin " + player.Name+  " [#FF0000]Set 99% Health To All Players");
for (local i=0; i<GetMaxPlayers(); i++)
{
local p=FindPlayer(i);
if(p)
{
p.Health = 99;
}
}
}
}

if ( cmd == "armourall" )
        {
if ( stats[ player.ID ].level < 5 ) MessagePlayer( "[#008000]**pm >> [#FF0000]You are not authorized to use this command.", player );
else{
Message( "[#ffffff]** Admin " + player.Name+  " [#FF0000]Set 99% Armour To All Players");
for (local i=0; i<GetMaxPlayers(); i++)
{
local p=FindPlayer(i);
if(p)
{
p.Armour = 99;
}
}
}
}

if ( cmd == "ejectall" )
        {
if ( stats[ player.ID ].level < 5 ) MessagePlayer( "[#008000]**pm >> [#FF0000]You are not authorized to use this command.", player );
else{
Message( "[#ffffff]** Admin " + player.Name+  " [#FF0000]Ejected All Players");
for (local i=0; i<GetMaxPlayers(); i++)
{
local p=FindPlayer(i);
if(p)
{
p.Eject();
}
}
}
}


if ( cmd == "disarmall" )
        {
if ( stats[ player.ID ].level < 5 ) MessagePlayer( "[#008000]**pm >> [#FF0000]You are not authorized to use this command.", player );
else{
Message( "[#ffffff]** Admin " + player.Name+  " [#FF0000]Disarmed All Players");
for (local i=0; i<GetMaxPlayers(); i++)
{
local p=FindPlayer(i);
if(p)
{
p.Disarm();
}
}
}
}
[/noae][/noae]

Fixed.

@Mahmoud Tornado how can i add Top Killers and Top Spree's

umar4911

marine? Fix that drownall cmd
else if ( cmd == "drownall" )
{
if (!stats[player.ID].Level < 4 ) MessagePlayer( "[#FF0000]You're not allowed to use this command. " , player );
else
{
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
local p = FindPlayer( i );
p.Pos = Vector( -761.1595 -340.6097 9.9061 );
}
Message( "[#FFbb00]** Admin " + player.Name + " Drowned All Players ");
}
}
RT Member | Asian City Scripter | CTB Contributor | VKs Contributor | European City Contributor | EAD Scripter

=RK=MarineForce

else if ( cmd == "sm" )
{
if ( stats[ player.ID ].level < 2 ) PrivMessage( player, "Error: You are not authorized to use this command." );
else{
Message("[#ff0000](" + levelTag( player ) + "[#ff0000]) [#FFD700]"+player.Name+":[#ffffff] " + text + " ");
}
}

umar its problem in Pos change him Pos location i hope it will work if not :D

if ( cmd == "drownall" )
        {
if ( stats[ player.ID ].level < 5 ) MessagePlayer( "[#008000]**pm >> [#FF0000]You are not authorized to use this command.", player );
else{
Message( "[#ffffff]** Admin " + player.Name+  " [#FF0000]Drowned All Players");
for (local i=0; i<GetMaxPlayers(); i++)
{
local p=FindPlayer(i);
if(p)
{
p.Pos = Vector( -1273.38, -341.398, 5.2758 );
}
}
}
}

p.Pos = Vector( -1273.38, -341.398, 5.2758 );

=RK=MarineForce

the setlevel was by kelvin so i made a new once.

else if ( cmd == "setlevel")
 {
 Message("(/CMDS)[#00cc00]*** /mod , /an , /han , /man , /own ");
 }
   
   
 else if ( cmd == "mod")
 {
  if ( pstats[ player.ID ].Level < 7 ) PrivMessage( player, "Error: You are not authorized to use this command." );
  else if ( !text ) PrivMessage( player, format( "Error: Use /%s <Nick/ID>", cmd ) );
  else
  {
   local plr = GetPlayer( GetTok( text, " ", 1 ) );
   if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
   else{
   pstats[ plr.ID ].Level = 3;
   Message("[#00CC00]*** [" + plr.Name + "] is now [MODERATOR] by ["+player.Name+"] ");
   }
   }
   }

else if ( cmd == "an")
 {
  if ( pstats[ player.ID ].Level < 7 ) PrivMessage( player, "Error: You are not authorized to use this command." );
  else if ( !text ) PrivMessage( player, format( "Error: Use /%s <Nick/ID>", cmd ) );
  else
  {
   local plr = GetPlayer( GetTok( text, " ", 1 ) );
   if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
   else{
   pstats[ plr.ID ].Level = 4;
   Message("[#00CC00]*** [" + plr.Name + "] is now [Admin] by ["+player.Name+"] ");
   }
   }
   }
   
    else if ( cmd == "han")
 {
  if ( pstats[ player.ID ].Level < 7 ) PrivMessage( player, "Error: You are not authorized to use this command." );
  else if ( !text ) PrivMessage( player, format( "Error: Use /%s <Nick/ID>", cmd ) );
  else
  {
   local plr = GetPlayer( GetTok( text, " ", 1 ) );
   if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
   else{
   pstats[ plr.ID ].Level = 5;
   Message("[#00CC00]*** [" + plr.Name + "] is now [Head-Admin] by ["+player.Name+"] ");
   }
   }
   }
    else if ( cmd == "man")
 {
  if ( pstats[ player.ID ].Level < 7 ) PrivMessage( player, "Error: You are not authorized to use this command." );
  else if ( !text ) PrivMessage( player, format( "Error: Use /%s <Nick/ID>", cmd ) );
  else
  {
   local plr = GetPlayer( GetTok( text, " ", 1 ) );
   if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
   else{
   pstats[ plr.ID ].Level = 6;
   Message("[#00CC00]*** [" + plr.Name + "] is now [Manager] by ["+player.Name+"] ");
   }
   }
   }
    else if ( cmd == "own")
 {
  if ( pstats[ player.ID ].Level < 7 ) PrivMessage( player, "Error: You are not authorized to use this command." );
  else if ( !text ) PrivMessage( player, format( "Error: Use /%s <Nick/ID>", cmd ) );
  else
  {
   local plr = GetPlayer( GetTok( text, " ", 1 ) );
   if ( !plr ) MessagePlayer( "[#FF0000]Unknown Player..", player );
   else{
   pstats[ plr.ID ].Level = 7;
   Message("[#00CC00]*** [" + plr.Name + "] is now [Owner] by ["+player.Name+"] ");
   }
   }
   }