Advertisement
Guest User

asd

a guest
Jan 21st, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. #include <a_samp>
  2. #include <sscanf2>
  3. #include <zcmd>
  4.  
  5. #define SCTA SendClientMessageToAll
  6.  
  7. new Mute[MAX_PLAYERS];
  8.  
  9. public OnPlayerConnect(playerid)
  10. {
  11. Mute[playerid] = 0;
  12. return 1;
  13. }
  14. public OnPlayerDisconnect(playerid)
  15. {
  16. Mute[playerid] = 0;
  17. return 1;
  18. }
  19. public OnPlayerText(playerid, text[])
  20. {
  21. if(Mute[playerid] == 1)
  22. {
  23. SendClientMessage(playerid,-1,"You Are Muted You Cant Chat");
  24. }
  25. return 1;
  26. }
  27. CMD:mute(playerid,params[])
  28. {
  29. new targetid,string[128];
  30. if(Mute[playerid] == 0)
  31. {
  32. if(IsPlayerAdmin(playerid))
  33. {
  34. if(sscanf(params,"u",targetid)) return SendClientMessage(playerid, -1, "/mute [playerid]");
  35. {
  36. Mute[playerid] = 1;
  37. format(string,sizeof(string)," ID: %s Has been Muted by The Rcon admin",targetid);
  38. SCTA(-1, string);
  39. }
  40. }
  41. }
  42. return 1;
  43. }
  44. CMD:unmute(playerid,params[])
  45. {
  46. new targetid, string[128];
  47. if(Mute[playerid] == 1)
  48. {
  49. if(IsPlayerAdmin(playerid))
  50. {
  51. if(sscanf(params,"u",targetid)) return SendClientMessage(playerid, -1, "/mute [playerid]");
  52. {
  53. Mute[playerid] = 1;
  54. format(string,sizeof(string)," ID: %s Has been {FF0000}Un{FFFFFF}Muted by The Rcon admin",targetid);
  55. SCTA(-1, string);
  56. }
  57. }
  58. }
  59. return 1;
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement