artyom_triodin1

XProAdmin For Samp Admins System! ! !

Oct 15th, 2014
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.88 KB | None | 0 0
  1. #include <a_samp>
  2. #include <sscanf2>
  3. #include <zcmd>
  4.  
  5. #define RED 0xFF0000FF
  6. #define GREEN 0x00FF00FF
  7. #define YELLOW 0xFFFF00FF
  8.  
  9. #define SCM SendClientMessage
  10.  
  11. #if defined FILTERSCRIPT
  12.  
  13. #endif
  14.  
  15. public OnFilterScriptInit()
  16. {
  17. print("\n---------------------------------------------------|");
  18. printf("| ");
  19. printf("| ");
  20. printf("| ");
  21. print("| XProAdmin! V1.0 Loaded Succes Fully!!! !!! !!!");
  22. printf("| ");
  23. printf("| ");
  24. printf("| ");
  25. print("|--------------------------------------------------|\n");
  26. return 1;
  27. }
  28.  
  29. CMD:kick(playerid, params[])
  30. {
  31. new name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], pid, reason[128], mess[128];
  32. GetPlayerName(playerid, name, sizeof(name));
  33. GetPlayerName(playerid, name2, sizeof(name2));
  34. if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "You Are Not Admin!!! !!! !!!");
  35. if(sscanf(params, "us", pid, reason)) return SCM(playerid, YELLOW, "Usage /Kick [ID] [REASON]!!! !!! !!!");
  36. if(!IsPlayerConnected(pid)) return SCM(playerid, RED, "Player Doesn't Exist!!! !!! !!!");
  37. else
  38. {
  39. format(mess, sizeof(mess), "%s Kicked {FF0000}%s Reason : {FF0000}%s!!!", name, name2, reason);
  40. SendClientMessageToAll(YELLOW, mess);
  41. Kick(pid);
  42. }
  43. return 1;
  44. }
  45.  
  46.  
  47. CMD:ban(playerid, params[])
  48. {
  49. new name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], pid, reason[128], mess[128];
  50. GetPlayerName(playerid, name, sizeof(name));
  51. GetPlayerName(playerid, name2, sizeof(name2));
  52. if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "You Are Not Admin!!! !!! !!!");
  53. if(sscanf(params, "us", pid, reason)) return SCM(playerid, YELLOW, "Usage /Ban [ID] [REASON]!!! !!! !!!");
  54. if(!IsPlayerConnected(pid)) return SCM(playerid, RED, "Player Doesn't Exist!!! !!! !!!");
  55. else
  56. {
  57. format(mess, sizeof(mess), "%s Banned {FF0000}%s Reason : {FF0000}%s!!!", name, name2, reason);
  58. SendClientMessageToAll(YELLOW, mess);
  59. Ban(pid);
  60. }
  61. return 1;
  62. }
  63.  
  64.  
  65. CMD:freeze(playerid, params[])
  66. {
  67. new name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], pid, reason[128], mess[128];
  68. GetPlayerName(playerid, name, sizeof(name));
  69. GetPlayerName(playerid, name2, sizeof(name2));
  70. if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "You Are Not Admin!!! !!! !!!");
  71. if(sscanf(params, "uf", pid, reason)) return SCM(playerid, YELLOW, "Usage /Freeze [ID] [REASON]!!! !!! !!!");
  72. if(!IsPlayerConnected(pid)) return SCM(playerid, RED, "Player Doesn't Exist!!! !!! !!!");
  73. else
  74. {
  75. format(mess, sizeof(mess), "Admin: %s Freeze You For Reason : %s", name, reason);
  76. SendClientMessage(pid, YELLOW, mess);
  77. TogglePlayerControllable(pid, 0);
  78. }
  79. return 1;
  80. }
  81.  
  82. CMD:unfreeze(playerid, params[])
  83. {
  84. new name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], pid, reason[128], mess[128];
  85. GetPlayerName(playerid, name, sizeof(name));
  86. GetPlayerName(playerid, name2, sizeof(name2));
  87. if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "You Are Not Admin!!! !!! !!!");
  88. if(sscanf(params, "uf", pid, reason)) return SCM(playerid, YELLOW, "Usage /Unfreeze [ID] [REASON]!!! !!! !!!");
  89. if(!IsPlayerConnected(pid)) return SCM(playerid, RED, "Player Doesn't Exist!!! !!! !!!");
  90. else
  91. {
  92. format(mess, sizeof(mess), "Admin: %s UnFroze You For Reason : %s", name, reason);
  93. SendClientMessage(pid, YELLOW, mess);
  94. TogglePlayerControllable(pid, 1);
  95. }
  96. return 1;
  97. }
  98.  
  99. CMD:sethp(playerid, params[])
  100. {
  101. new name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], pid, Float:Health, mess[128];
  102. GetPlayerName(playerid, name, sizeof(name));
  103. GetPlayerName(playerid, name2, sizeof(name2));
  104. if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "You Are Not Admin!!! !!! !!!");
  105. if(sscanf(params, "uf", pid, Health)) return SCM(playerid, YELLOW, "Usage /Sethp [ID] [HEALTH]!!! !!! !!!");
  106. if(!IsPlayerConnected(pid)) return SCM(playerid, RED, "Player Doesn't Exist!!! !!! !!!");
  107. else
  108. {
  109. format(mess, sizeof(mess), "Admin: %s SetYour Health", name);
  110. SendClientMessage(pid, YELLOW, mess);
  111. SetPlayerHealth(pid, Health);
  112. }
  113. return 1;
  114. }
  115.  
  116. CMD:get(playerid, params[])
  117. {
  118. new name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], pid, Float:x, Float:y, Float:z, Float:x2, Float:y2, Float:z2 , mess[128];
  119. GetPlayerName(playerid, name, sizeof(name));
  120. GetPlayerName(playerid, name2, sizeof(name2));
  121. if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "You Are Not Admin!!! !!! !!!");
  122. if(sscanf(params, "uf", pid)) return SCM(playerid, YELLOW, "Usage /GET [ID]!!! !!! !!!");
  123. if(!IsPlayerConnected(pid)) return SCM(playerid, RED, "Player Doesn't Exist!!! !!! !!!");
  124. else
  125. {
  126. GetPlayerPos(playerid, x, y, z);
  127. GetPlayerPos(pid, x2, y2, z2);
  128. format(mess, sizeof(mess), "Admin: %s Got You Right Now !!! !!! !!!", name);
  129. SendClientMessage(pid, YELLOW, mess);
  130. SetPlayerPos(pid, x, y, z);
  131. }
  132. return 1;
  133. }
  134.  
  135. CMD:goto(playerid, params[])
  136. {
  137. new name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], pid, Float:x, Float:y, Float:z, Float:x2, Float:y2, Float:z2, mess[128];
  138. GetPlayerName(playerid, name, sizeof(name));
  139. GetPlayerName(playerid, name2, sizeof(name2));
  140. if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "You Are Not Admin!!! !!! !!!");
  141. if(sscanf(params, "uf", pid)) return SCM(playerid, YELLOW, "Usage /GOTO [ID]!!! !!! !!!");
  142. if(!IsPlayerConnected(pid)) return SCM(playerid, RED, "Player Doesn't Exist!!! !!! !!!");
  143. else
  144. {
  145. GetPlayerPos(playerid, x, y, z);
  146. GetPlayerPos(pid, x2, y2, z2);
  147. format(mess, sizeof(mess), "Admin: %s Was Teleported to You!!! !!! !!!", name);
  148. SendClientMessage(pid, YELLOW, mess);
  149. SetPlayerPos(playerid, x2, y2, z2);
  150. }
  151. return 1;
  152. }
Advertisement
Add Comment
Please, Sign In to add comment