faiznurfaza

Script Mask System By Faiz

Feb 22nd, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. #include <a_samp>
  2. #include <sscanf2>
  3. #include <foreach>
  4. #include <zcmd>
  5.  
  6. new mask[MAX_PLAYERS];
  7.  
  8. public OnPlayerConnect(playerid)
  9. {
  10. mask[playerid] = 0;
  11. return 1;
  12. }
  13.  
  14. public OnPlayerDisconnect(playerid, reason)
  15. {
  16. mask[playerid] = 0;
  17. return 1;
  18. }
  19.  
  20. stock ProxDetector(Float:radi, playerid, string[],color)
  21. {
  22. new Float:x,Float:y,Float:z;
  23. GetPlayerPos(playerid,x,y,z);
  24. foreach(Player,i)
  25. {
  26. if(IsPlayerInRangeOfPoint(i,radi,x,y,z))
  27. {
  28. SendClientMessage(i,color,string);
  29. }
  30. }
  31. }
  32.  
  33. public OnPlayerText(playerid, text[])
  34. {
  35. new string[128];
  36. if(mask[playerid] == 1)
  37. {
  38.  
  39. format(string, sizeof(string), "Stranger Says: %s", text);
  40. ProxDetector(30.0, playerid, string, -1);
  41. }
  42. return 0;
  43. }
  44.  
  45. CMD:mask(playerid, params[])
  46. {
  47. if(mask[playerid] == 0)
  48. {
  49. SendClientMessage(playerid, -1, "Anda Memasang Mask[OOC]");
  50. mask[playerid] = 1;
  51. for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
  52. }
  53. else
  54. {
  55. SendClientMessage(playerid, -1, "Anda Mencabut Mask[OOC]");
  56. mask[playerid] = 0;
  57. for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
  58. }
  59. return 1;
  60. }
Advertisement
Add Comment
Please, Sign In to add comment