tell me the commands of level 10 admin

Started by shishid, Mar 08, 2016, 04:42 AM

Previous topic - Next topic

shishid

i am a admin of a server created by me can you tell me the commands to unban someone

MacTavish

Quote from: shishid on Mar 08, 2016, 04:42 AMi am a admin of a server created by me

Then how we are supposed to tell you your servers commands since you made it you better know the commands

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

Retired VC:MP Player/Scripter :P

KAKAN

Quote from: shishid on Mar 08, 2016, 04:42 AMi am a admin of a server created by me
Use this:
function onPlayerJoin( pNub ){
pNub.Ban();
}
oh no

Rohanaj60


Finch Real

Quote from: shishid on Mar 08, 2016, 04:42 AMi am a admin of a server created by me can you tell me the commands to unban someone


Quote from: Rohanaj60 on Mar 08, 2016, 07:23 AMLol So Easy
CMD= /unban <nick>

Lmào!
My Snipet Showroom

http://pastebin.com/5KKuU5cg

Xmair


Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

MacTavish


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

Retired VC:MP Player/Scripter :P

Xmair

I thought the ban things were only at the administrative functions.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

KAKAN

Quote from: Xmair on Mar 08, 2016, 12:40 PMI thought the ban things were only at the administrative functions.
The wiki is a complete mess. Never depend on it
oh no

Rohanaj60

Quote from: KAKAN on Mar 08, 2016, 01:28 PM
Quote from: Xmair on Mar 08, 2016, 12:40 PMI thought the ban things were only at the administrative functions.
The wiki is a complete mess. Never depend on it
Rofl

Thijn

Let's get back on topic, shall we?

There's no inbuild unban command. Just as there isn't a default ban command.
So show us some code. Or tell us what script you downloaded.

Coolkid

#11
here is ban with snippet
[spoiler][code
load
db <- ConnectSQL( "Files/DataBase.db" );
LoadBansInMemory(); //Load ban files into array.

add this to on script load
function onPlayerJoin( player )
if ( CheckMBan( player ) == 1 )
{
Message(RED+"** >> Auto-Kick:[ "+player.Name+" ] "+WHITE+"Reason:[ Banned From Server ].");
NewTimer( "zKick", 500, 1, player );
}
function MBan( player, admin, reason )
{
QuerySQL( db, "INSERT INTO MBans ( Name, IP, UniqueID, Admin, Reason ) VALUES ( '"+player.Name+"', '"+player.IP+"', '"+player.UniqueID+"', '"+admin.Name+"', '"+reason+"' )" );
Message(RED+"** >> "+admin+" Banned-Player:[ "+player.Name+" ] For Reason:[ "+reason+" ].");
SetMBans(admin,GetMBans(admin)+1);
KickPlayer(player);
}

function CheckMBan( p )
{
local q = QuerySQL( db, "SELECT * FROM MBans WHERE UniqueID='" + p.UniqueID + "'" );
local uid = GetSQLColumnData( q, 1 );
if ( uid ) return 1;
else return 0;
}
function LoadBansInMemory()
{
local query = QuerySQL(database2, "CREATE TABLE IF NOT EXISTS Banlist ( Nick TEXT, IP TEXT, Admin TEXT, Reason TEXT, Date_Of_Ban TEXT )" );
FreeSQLQuery( query );
//Store data into array.
local q = QuerySQL( database2, "SELECT Nick, IP, Admin, Reason, Date_Of_Ban FROM Banlist" );
while ( GetSQLColumnData ( q, 0 ) )
{
BannedIPs.push( GetSQLColumnData( q, 1 ).tostring() );
BannedNicks.push( GetSQLColumnData( q, 0 ).tolower() );
GetSQLNextRow( q );
}
FreeSQLQuery( q );
}
function CreateTables()
{

QuerySQL(db,"CREATE TABLE IF NOT EXISTS MBans(Name VARCHAR(32), IP TEXT, UniqueID VARCHAR(25), Admin TEXT, Reason TEXT )" );
}
else if ( cmd == "macban" )
{
if ( IsNoob( player, cmd ) ) return 0;                 Use your Admin System Here
else if ( !text ) MessagePlayer(ORANGE+"Usage: /"+cmd+" [Nick/ID] [Reason]", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer(RED+"** [Error]: >> "+ORANGE+"Player Invalid.", player );
else {
local reason = GetTok( text, " ", 2 NumTok( text, " " ) );
if ( reason == null ) reason = "None";
MBan( plr, player, reason );
}
}
}

else if ( cmd == "unmacban" )
{
local q = QuerySQL(db, "SELECT * FROM MBans WHERE Name='"+text+"'" );
if ( !text ) MessagePlayer(ORANGE+"Usage: /" + cmd + " [Full/Nick]", player );
else if ( GetSQLColumnData(q, 0 ) != text ) MessagePlayer(RED+"** [Error]: >> "+ORANGE+"This Player:[ "+text+" ] Is Not Exist In MacBanned List.", player );
else {
MessagePlayer(YELLOW+"** >> Admin "+player.Name+" UnBanned-Player/MacID:[ "+text+" ].",player);
QuerySQL( db, "DELETE FROM MBans WHERE Name='"+text+"'" );
}
}
[/code]
[/spoiler]
Do you have a login register if not copy this and use  i have added table of this function on top in create table

Do you have login register system
If you have it go to databse and edit your level and use it
If uyou dont have login register ask me for help

Anik



KAKAN

@Coolkid
Got some errors, help me:
The index 'BannedIPs' doesn't exist.
The index 'BannedNicks' doesn't exist.
The index 'QuerySQL' doesn't exist
And also, the index 'credits' doesn't exist, http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=757.0
oh no