Advertisement
KingOfVC

report

Aug 27th, 2014
416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. else if ( cmd == "report" )
  2. {
  3. if ( !text ) ePrivMessage( "[Error] - Usage /c report <player> <reason>", player );
  4. else
  5. {
  6. local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
  7. if ( !reason ) ePrivMessage( "[Error] - Usage /c report <player> <reason>", player );
  8. else
  9. {
  10. local plr = GetPlayer( GetTok( text, " ", 1 ) );
  11. if ( !plr ) ePrivMessage( "[Error] - Invalid Nick/ID.", player );
  12. else if ( plr.ID == player.ID ) ePrivMessage( "[Error] - You cant /c report yourself.", player );
  13. else
  14. {
  15. local a = 0;
  16. while ( a < GetMaxPlayers() )
  17. {
  18. local admins = FindPlayer( a );
  19. if ( admins )
  20. {
  21. local lvl = GetLevel( admins );
  22.  
  23. if ( lvl >= 3 )
  24. {
  25. PrivMessage(player +" has reported Player:[ "+ plr +" ] Reason:[ "+ reason +" ]",admins);
  26. StaffMessage(player +" has reported Player: "+ plr +" Reason: "+ reason );
  27. }
  28. }
  29. a ++;
  30. }
  31. ePrivMessage("[Report] - The report has been sent to online staff, thanks for reporting.", player);
  32. }
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement