Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if ( cmd == "!warn" )
- {
- if ( level < 4 ) EchoNotice( user, "4Voce não tem acesso a esse comando." );
- else
- {
- if ( !text ) EchoMessage( "4Error - Syntax: " + cmd + " <nick/ID> <Motivo>" );
- else
- {
- local plr = GetPlayer( GetTok( text, " ", 1 ) );
- if ( !plr ) EchoMessage( "4Error - Unknown player." );
- else if ( status[ plr.ID ].Level >= 5 ) EchoMessage( "4Error - Voce não pode advertir um admin." );
- else
- {
- status[ plr.ID ].Warn ++;
- local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
- if ( reason == null ) reason = "Nenhum";
- if ( status[ plr.ID ].Warn <= 2 )
- {
- yMessage( "** Admin. " + user + " advertiu " + plr.Name + ". Motivo: " + reason + " [" + status[ plr.ID ].Warn + "/3]." );
- EchoMessage( "13** Admin. " + user + " warned 4" + plr.Name + "13. Reason: 5" + reason + " [" + status[ plr.ID ].Warn + "/3]." );
- PrivMessage( "Aviso " + status[ plr.ID ].Warn + "/3!", plr );
- }
- if ( status[ plr.ID ].Warn == 3 )
- {
- QuerySQL( db, "INSERT INTO Bans ( Name, IP, Date, Admin, Reason ) VALUES ( '" + plr.Name + "', '" + plr.IP + "', '" + GetDate( date ) + "', 'Server', 'Warn [3/3]' )" );
- PrivMessage( "Voce foi advertido tres vezes!", plr );
- MessageAllExcept( "** Auto-ban " + plr.Name + ". Motivo: Warn [3/3]", plr );
- cKick( plr );
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement