Sheders

WhoIsAdmin v1.4

Mar 19th, 2013
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. //Script made by sheders
  2. //This is my third filterscript i made.
  3. //Website: www.xcoper.com
  4. #define FILTERSCRIPT
  5. #if defined FILTERSCRIPT
  6.  
  7.  
  8. #pragma unused ret_memcpy
  9. #pragma unused strtok
  10. #include <a_samp> //a_samp
  11. #include <zcmd> //zcmd
  12. #include <sscanf2> //sscanf2
  13. #include <foreach>
  14. #include <dini>
  15. #include <dudb>
  16.  
  17. //Colors
  18. #define COLOR_LIGHTBLUE 0x33CCFFAA
  19. #define COLOR_RED 0xAA3333AA
  20. #define COLOR_GREY 0xAFAFAFAA
  21. #define COLOR_YELLOW 0xFFFF00AA
  22. #define COLOR_PINK 0xFF66FFAA
  23. #define COLOR_BLUE 0x0000BBAA
  24. #define COLOR_WHITE 0xFFFFFFAA
  25. #define COLOR_DARKRED 0x660000AA
  26. #define COLOR_ORANGE 0xFF9900AA
  27. #define COLOR_BRIGHTRED 0xFF0000AA
  28. #define COLOR_INDIGO 0x4B00B0AA
  29. #define COLOR_VIOLET 0x9955DEEE
  30. #define COLOR_LIGHTRED 0xFF99AADD
  31. #define COLOR_SEAGREEN 0x00EEADDF
  32. #define COLOR_GRAYWHITE 0xEEEEFFC4
  33. #define COLOR_LIGHTNEUTRALBLUE 0xabcdef66
  34. #define COLOR_GREENISHGOLD 0xCCFFDD56
  35. #define COLOR_LIGHTBLUEGREEN 0x0FFDD349
  36. #define COLOR_NEUTRALBLUE 0xABCDEF01
  37. #define COLOR_LIGHTCYAN 0xAAFFCC33
  38. #define COLOR_LEMON 0xDDDD2357
  39. #define COLOR_MEDIUMBLUE 0x63AFF00A
  40. #define COLOR_NEUTRAL 0xABCDEF97
  41. #define COLOR_BLACK 0x00000000
  42. #define COLOR_NEUTRALGREEN 0x81CFAB00
  43. #define COLOR_DARKGREEN 0x12900BBF
  44. #define COLOR_LIGHTGREEN 0x24FF0AB9
  45. #define COLOR_DARKBLUE 0x300FFAAB
  46. #define COLOR_BLUEGREEN 0x46BBAA00
  47. #define COLOR_PINK 0xFF66FFAA
  48. #define COLOR_LIGHTBLUE 0x33CCFFAA
  49. #define COLOR_DARKRED 0x660000AA
  50. #define COLOR_ORANGE 0xFF9900AA
  51. #define COLOR_PURPLE 0x800080AA
  52. #define COLOR_GRAD1 0xB4B5B7FF
  53. #define COLOR_GRAD2 0xBFC0C2FF
  54. #define COLOR_RED1 0xFF0000AA
  55. #define COLOR_GREY 0xAFAFAFAA
  56. #define COLOR_GREEN 0x33AA33AA
  57. #define COLOR_RED 0xAA3333AA
  58. #define COLOR_YELLOW 0xFFFF00AA
  59. #define COLOR_WHITE 0xFFFFFFAA
  60. #define COLOR_BROWN 0x993300AA
  61. #define COLOR_CYAN 0x99FFFFAA
  62. #define COLOR_TAN 0xFFFFCCAA
  63. #define COLOR_PINK 0xFF66FFAA
  64. #define COLOR_KHAKI 0x999900AA
  65. #define COLOR_LIME 0x99FF00AA
  66. #define COLOR_SYSTEM 0xEFEFF7AA
  67. #define COLOR_GRAD2 0xBFC0C2FF
  68. #define COLOR_GRAD4 0xD8D8D8FF
  69. #define COLOR_GRAD6 0xF0F0F0FF
  70. #define COLOR_GRAD2 0xBFC0C2FF
  71. #define COLOR_GRAD3 0xCBCCCEFF
  72. #define COLOR_GRAD5 0xE3E3E3FF
  73. #define COLOR_GRAD1 0xB4B5B7FF
  74.  
  75. //Script starting here
  76. //See if a admins is online
  77. CMD:credits(playerid,params[])
  78. {
  79. SendClientMessage(playerid,0xFFFF00AA,"Credits WhoIsAdmin v1.4: Sheders Scripting , AnkEpple BetaTester , Fezhj BetaTester");//Change the name to your name and your admins.
  80. return 1;
  81. }
  82.  
  83. CMD:admins(playerid,params[])
  84. {
  85. for(new i = 0; i < MAX_PLAYERS; i++)
  86. {
  87. if(IsPlayerConnected(i))
  88. {
  89. if(IsPlayerAdmin(i))
  90. {
  91. new string[27];
  92. new id[MAX_PLAYER_NAME];
  93. GetPlayerName(i, id, sizeof(id));
  94. format(string, sizeof(string), "Admins online: %s", id);
  95. SendClientMessage(playerid, 0x800080AA , string);
  96. }
  97. }
  98. }
  99. return 1;
  100. }
  101.  
  102. //Rules on spawn
  103. #endif
  104.  
  105. public OnPlayerSpawn(playerid)
  106. {
  107. ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"Accept server rules:","Dont Advertise\nDont kill other players with out a good reason\nRespect our admins and players\nBe nice in the chat\nDont use capslock in chat\nDont hack\nAnd play fair!","Accept","Quit");
  108. return 1;
  109. }
  110. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  111. {
  112. if(dialogid == 2)
  113. {
  114. if(response) return SendClientMessage(playerid, COLOR_LIME, "Thank you. Have fun!!");
  115. else SendClientMessage(playerid, COLOR_RED, "You didnt accept.You are kicked!");
  116. Kick( playerid );
  117. }
  118. return 1;
  119. }
  120.  
  121. //Login Register
  122.  
  123.  
  124. //Credits to sheders for script whoisadmin v1.4/ Fezhj for BetaTest
  125. //Commands /admins this commands will show the players who admins are online at the server.
Advertisement
Add Comment
Please, Sign In to add comment