Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if ( cmd == "!ban")
- {
- if ( level < 3 ) EchoNotice1( user, ICOL_RED + "Error - Your level is not high enough to use that command." );
- else if ( !text ) EchoNotice1(user,"Syntax: " + cmd + " <playername> <h/d/m> <Reason>" );
- else
- {
- local args = split( text, " " );
- local plr = GetPlayer(args[0]), duration = args[1], reason = GetTok( text, " ", 3, NumTok( text, " " ) );
- if (!duration) EchoNotice1(user,"Syntax: " + cmd + " <playername> <h/d/m> <Reason> " );
- else if(!reason) EchoNotice1(user,"Syntax: " + cmd + " <playername> <h/d/m> <Reason> " );
- else
- {
- if ( plr ) Ban( plr, plr.UniqueID, plr.IP, duration, reason, user );
- else
- {
- plr = args[0];
- local q = QuerySQL( db, "SELECT * FROM Alias WHERE Name='" + plr + "'" );
- if ( GetSQLColumnData( q, 1 ) && GetSQLColumnData( q, 0 ) != null )
- {
- local ip = "0.0.0.0", uid = GetSQLColumnData( q, 0 );
- Ban( plr, uid, ip, duration, reason, user );
- }
- else EchoNotice1( user, "> "+plr+"'s UID cannot be found, the player didn't join the server." );
- FreeSQLQuery( q );
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment