[ GameMode ] ADM Script v1.0

MacTavish

  • Hero Member
  • Nicks( Kusanagi, Beztone, RATHORE )
  • Posts: 809
[ GameMode ] Re: ADM Script v1.0
« Reply #15, on June 12th, 2015, 06:55 PM »Last edited on June 12th, 2015, 06:58 PM
Quote from Omair on June 12th, 2015, 06:43 PM
I get this error.
---------------------------
server.exe - Entry Point Not Found
---------------------------
The procedure entry point InitializeConditionVariable could not be located in the dynamic link library KERNEL32.dll.
---------------------------
OK   
---------------------------
Which OS and ServicePack are you using?

If you are using Xp Sp2 then try my suggestion that i posted Here

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

Stormeus

  • VC:MP Developer
  • oh god how did i get here im not good w computer
  • Posts: 1,128
[ GameMode ] Re: ADM Script v1.0
« Reply #16, on June 12th, 2015, 06:57 PM »
Quote from Omair on June 12th, 2015, 06:43 PM
I get this error.
---------------------------
server.exe - Entry Point Not Found
---------------------------
The procedure entry point InitializeConditionVariable could not be located in the dynamic link library KERNEL32.dll.
---------------------------
OK   
---------------------------
Try redownloading the latest server. Seems you're on XP and something was compiled for Vista and higher.

Speaking of which, you should upgrade to at least Vista or 7 if this is the case.

asdsa

  • Newbie
  • Posts: 3
[ GameMode ] Re: ADM Script v1.0
« Reply #17, on June 12th, 2015, 07:10 PM »
I'm using windows XP Service pack 3.

luchgox

  • Full Member
  • Posts: 144
[ GameMode ] Re: ADM Script v1.0
« Reply #18, on December 5th, 2015, 09:45 PM »
Can i use this script on my server?
And please tell me how to set admin.
Strength does not come from wining.Your struggles develop your strengths.

Cool

  • Hero Member
  • Posts: 719
[ GameMode ] Re: ADM Script v1.0
« Reply #19, on December 6th, 2015, 02:03 PM »
Nice bump
from database goto accounts table in database and change your level to 5 or any you want

luchgox

  • Full Member
  • Posts: 144
[ GameMode ] Re: ADM Script v1.0
« Reply #20, on December 6th, 2015, 04:13 PM »Last edited on December 6th, 2015, 04:15 PM



there was 3 players in my server and i use command /admin its showing all players admin like this Admins online ;3
Its not showing admins name and there are no cmds  for admin what i do to for make that work?
 And how to remove this logo ? you can see logo in pic
Strength does not come from wining.Your struggles develop your strengths.

jayant

  • Full Member
  • #MOMO-CS
  • Posts: 163
[ GameMode ] Re: ADM Script v1.0
« Reply #21, on December 6th, 2015, 04:43 PM »
In your server files,goto store->sprite.Search for this logo and remove a code from your script.

The admin cmd must be there in any file..Search it and post here.

luchgox

  • Full Member
  • Posts: 144
[ GameMode ] Re: ADM Script v1.0
« Reply #22, on December 6th, 2015, 05:03 PM »
Code: [Select]
function AdminCmds( player, command, text )
{
    local cmd = command.tolower();

if ( cmd == "exec" )
{
    if ( stats[ player.ID ].Level < 5 ) MessagePlayer( "Error - You don't have access to it.", player);
else if( !text ) MessagePlayer( "Error - Syntax: /exec <Squirrel code>", player);
else
{
try
{
local script = compilestring( text );
script();
}
catch(e) MessagePlayer( "Error: " + e, player);
}
}

else if ( cmd == "kick" )
{
   if ( stats[ player.ID ].Level < 3 ) MessagePlayer( "Error - You don't have access to it.", player);
   else if ( !text ) MessagePlayer( "Error - Syntax: /kick <player> <reason>", player);
   else
   {
     local plr = GetPlayer( GetTok( text, " ", 1 ) );
     if ( !plr ) MessagePlayer( "Error - Unknown player.", player);
     else
     {
       local reason = GetTok( text, " ", 2 );
   if ( !reason ) reason = "None";
   EMessage( "" + plr.Name + " have been kicked. Reason: " + reason + "" );
   plr.Kick();
     }
   }
}

else if ( cmd == "ban" )
{
   if ( stats[ player.ID ].Level < 4 ) MessagePlayer( "Error - You don't have access to it.", player);
   else if ( !text ) MessagePlayer( "Error - Syntax: /ban <player> <reason>", player);
   else
   {
     local plr = GetPlayer( GetTok( text, " ", 1 ) );
     if ( !plr ) MessagePlayer( "Error - Unknown player.", player);
     else
     {
       local reason = GetTok( text, " ", 2 );
   if ( !reason ) reason = "None";
   Ban( plr, reason );
     }
   }
}

else if ( cmd == "unban" )
{
   if ( stats[ player.ID ].Level < 4 ) MessagePlayer( "Error - You don't have access to it.", player);
   else if ( !text ) MessagePlayer( "Error - Syntax: /unban <player name>", player);
   else
   {
     local query = QuerySQL( sqliteDB, "SELECT * FROM Bans WHERE Name='" + text + "'" );
if( GetSQLColumnData( query, 0 ) ) Unban( text );
else MessagePlayer( "This nick isn't banned. Please type the banned nick.", player );
FreeSQLQuery( query );
   }
}

else if ( cmd == "alias" )
{
   if ( stats[ player.ID ].Level < 3 ) MessagePlayer( "Error - You don't have access to it.", player);
   else if ( !text ) MessagePlayer( "Error - Syntax: /alias <player>", player);
   else
   {
     local plr = GetPlayer( GetTok( text, " ", 1 ) );
     if ( !plr ) MessagePlayer( "Error - Unknown player.", player);
     else MessagePlayer( "" + plr.Name + "(" + plr.IP + ")'s aliases: " + GetAlias( plr.IP ) + ".", player );
   }
}

else if ( cmd == "salias" )
{
   if ( stats[ player.ID ].Level < 3 ) MessagePlayer( "Error - You don't have access to it.", player);
   else if ( !text ) MessagePlayer( "Error - Syntax: /salias <subnet>", player);
   else
   {
     local ip = split(text, "."), length = NumTok(text, ".").tointeger();
if (  length < 2 ) PrivMessage( player, "Invalid IP" );
     else if (!IsNum( ip[0] )) MessagePlayer( "Error - Unknown IP.", player);
else if (!IsNum( ip[1] )) MessagePlayer( "Error - Unknown IP.", player);
     else MessagePlayer( "Subnet(" + text + ")'s aliases: " + GetAlias( text ) + ".", player );
   }
}

else if ( cmd == "ip" )
    {
    if ( stats[ player.ID ].Level < 3 ) MessagePlayer( "Error - You don't have access to it.", player);
    else if ( !text ) MessagePlayer( "Error - Syntax: /ip <player/nick>", player);
    else
    {
    local query, _ip, plr;
        plr = GetPlayer( text );
            if ( plr ) MessagePlayer( "IP: " + plr.IP, player );
            else
{
query = QuerySQL( sqliteDB, "SELECT LastUsedIP FROM Accounts WHERE Name='" + text.tolower() + "'" );
            if( GetSQLColumnData( query, 0 ) ) _ip = GGetSQLColumnData( query, 0 );
else _ip = "Unknown";
    MessagePlayer( "" + text + "'s IP: " + _ip, player );
PrivMessage( player, "You may get the alias list by /salias <subnet>" );
FreeSQLQuery( query );
}
    }
    }

else if ( cmd == "acmds" )
    {
         PrivMessage( player, "Admin Commands: (/) exec, kick, ban, alias, salias, ip, unban" );
    }
}
Strength does not come from wining.Your struggles develop your strengths.

KAKAN

  • Wiki Contributor
  • Posts: 3,346
[ GameMode ] Re: ADM Script v1.0
« Reply #23, on December 6th, 2015, 05:39 PM »
lol nice one xD
You can contact me using Discord, at Developers.CPP( check off-board to find the invite link )
Github: https://github.com/theKAKAN

luchgox

  • Full Member
  • Posts: 144
[ GameMode ] Re: ADM Script v1.0
« Reply #24, on December 6th, 2015, 06:13 PM »
This is my my admin.nut file but how its work i didn't do onscriptload becuz i dont know how i make .

Code: [Select]
function AdminCmds( player, command, text )
{
    local cmd = command.tolower();
 
 if ( cmd == "exec" )
 {
     if ( stats[ player.ID ].Level < 5 ) MessagePlayer( "Error - You don't have access to it.", player);
  else if( !text ) MessagePlayer( "Error - Syntax: /exec <Squirrel code>", player);
  else
  {
   try
   {
    local script = compilestring( text );
    script();
   }
   catch(e) MessagePlayer( "Error: " + e, player);
  }
 }
 
 else if ( cmd == "kick" )
 {
    if ( stats[ player.ID ].Level < 3 ) MessagePlayer( "Error - You don't have access to it.", player);
    else if ( !text ) MessagePlayer( "Error - Syntax: /kick <player> <reason>", player);
    else
    {
      local plr = GetPlayer( GetTok( text, " ", 1 ) );
      if ( !plr ) MessagePlayer( "Error - Unknown player.", player);
      else
      {
        local reason = GetTok( text, " ", 2 );
     if ( !reason ) reason = "None";
     EMessage( "" + plr.Name + " have been kicked. Reason: " + reason + "" );
     plr.Kick();
      }
    }
 }
 
 else if ( cmd == "ban" )
 {
    if ( stats[ player.ID ].Level < 4 ) MessagePlayer( "Error - You don't have access to it.", player);
    else if ( !text ) MessagePlayer( "Error - Syntax: /ban <player> <reason>", player);
    else
    {
      local plr = GetPlayer( GetTok( text, " ", 1 ) );
      if ( !plr ) MessagePlayer( "Error - Unknown player.", player);
      else
      {
        local reason = GetTok( text, " ", 2 );
     if ( !reason ) reason = "None";
     Ban( plr, reason );
      }
    }
 }
 
 else if ( cmd == "unban" )
 {
    if ( stats[ player.ID ].Level < 4 ) MessagePlayer( "Error - You don't have access to it.", player);
    else if ( !text ) MessagePlayer( "Error - Syntax: /unban <player name>", player);
    else
    { 
      local query = QuerySQL( sqliteDB, "SELECT * FROM Bans WHERE Name='" + text + "'" );
   if( GetSQLColumnData( query, 0 ) ) Unban( text );
   else MessagePlayer( "This nick isn't banned. Please type the banned nick.", player );
   FreeSQLQuery( query );
    }
 }
 
 else if ( cmd == "alias" )
 {
    if ( stats[ player.ID ].Level < 3 ) MessagePlayer( "Error - You don't have access to it.", player);
    else if ( !text ) MessagePlayer( "Error - Syntax: /alias <player>", player);
    else
    {
      local plr = GetPlayer( GetTok( text, " ", 1 ) );
      if ( !plr ) MessagePlayer( "Error - Unknown player.", player);
      else MessagePlayer( "" + plr.Name + "(" + plr.IP + ")'s aliases: " + GetAlias( plr.IP ) + ".", player );
    }
 }
 
 else if ( cmd == "salias" )
 {
    if ( stats[ player.ID ].Level < 3 ) MessagePlayer( "Error - You don't have access to it.", player);
    else if ( !text ) MessagePlayer( "Error - Syntax: /salias <subnet>", player);
    else
    {
      local ip = split(text, "."), length = NumTok(text, ".").tointeger();
   if (  length < 2 ) PrivMessage( player, "Invalid IP" );
      else if (!IsNum( ip[0] )) MessagePlayer( "Error - Unknown IP.", player);
   else if (!IsNum( ip[1] )) MessagePlayer( "Error - Unknown IP.", player);
      else MessagePlayer( "Subnet(" + text + ")'s aliases: " + GetAlias( text ) + ".", player );
    }
 }
 
 else if ( cmd == "ip" )
    {
     if ( stats[ player.ID ].Level < 3 ) MessagePlayer( "Error - You don't have access to it.", player);
     else if ( !text ) MessagePlayer( "Error - Syntax: /ip <player/nick>", player);
     else
     {
      local query, _ip, plr;
         plr = GetPlayer( text );
            if ( plr ) MessagePlayer( "IP: " + plr.IP, player );
            else
   {
    query = QuerySQL( sqliteDB, "SELECT LastUsedIP FROM Accounts WHERE Name='" + text.tolower() + "'" );
             if( GetSQLColumnData( query, 0 ) ) _ip = GGetSQLColumnData( query, 0 );
    else _ip = "Unknown";
       MessagePlayer( "" + text + "'s IP: " + _ip, player );
    PrivMessage( player, "You may get the alias list by /salias <subnet>" );
    FreeSQLQuery( query );
   }
     }
    }
 
 else if ( cmd == "acmds" )
    {
         PrivMessage( player, "Admin Commands: (/) exec, kick, ban, alias, salias, ip, unban" );
    }
}
Strength does not come from wining.Your struggles develop your strengths.

KAKAN

  • Wiki Contributor
  • Posts: 3,346
[ GameMode ] Re: ADM Script v1.0
« Reply #25, on December 6th, 2015, 06:17 PM »
Stick to playing.
@jayant meant to show your admin "cmd", not your shitty admin.nut( or butt whatever )
You can contact me using Discord, at Developers.CPP( check off-board to find the invite link )
Github: https://github.com/theKAKAN

Human

  • Newbie
  • Posts: 41
[ GameMode ] Re: ADM Script v1.0
« Reply #26, on March 10th, 2016, 03:25 PM »
Nice script

Rohanaj60

  • Newbie
  • Posts: 12

kennedyarz

  • Sr. Member
  • Making American Great Again
  • Posts: 334
[ GameMode ] Re: ADM Script v1.0
« Reply #28, on March 19th, 2016, 01:20 PM »
funcion register is error

RDXing_KR

  • Jr. Member
  • Don't Look here. ah U did ..
  • Posts: 72
[ GameMode ] Re: ADM Script v1.0
« Reply #29, on April 2nd, 2016, 10:54 AM »
hmmm! can i add Announcment system
and can i get how to be an admin??