faiznurfaza

NO /b For roleplay by faiz

Feb 20th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3. #include <color>
  4. #include <sscanf2>
  5. #include <foreach>
  6.  
  7. new nob[MAX_PLAYERS];
  8.  
  9. public OnFilterScriptInit()
  10. {
  11. return 1;
  12. }
  13.  
  14. public OnFilterScriptExit()
  15. {
  16. return 1;
  17. }
  18.  
  19. public OnPlayerConnect(playerid)
  20. {
  21. nob[playerid] = 0;
  22. return 1;
  23. }
  24.  
  25. stock ProxDetector(Float:radi, playerid, string[],color)
  26. {
  27. new Float:x,Float:y,Float:z;
  28. GetPlayerPos(playerid,x,y,z);
  29. foreach(Player,i)
  30. {
  31. if(IsPlayerInRangeOfPoint(i,radi,x,y,z))
  32. {
  33. SendClientMessage(i,color,string);
  34. }
  35. }
  36. }
  37. CMD:nob(playerid, params[])
  38. {
  39. if(nob[playerid] == 0)
  40. {
  41. nob[playerid] = 1;
  42. SendClientMessage(playerid, COLOR_YELLOW, "/b Telah Di Perbolehkan");
  43. }
  44. else
  45. {
  46. nob[playerid] = 0;
  47. SendClientMessage(playerid, COLOR_YELLOW, "/b Tidak Di Perbolehkan");
  48. }
  49. return 1;
  50. }
  51.  
  52. CMD:b(playerid, params[])
  53. {
  54. if(nob[playerid] == 0)
  55. {
  56. SendClientMessage(playerid, COLOR_YELLOW, "Kau Tidak Boleh /b Full Roleplay");
  57. }
  58. else
  59. {
  60. new pname[MAX_PLAYER_NAME];
  61. GetPlayerName(playerid,pname, sizeof(pname));
  62. new string[1280];
  63. if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /b [OOC CHAT");
  64. format(string, sizeof(string), "(( Local OOC Chat %s : %s ))",pname, params);
  65. ProxDetector(30.0, playerid, string, -1);
  66. }
  67. return 1;
  68. }
Advertisement
Add Comment
Please, Sign In to add comment