Advertisement
Guest User

Untitled

a guest
Aug 19th, 2010
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.30 KB | None | 0 0
  1. //=========================AdminBox 0.2 BY [PNC]Angelo=========================//
  2.  
  3.  
  4. //------------------------------INCLUDES---------------------------------//
  5. #include <a_samp>
  6.  
  7. //------------------------------DEFINES---------------------------------//
  8. #define VARIE 2012
  9. #define COLOR_RED 0xFF1F10AA //rosso
  10. #define COLOR_GREEN 0x00FF00AA //verde
  11.  
  12. //------------------------------VARIBILI---------------------------------//
  13. new cliccato;
  14. new freeze[MAX_PLAYERS];
  15. new muted[MAX_PLAYERS];
  16. new jailato[MAX_PLAYERS];
  17.  
  18. //----------------------------ONDIALOGRESPONSE-----------------------------------//
  19. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  20. {
  21. cliccato = GetPVarInt(playerid,"Clicked");
  22. if(dialogid == VARIE)
  23. {
  24. if(response)
  25. {
  26. if(listitem == 0)
  27. {
  28. new Float:x , Float:y , Float:z;
  29. GetPlayerPos(cliccato, x , y , z);
  30. SetPlayerPos(playerid , x , y , z);
  31. SendClientMessage(cliccato , COLOR_GREEN , "L'admin si è gotato da te");
  32. }
  33. if(listitem == 1)
  34. {
  35. new Float:x , Float:y , Float:z;
  36. GetPlayerPos(playerid , x , y , z);
  37. SetPlayerPos(cliccato, x+1 , y , z);
  38. SendClientMessage(cliccato , COLOR_GREEN , "L'admin ti ha gotato a se");
  39. }
  40. if(listitem == 2)
  41. {
  42. SetPlayerHealth(cliccato , 0);
  43. SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha killato");
  44. }
  45. if(listitem == 3)
  46. {
  47. SetPlayerArmour(cliccato , 100);
  48. SetPlayerHealth(cliccato , 100);
  49. SendClientMessage(cliccato , COLOR_GREEN , "L'admin ti ha ricaricato vita e armatura");
  50. }
  51. if(listitem == 4)
  52. {
  53. new Float:x , Float:y , Float:z;
  54. GetPlayerPos(cliccato, x , y , z);
  55. CreateExplosion(x, y , z + 3, 1, 10);
  56. SendClientMessage(cliccato , COLOR_GREEN , "L'admin ti ha bruciato");
  57. }
  58. if(listitem == 5)
  59. {
  60. new Float:x , Float:y , Float:z;
  61. GetPlayerPos(cliccato, x , y , z);
  62. CreateExplosion(x, y , z , 7,10.0);
  63. SendClientMessage(cliccato , COLOR_GREEN , "L'admin ti ha fatto esplodere");
  64. }
  65. if(listitem == 6)
  66. {
  67. new Float:x , Float:y , Float:z;
  68. GetPlayerPos(cliccato, x , y , z);
  69. SetPlayerPos(cliccato, x, y , z+5);
  70. SendClientMessage(cliccato , COLOR_GREEN , "L'admin ti ha slappato");
  71. }
  72. if(listitem == 7)
  73. {
  74. SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha kickato");
  75. Kick(cliccato);
  76. }
  77. if(listitem == 8)
  78. {
  79. SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha bannato");
  80. Ban(cliccato);
  81. }
  82. if(listitem == 9)
  83. {
  84. TogglePlayerControllable(cliccato , false);
  85. SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha freezato");
  86. freeze[playerid] = 1;
  87. }
  88. if(listitem == 10)
  89. {
  90. if(freeze[playerid] == 1)
  91. {
  92. TogglePlayerControllable(cliccato , true);
  93. SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha sfreezzato");
  94. }
  95. }
  96. if(listitem == 11)
  97. {
  98. ResetPlayerWeapons(cliccato);
  99. PlayerPlaySound(cliccato,1057,0.0,0.0,0.0);
  100. SendClientMessage(cliccato , COLOR_RED , "L'admin ha resettato le tue armi");
  101. }
  102. if(listitem == 12)
  103. {
  104. muted[playerid] = 1;
  105. SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha mutato");
  106. }
  107. if(listitem == 13)
  108. {
  109. if(muted[playerid] == 1)
  110. {
  111. muted[playerid] = 0;
  112. SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha ridato la parola");
  113. }
  114. }
  115. if(listitem == 14)
  116. {
  117. jailato[playerid] = 1;
  118. SetPlayerFacingAngle(playerid, 177.0350);
  119. SetCameraBehindPlayer(playerid);
  120. SetPlayerInterior(playerid, 3);
  121. SetPlayerPos(playerid, 197.7029,174.8801,1003.0234);
  122. SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha jailato");
  123. }
  124. if(listitem == 15)
  125. {
  126. if(jailato[playerid] == 1)
  127. {
  128. SpawnPlayer(playerid);
  129. jailato[playerid] = 0;
  130. SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha unjailato");
  131. }
  132. }
  133.  
  134. if(listitem == 16)
  135. {
  136. ResetPlayerMoney(cliccato);
  137. SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha mandato in bancarotta");
  138. }
  139. if(listitem == 17)
  140. {
  141. GivePlayerMoney(cliccato , 1000000);
  142. SendClientMessage(cliccato , COLOR_RED , "L'admin ti ha mandato 1000000$");
  143. }
  144. if(listitem == 18)
  145. {
  146. new name[MAX_PLAYER_NAME] , kill , soldi , ping,stringa[256];
  147. new Float:vita , Float:armatura;
  148. GetPlayerName(cliccato , name , sizeof(name));
  149. kill = GetPlayerScore(cliccato);
  150. soldi = GetPlayerMoney(cliccato);
  151. GetPlayerHealth(cliccato , vita);
  152. GetPlayerArmour(cliccato , armatura);
  153. ping = GetPlayerPing(cliccato);
  154. format(stringa , 256 , "%s ha %d kill , %d dollari e il suo ping è %d " , name , kill , soldi , ping);
  155. SendClientMessage(playerid , COLOR_GREEN , stringa);
  156. }
  157. }
  158. return 1;
  159. }
  160. return 0;
  161. }
  162. //---------------------------ONPLAYERCLICKPLAYER------------------------------------//
  163. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  164. {
  165. if(IsPlayerAdmin(playerid))
  166. {
  167. SetPVarInt(playerid,"Clicked",clickedplayerid);
  168. ShowPlayerDialog(playerid, VARIE , DIALOG_STYLE_LIST, "Comandi Admin" , "Goto\nGethere\nKill\nRicarica\nBrucia\nEsplodi\nSlappa\nKicka\nBanna\nFreeze\nUnfreeza\nDisarma\nMute\nUnmute\nJail\nUnjail\nBancarotta\nArricchisci\nInfo", "Seleziona", "Cancella");
  169. }
  170. return 1;
  171. }
  172. //--------------------------ONPLAYERTEXT-------------------------------------//
  173. public OnPlayerText(playerid , text[])
  174. {
  175. if(muted[playerid] == 1)
  176. {
  177. SendClientMessage(cliccato , COLOR_RED , "Sei mutato");
  178. return 0;
  179. }
  180. return 1;
  181. }
  182. //--------------------------ONPLAYERCOMMANDTEXT-------------------------------------//
  183. public OnPlayerCommandText(playerid , cmdtext[])
  184. {
  185. if(jailato[playerid] == 1) return SendClientMessage(playerid , COLOR_GREEN , "Sei jailato e non puoi usare comandi");
  186. return 0;
  187. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement