Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if ( cmd == "tempban" )
- {
- if ( GetLevel(player) < 5 ) MessagePlayer (" [#4682B4][Error][#FFFFFF]You must need atleast level 5 to access the command",player );
- else if( !text ) MessagePlayer("[#4682B4][Syntax][#FFFFFF]/tempban <player> <day:hour:min> <reason>", player);
- else
- {
- local args = split( text, " " );
- local plr = GetPlayer(args[0]), expire = args[1], reason = GetTok( text, " ", 3, NumTok( text, " " ) );
- if (!expire) MessagePlayer( "Syntax: /" + cmd + " <playername> <day:hour:min> <Reason> ", player );
- else if(!reason) MessagePlayer( "Syntax: /" + cmd + " <playername> <day:hour:min> <Reason> ", player );
- else
- {
- if ( plr ) AddBan( player.Name, plr.Name, expire, reason, ip, uid, "on" );
- else
- {
- plr = args[0];
- local check = QuerySQL( db, "SELECT * FROM Banned WHERE Name='" + plr.Name + "'" );
- if ( GetSQLColumnData( check, 0 ) == null )
- {
- local q = QuerySQL( db, "SELECT * FROM Alias WHERE Name='" + plr.Name + "'" );
- if ( GetSQLColumnData( q, 1 ) && GetSQLColumnData( q, 0 ) != null )
- }
- local ip = GetSQLColumnData( q, 1 ) , uid = GetSQLColumnData( q, 2 );
- AddBan( player.Name, plr.Name, expire, reason, ip, uid, "off" );
- }
- else MessagePlayer( "> "+plr.Name+" UID cannot be found.", player );
- FreeSQLQuery( q );
- }
- else MessagePlayer( "> "+plr.Name+" is already banned.", player );
- FreeSQLQuery( check );
- }
- }
Add Comment
Please, Sign In to add comment