Guest User

Essential by TheDucc

a guest
Apr 29th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.45 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include < a_samp >
  6. #include < zcmd >
  7. #include < foreach >
  8. #include < sscanf2 >
  9. #define Version 1.1
  10. #if defined FILTERSCRIPT
  11.  
  12. public OnFilterScriptInit()
  13. {
  14. print("\n--------------------------------------");
  15. print(" Essential By TheDucc loaded");
  16. printf("Versiunea %d",Version);
  17. print(" \a");
  18. print(" \a");
  19. print("--------------------------------------\n");
  20. return 1;
  21. }
  22.  
  23. public OnFilterScriptExit()
  24. {
  25. return 1;
  26. }
  27.  
  28. #else
  29.  
  30. main()
  31. {
  32. print("\n----------------------------------");
  33. print(" Essential by TheDucc Exit");
  34. print("----------------------------------\n");
  35. }
  36.  
  37. #endif
  38.  
  39. public OnGameModeInit()
  40. {
  41. SetGameModeText("Essential v1.0");
  42. return 1;
  43. }
  44.  
  45. public OnGameModeExit()
  46. {
  47. return 1;
  48. }
  49. stock GetName( playerid )
  50. {
  51. new
  52. i[ 30 ];
  53. GetPlayerName( playerid , i , 30 ) ;
  54. return ( i );
  55. }
  56. CMD:kill( playerid , params [ ] )
  57. {
  58. #define \
  59. W "{FFFFFF}"
  60.  
  61. #define \
  62. O "{FFAF00}"
  63. #define \
  64. m_SendMessage SendClientMessage
  65. m_SendMessage( playerid , -1 , ""O" Ai murit " ) ;
  66. SetPlayerArmour( playerid , 0.0 ) ;
  67. SetPlayerHealth( playerid , 0.0 ) ;
  68. return ( true ) ;
  69.  
  70. }
  71. CMD:healall( playerid , params [ ] )
  72. {
  73. #define \
  74. W "{FFFFFF}"
  75.  
  76. #define \
  77. O "{FFAF00}"
  78.  
  79. #define \
  80. m_SendMessage SendClientMessage
  81. #define \
  82. Healh SetPlayerHealth
  83. new
  84. str[80] ;
  85.  
  86. foreach(Player, i )
  87. {
  88. Healh( i , 100.0 ) ;
  89. format( str , sizeof ( str ), ""O"[Admin] "W"%s[%d] A dat Heal all ",GetName( playerid ), playerid ) ;
  90. m_SendMessage( i, 1 , str ) ;
  91. }
  92. return ( true ) ;
  93. }
  94. CMD:armourall( playerid , params [ ] )
  95. {
  96. #define \
  97. W "{FFFFFF}"
  98.  
  99. #define \
  100. O "{FFAF00}"
  101.  
  102. #define \
  103. m_SendMessage SendClientMessage
  104.  
  105. #define \
  106. Armour SetPlayerArmour
  107. new
  108. str[81] ;
  109. foreach(Player, i )
  110. {
  111. Armour(i , 100) ;
  112. format( str , sizeof ( str ), ""O"[Admin] "W"%s[%d] A dat Armour all ",GetName( playerid ), playerid ) ;
  113. m_SendMessage( i, 1 , str ) ;
  114. }
  115. return ( true ) ;
  116. }
  117. CMD:clearchat( playerid, params[ ] )
  118. {
  119. #define \
  120. W "{FFFFFF}"
  121.  
  122. #define \
  123. O "{FFAF00}"
  124.  
  125. #define \
  126. m_SendMessage SendClientMessage
  127. if( IsPlayerAdmin( playerid ))
  128. {
  129. foreach(Player, i )
  130. {
  131. m_SendMessage ( i , -1 , " " ) ; m_SendMessage ( i , -1 , " " ) ;
  132. m_SendMessage ( i , -1 , " " ) ; m_SendMessage ( i , -1 , " " ) ;
  133. m_SendMessage ( i , -1 , " " ) ; m_SendMessage ( i , -1 , " " ) ;
  134. m_SendMessage ( i , -1 , " " ) ; m_SendMessage ( i , -1 , " " ) ;
  135. m_SendMessage ( i , -1 , " " ) ; m_SendMessage ( i , -1 , " " ) ;
  136. m_SendMessage ( i , -1 , " " ) ; m_SendMessage ( i , -1 , " " ) ;
  137. m_SendMessage ( i , -1 , " " ) ; m_SendMessage ( i , -1 , " " ) ;
  138. m_SendMessage ( i , -1 , " " ) ; m_SendMessage ( i , -1 , " " ) ;
  139. m_SendMessage ( i , -1 , " " ) ; m_SendMessage ( i , -1 , " " ) ;
  140. m_SendMessage ( i , -1 , " " ) ; m_SendMessage ( i , -1 , " " ) ;
  141. m_SendMessage ( i , -1 , " " ) ; m_SendMessage ( i , -1 , ""O"Chat Clear !!" ) ;
  142. }
  143. }
  144. return ( 1 ) ;
  145. }
  146. CMD:ann( playerid , params[ ] )
  147. {
  148. #define \
  149. W "{FFFFFF}"
  150.  
  151. #define \
  152. O "{FFAF00}"
  153. #define \
  154. Announce GameTextForPlayer
  155. if( IsPlayerAdmin( playerid ))
  156. {
  157. new
  158. TextAnnounce [ 100 ] ;
  159. foreach(Player, i )
  160. {
  161. if( sscanf( params," s[100] ", TextAnnounce ) )
  162. {
  163. m_SendMessage(playerid,-1,""O"INFO: /ann [Text]");
  164. }
  165. Announce( i, TextAnnounce, 6000, 6 );
  166. }
  167. }
  168. return ( true ) ;
  169. }
  170. CMD:jetpack( playerid , params [ ] )
  171. {
  172. #define \
  173. W "{FFFFFF}"
  174.  
  175. #define \
  176. O "{FFAF00}"
  177.  
  178. #define \
  179. m_SendMessage SendClientMessage
  180.  
  181. #define \
  182. m_SpecialAction SetPlayerSpecialAction
  183.  
  184. #define \
  185. JetPack_Spawned SPECIAL_ACTION_USEJETPACK
  186.  
  187. m_SpecialAction( playerid , JetPack_Spawned ) ;
  188. m_SendMessage( playerid, -1 , ""O"Jetpack Spawned" ) ;
  189. return ( true ) ;
  190. }
  191. CMD:kick( playerid , params [ ] )
  192. {
  193.  
  194. #define \
  195. W "{FFFFFF}"
  196.  
  197. #define \
  198. O "{FFAF00}"
  199.  
  200. #define \
  201. m_SendMessage SendClientMessage
  202.  
  203. #define \
  204. No_Exist_ID INVALID_PLAYER_ID
  205. if( IsPlayerAdmin( playerid ))
  206. {
  207. new
  208. Player;
  209. foreach(Player,i)
  210. {
  211. if( sscanf( params," u ",Player ) )
  212. {
  213. m_SendMessage(playerid,-1,""O"INFO: /kick [PlayerName]");
  214. }
  215. else if( Player == No_Exist_ID )
  216. {
  217. m_SendMessage(playerid,-1,""O"ERROR: Acest player nu este conectat");
  218. }
  219. else
  220. {
  221. new
  222. str[82];
  223. m_SendMessage(i, -1,""O"----------------- KICK INFO ------------------------");
  224. format(str,82,""O"[KICK] "W"%s[%d] a primit kick de la adminul %s",GetName( playerid ),playerid,GetName( playerid ));
  225. m_SendMessage(i,-1,str);
  226. printf("str");
  227. Kick(Player);
  228. }
  229. }
  230. }
  231. return ( true ) ;
  232. }
  233. CMD:ban( playerid , params [ ] )
  234. {
  235.  
  236. #define \
  237. W "{FFFFFF}"
  238.  
  239. #define \
  240. O "{FFAF00}"
  241.  
  242. #define \
  243. m_SendMessage SendClientMessage
  244.  
  245. #define \
  246. No_Exist_ID INVALID_PLAYER_ID
  247. if( IsPlayerAdmin( playerid ))
  248. {
  249. new
  250. Player;
  251. foreach(Player,i)
  252. {
  253. if( sscanf( params," u ",Player ) )
  254. {
  255. m_SendMessage(playerid,-1,""O"INFO: /ban [PlayerName]");
  256. }
  257. else if( Player == No_Exist_ID )
  258. {
  259. m_SendMessage(playerid,-1,""O"ERROR: Acest player nu este conectat");
  260. }
  261. else
  262. {
  263. new
  264. str[83];
  265. m_SendMessage(i, -1,""O"----------------- BAN INFO ------------------------");
  266. format(str,83,""O"[KICK] "W"%s[%d] a primit ban de la adminul %s",GetName( playerid ),playerid,GetName( playerid ));
  267. m_SendMessage(i,-1,str);
  268. printf("str");
  269. Ban(Player);
  270. }
  271. }
  272. }
  273. return ( true ) ;
  274. }
  275. CMD:giveallcash( playerid, params[ ] )
  276. {
  277. #define \
  278. W "{FFFFFF}"
  279.  
  280. #define \
  281. O "{FFAF00}"
  282.  
  283. #define \
  284. m_SendMessage SendClientMessage
  285.  
  286. #define \
  287. m_MoneyAll GivePlayerMoney
  288.  
  289. #define \
  290. m_PlaySound PlayerPlaySound
  291. if( IsPlayerAdmin( playerid ) )
  292. {
  293. new
  294. Money ;
  295. foreach(Player, i )
  296. {
  297. if( sscanf( params," uu ",Money ) )
  298. {
  299. m_SendMessage(playerid,-1,""O"INFO: /giveallcash [Amount]");
  300. }
  301.  
  302. m_PlaySound( i, 1057, 0.0, 0.0, 0.0 );
  303. m_MoneyAll( i, Money );
  304. }
  305. }
  306. return ( 1 ) ;
  307. }
  308. CMD:goto( playerid , params [ ] )
  309. {
  310. #pragma \
  311. tabsize 0
  312. #define \
  313. W "{FFFFFF}"
  314.  
  315. #define \
  316. O "{FFAF00}"
  317.  
  318. #define \
  319. m_SendMessage SendClientMessage
  320.  
  321. #define \
  322. No_Exist_ID INVALID_PLAYER_ID
  323. if( IsPlayerAdmin( playerid ))
  324. {
  325. new
  326. Player;
  327. if( sscanf( params," u " ,Player) )
  328. {
  329. m_SendMessage(playerid,-1,""O"INFO : /goto [PlayerName]");
  330. }
  331. else if(Player == No_Exist_ID)
  332. {
  333. m_SendMessage(playerid,-1,""O"ERROR: Acest player nu este conectat");
  334. }
  335. else
  336. {
  337. new
  338. Float: x ,
  339. Float: y ,
  340. Float: z ;
  341. GetPlayerPos(Player,x,y,z);
  342. if(!IsPlayerInAnyVehicle( playerid ))
  343. {
  344. SetPlayerPos(playerid, x+1 , y , z );
  345. }
  346. if(IsPlayerInAnyVehicle( playerid ))
  347. {
  348. SetVehiclePos( GetPlayerVehicleID( playerid ), x+1 , y+1 , z );
  349. }
  350. }
  351. }
  352. return ( true ) ;
  353. }
  354. CMD:gmx( playerid , params [ ] )
  355. {
  356. #define \
  357. W "{FFFFFF}"
  358.  
  359. #define \
  360. O "{FFAF00}"
  361.  
  362. #define \
  363. m_SendMessage SendClientMessage
  364. if( IsPlayerAdmin ( playerid ) )
  365. {
  366. new
  367. str[600];
  368. foreach(Player, i )
  369. {
  370. SendRconCommand(" gmx ") ;
  371. format ( str , sizeof ( str ) , "%s Restarted server", GetName( playerid ) );
  372. m_SendMessage ( i , -1 , str ) ;
  373. printf("str") ;
  374. }
  375. }
  376. return ( true ) ;
  377. }
  378. CMD:essential( playerid , params [ ] )
  379. {
  380. #define \
  381. W "{FFFFFF}"
  382.  
  383. #define \
  384. O "{FFAF00}"
  385.  
  386. #define \
  387. m_SendMessage SendClientMessage
  388. m_SendMessage( playerid , -1 , " "W"Essential "O"v1.0 " ) ;
  389. m_SendMessage( playerid , -1 , " "O"/healall /armourall" ) ;
  390. m_SendMessage( playerid , -1 , " "W"/jetpack /kill" ) ;
  391. m_SendMessage( playerid , -1 , " "O"/giveallcash - RCON" ) ;
  392. m_SendMessage( playerid , -1 , " "W"/ban /kick - RCON" ) ;
  393. m_SendMessage( playerid , -1 , " "O"/ann /gmx - RCONl" ) ;
  394. return ( true ) ;
  395. }
Advertisement
Add Comment
Please, Sign In to add comment