[ GameMode ] ADM Script v1.0

Started by rObInX, Mar 03, 2015, 03:04 PM

Previous topic - Next topic

MacTavish

#15
Quote from: Omair on Jun 12, 2015, 05:43 PMI 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

Quote from: Omair on Jun 12, 2015, 05:43 PMI 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

I'm using windows XP Service pack 3.

luchgox

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

Nice bump
from database goto accounts table in database and change your level to 5 or any you want

luchgox

#20



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

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

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

oh no

luchgox

This is my my admin.nut file but how its work i didn't do onscriptload becuz i dont know how i make .

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

Stick to playing.
@jayant meant to show your admin "cmd", not your shitty admin.nut( or butt whatever )
oh no

Human



kennedyarz


RDXing_KR

hmmm! can i add Announcment system
and can i get how to be an admin??