Basic Admin System

Rardodus Bruise

  • Newbie
  • The Slasto Family
  • Posts: 17
Basic Admin System
«  »
Hello Guys, This is a basic admin system.. You will like the code in it, It has all the important commands that a basic admin system should have and i think so it would help you..
First you will have to download this and put this file in the scripts folder.
Link :

Secondly, You have to do some changes in the main.nut :
Code: [Select]
function onScriptLoad()
{
dofile("scripts/admins.nut");
}
This system have some commands like :
Commands : ban, unban, kick, disarm, eject, ann, smallann, freeze, unfreeze, fps, ping, uid, ip, player, setweather, spec, achat, bring.

Saiyan Attack

  • Jr. Member
  • [KoF]Killer
  • Posts: 67
Re: Basic Admin System
« Reply #1,  »Last edited
Now you call this topic a as basic admin system which is made by you !!

Code: [Select]
/* add this line on top on your main.nut */
AdminPerson <- [ "rardodus_bruise" ];

// onPlayerCommand
if(cmd == "addadmin") {
if(!text) MessagePlayer("Wrong Syntax, /"+cmd+" <Nick/ID>",player);
else if ( !GetAdminName(player) ) PrivMessage(player, "** Error, You're not authorized in admin-list" );
else {
local plr = ( !IsNum( text ) ? FindPlayer( text ) : FindPlayer( text.tointeger() ) );
if(!plr) PrivMessage(player,"** Error, the user you're trying to find is not available!");
else if(GetAdminName(plr)) PrivMessage(player, "** Error, this user is already available in admin-list!" );
else {
AdminPerson.push(plr.Name.tolower());
Message(plr.Name+" is successfully Added in admin-list!");
}
}
}

else if(cmd == "deleteadmin") {
if(!text) MessagePlayer("Wrong Syntax, /"+cmd+" <Nick/ID>",player);
else if ( !GetAdminName(player) ) PrivMessage(player,"** Error, You're not authorized in admin-list");
else {
local plr = ( !IsNum( text ) ? FindPlayer( text ) : FindPlayer( text.tointeger() ) );
if(!plr) PrivMessage(player,"** Error, the user you're trying to find is not available!");
else if(!GetAdminName(plr)) PrivMessage(player,"** Error, this user doesn't available in admin-list!");
else {
AdminPerson.remove(AdminPerson.find(plr.Name.tolower()));
Message(plr.Name+" is successfully removed in admin-list!");
}
}
}

function GetAdminName(player) {
local key = AdminPerson.find(player.Name.tolower());
if(key != null) return AdminPerson[ key ];
return null;
}
to use this in your command simply : -
Code: [Select]
if ( cmd=="freeze")
{
if ( GetAdminName(player))
{
 if (!text) MessagePlayer("[#db0000]Usage :[#FFFFFF] /freeze <Name/ID>",player);
 else
 {
  local plr = FindPlayer (text);
  Message("[#db0000]Admin [#FFFFFF]"+player.Name+"[#db0000] has frozen [#FFFFFF]"+plr.Name+".");
  plr.IsFrozen=true;
 }
}
else MessagePlayer("you're not authorized as admin!",player);
}

AroliS^

  • Newbie
  • Learning of Mike Tyson K.O
  • Posts: 42

Gabriel_Stories

  • Newbie
  • Posts: 8
Aceptas un Duelo ?

KrooB

  • Full Member
  • BEN TÜRKÜM
  • Posts: 116
Re: Basic Admin System
« Reply #4,  »Last edited
It's good for beginners but
who care admin system with name dude everyone using level system for admins
We are his people !
Who can challange us ?

Gabriel_Stories

  • Newbie
  • Posts: 8
Aceptas un Duelo ?

Rardodus Bruise

  • Newbie
  • The Slasto Family
  • Posts: 17
Re: Basic Admin System
« Reply #6,  »
:-X
Quote from AroliS^ on May 31st, 02:19 AM
useless topic.....
Arolis? Don't you like other people? It is not for you people who are new can use this thanks for your freaking comment but thnx for letting me know that this is useless.. I think so you are useless aswell

Gabriel & Saiyan, You are true but it would help begginers getting started but I will update it thank your brother
 

KrooB

  • Full Member
  • BEN TÜRKÜM
  • Posts: 116
Re: Basic Admin System
« Reply #7,  »
You can connect database dude try it
Quote from Rardodus Bruise on June 5th, 05:56 AM
:-X
Quote from AroliS^ on May 31st, 02:19 AM
useless topic.....
Arolis? Don't you like other people? It is not for you people who are new can use this thanks for your freaking comment but thnx for letting me know that this is useless.. I think so you are useless aswell

Gabriel & Saiyan, You are true but it would help begginers getting started but I will update it thank your brother
We are his people !
Who can challange us ?

AroliS^

  • Newbie
  • Learning of Mike Tyson K.O
  • Posts: 42
Re: Basic Admin System
« Reply #8,  »
Quote from Rardodus Bruise on June 5th, 05:56 AM
:-X
Quote from AroliS^ on May 31st, 02:19 AM
useless topic.....
Arolis? Don't you like other people? It is not for you people who are new can use this thanks for your freaking comment but thnx for letting me know that this is useless.. I think so you are useless aswell

Gabriel & Saiyan, You are true but it would help begginers getting started but I will update it thank your brother
Baby shark do do do do

Athanatos

  • Hero Member
  • Working on maybe the best VC:MP server ever
  • Posts: 755
Re: Basic Admin System
« Reply #9,  »
Quote from AroliS^ on June 5th, 06:50 PM
Quote from Rardodus Bruise on June 5th, 05:56 AM
:-X
Quote from AroliS^ on May 31st, 02:19 AM
useless topic.....
Arolis? Don't you like other people? It is not for you people who are new can use this thanks for your freaking comment but thnx for letting me know that this is useless.. I think so you are useless aswell

Gabriel & Saiyan, You are true but it would help begginers getting started but I will update it thank your brother
Baby shark do do do do
**TRIGGERED**