Vice City: Multiplayer

Off-Topic => Off-Topic General => Topic started by: shishid on Mar 08, 2016, 04:42 AM

Title: tell me the commands of level 10 admin
Post by: shishid on Mar 08, 2016, 04:42 AM
i am a admin of a server created by me can you tell me the commands to unban someone
Title: Re: tell me the commands of level 10 admin
Post by: MacTavish on Mar 08, 2016, 06:03 AM
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
Title: Re: tell me the commands of level 10 admin
Post by: KAKAN on Mar 08, 2016, 06:59 AM
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();
}
Title: Re: tell me the commands of level 10 admin
Post by: Rohanaj60 on Mar 08, 2016, 07:23 AM
Lol So Easy
CMD= /unban <nick>
Title: Re: tell me the commands of level 10 admin
Post by: Finch Real on Mar 08, 2016, 09:11 AM
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!
Title: Re: tell me the commands of level 10 admin
Post by: Xmair on Mar 08, 2016, 09:49 AM
@KAKAN , fyki, theres no 'Ban' its 'BanIP'.
Title: Re: tell me the commands of level 10 admin
Post by: MacTavish on Mar 08, 2016, 09:53 AM
Quote from: Xmair on Mar 08, 2016, 09:49 AM@KAKAN , fyki, theres no 'Ban' its 'BanIP'.

Unfortunately you are wrong @Xmair http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/Player.Ban
Title: Re: tell me the commands of level 10 admin
Post by: Xmair on Mar 08, 2016, 12:40 PM
I thought the ban things were only at the administrative functions.
Title: Re: tell me the commands of level 10 admin
Post by: 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
Title: Re: tell me the commands of level 10 admin
Post by: Rohanaj60 on Mar 08, 2016, 02:20 PM
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
Title: Re: tell me the commands of level 10 admin
Post by: Thijn on Mar 08, 2016, 04:56 PM
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.
Title: Re: tell me the commands of level 10 admin
Post by: Coolkid on Mar 09, 2016, 01:42 AM
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
Title: Re: tell me the commands of level 10 admin
Post by: Anik on Mar 09, 2016, 04:59 AM
DNUS Detected!!!
Title: Re: tell me the commands of level 10 admin
Post by: Finch Real on Mar 09, 2016, 05:23 AM
Quote from: [DS]Anik on Mar 09, 2016, 04:59 AMDNUS Detected!!!
So?
Title: Re: tell me the commands of level 10 admin
Post by: KAKAN on Mar 09, 2016, 06:51 AM
@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
Title: Re: tell me the commands of level 10 admin
Post by: Coolkid on Mar 09, 2016, 11:25 AM
mine is workling this is uid ban i will correct the function by eveneing now i am going to school

@KAKAN and the link u gave rocky tempban system it is totaly different frm that as rocky temp ban ses ip to ban a person but this is a  mac ban more secure to do a peroma ban
Title: Re: tell me the commands of level 10 admin
Post by: Anik on Mar 09, 2016, 11:44 AM
@Coolkid this is Off Topic...... then why r u posting snippets here huh??
Title: Re: tell me the commands of level 10 admin
Post by: Coolkid on Mar 09, 2016, 11:46 AM
Is there problem with you @anik the topic author has demanded a ban system so what's a big deal
Title: Re: tell me the commands of level 10 admin
Post by: KAKAN on Mar 09, 2016, 03:07 PM
Quote from: Coolkid on Mar 09, 2016, 11:25 AM@KAKAN and the link u gave rocky tempban system it is totaly different frm that as rocky temp ban ses ip to ban a person but this is a  mac ban more secure to do a peroma ban
Changing player.IP to player.UID won't make any difference, at least, you can change the array name, it's still BannedIPs lol
Title: Re: tell me the commands of level 10 admin
Post by: Mötley on Mar 19, 2016, 07:52 AM
Quote from: Thijn on Mar 08, 2016, 04:56 PMLet'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.

Since we are in off topic why not put my output!

To an extent there is, as I noticed this as well, On player join I have been setting up muli account detection, as well as duplicating that function and modifying for. a banned kick function "You are banned from the server"

I have also been working on writing uid to a file with writeini, This way I can write the ban to file then create a cmd and call it /unban
lucky VCMP has a delete ini function so you will need to find the players name on command to delete the line, I have no clue to how unsafe as if it can be bypassed

"If there is a anti kick hack in existence in VCMP" either way it is a slower way "Kinda trolling as you join for a few seconds thinking your not banned", but more controllable server side and message modifying .

I have no clue to what your server build is ( im guessing query no clue )
If you can apply my method in some way in your server you will have your unban command,
Title: Re: tell me the commands of level 10 admin
Post by: KAKAN on Mar 19, 2016, 08:17 AM
Quote from: Mr_Motley on Mar 19, 2016, 07:52 AM...has a delete ini function so you will need to find the players name on command to delete the line, I have no clue to how unsafe as if it can be bypassed...
Though, you can make a escape_string function( like in MySQL and SQLite ) to prevent from being attacked.