Advertisement
Guest User

fix

a guest
Jan 19th, 2013
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.09 KB | None | 0 0
  1. /*******************************************************************************
  2. * FS NAME: Los Santos Life CnR Admin System
  3. * FS VERSION: v1.0
  4. * FS DEVELOPER: Goldkiller
  5. *
  6. * INFORMATION: Los Santos Life Cops n Robbers is a gamemode which was created
  7. * on the 19.1.2013. This script contains lots of functions, commands, and
  8. * admin commands.
  9. *
  10. * FS INFO: This FS was created by Goldkiller, it is an Admin System used
  11. * in Los Santos Life CnR. It was created on 19.1.2013. You may not steal it
  12. *
  13. *
  14. * Copyright 2013. Do not steal this Filterscript, if your using it, leave the
  15. * credits on.
  16. *******************************************************************************/
  17.  
  18. #define FILTERSCRIPT
  19.  
  20. #include <a_samp>
  21. #include <sscanf2>
  22. #include <YSI\y_ini>
  23. #include <zcmd>
  24.  
  25. #define UserPath "/Users/%s.ini"
  26.  
  27. #if defined FILTERSCRIPT
  28.  
  29. public OnFilterScriptInit()
  30. {
  31. print("\n--------------------------------------");
  32. print(" Admin FS By Goldkiller");
  33. print("--------------------------------------\n");
  34. return 1;
  35. }
  36.  
  37. public OnFilterScriptExit()
  38. {
  39. return 1;
  40. }
  41.  
  42. #else
  43.  
  44. main()
  45. {
  46. print("\n----------------------------------");
  47. print(" Blank Gamemode by your name here");
  48. print("----------------------------------\n");
  49. }
  50.  
  51. #endif
  52.  
  53. CMD:promote(playerid,params[])
  54. {
  55. new id,level;
  56. if(IsPlayerAdmin(playerid))
  57. {
  58. if(sscanf(params,"ud",id,level)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: ID Level");
  59. else
  60. {
  61. if(level > 5) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Max Admin level is 5");
  62. else
  63. {
  64. new INI:File = INI_Open(Path(id));
  65. INI_WriteInt(File,"Admin",level);
  66. INI_Close(File);
  67. }
  68. }
  69. }
  70. else
  71. {
  72. SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not logged in as an RCON Admin");
  73. }
  74. return 1;
  75. }
  76.  
  77. public OnGameModeInit()
  78. {
  79. // Don't use these lines if it's a filterscript
  80. SetGameModeText("Blank Script");
  81. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  82. return 1;
  83. }
  84.  
  85. public OnGameModeExit()
  86. {
  87. return 1;
  88. }
  89.  
  90. public OnPlayerRequestClass(playerid, classid)
  91. {
  92. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  93. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  94. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  95. return 1;
  96. }
  97.  
  98. public OnPlayerConnect(playerid)
  99. {
  100. return 1;
  101. }
  102.  
  103. public OnPlayerDisconnect(playerid, reason)
  104. {
  105. return 1;
  106. }
  107.  
  108. public OnPlayerSpawn(playerid)
  109. {
  110. return 1;
  111. }
  112.  
  113. public OnPlayerDeath(playerid, killerid, reason)
  114. {
  115. return 1;
  116. }
  117.  
  118. public OnVehicleSpawn(vehicleid)
  119. {
  120. return 1;
  121. }
  122.  
  123. public OnVehicleDeath(vehicleid, killerid)
  124. {
  125. return 1;
  126. }
  127.  
  128. public OnPlayerText(playerid, text[])
  129. {
  130. return 1;
  131. }
  132.  
  133. public OnPlayerCommandText(playerid, cmdtext[])
  134. {
  135. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  136. {
  137. // Do something here
  138. return 1;
  139. }
  140. return 0;
  141. }
  142.  
  143. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  144. {
  145. return 1;
  146. }
  147.  
  148. public OnPlayerExitVehicle(playerid, vehicleid)
  149. {
  150. return 1;
  151. }
  152.  
  153. public OnPlayerStateChange(playerid, newstate, oldstate)
  154. {
  155. return 1;
  156. }
  157.  
  158. public OnPlayerEnterCheckpoint(playerid)
  159. {
  160. return 1;
  161. }
  162.  
  163. public OnPlayerLeaveCheckpoint(playerid)
  164. {
  165. return 1;
  166. }
  167.  
  168. public OnPlayerEnterRaceCheckpoint(playerid)
  169. {
  170. return 1;
  171. }
  172.  
  173. public OnPlayerLeaveRaceCheckpoint(playerid)
  174. {
  175. return 1;
  176. }
  177.  
  178. public OnRconCommand(cmd[])
  179. {
  180. return 1;
  181. }
  182.  
  183. public OnPlayerRequestSpawn(playerid)
  184. {
  185. return 1;
  186. }
  187.  
  188. public OnObjectMoved(objectid)
  189. {
  190. return 1;
  191. }
  192.  
  193. public OnPlayerObjectMoved(playerid, objectid)
  194. {
  195. return 1;
  196. }
  197.  
  198. public OnPlayerPickUpPickup(playerid, pickupid)
  199. {
  200. return 1;
  201. }
  202.  
  203. public OnVehicleMod(playerid, vehicleid, componentid)
  204. {
  205. return 1;
  206. }
  207.  
  208. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  209. {
  210. return 1;
  211. }
  212.  
  213. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  214. {
  215. return 1;
  216. }
  217.  
  218. public OnPlayerSelectedMenuRow(playerid, row)
  219. {
  220. return 1;
  221. }
  222.  
  223. public OnPlayerExitedMenu(playerid)
  224. {
  225. return 1;
  226. }
  227.  
  228. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  229. {
  230. return 1;
  231. }
  232.  
  233. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  234. {
  235. return 1;
  236. }
  237.  
  238. public OnRconLoginAttempt(ip[], password[], success)
  239. {
  240. return 1;
  241. }
  242.  
  243. public OnPlayerUpdate(playerid)
  244. {
  245. return 1;
  246. }
  247.  
  248. public OnPlayerStreamIn(playerid, forplayerid)
  249. {
  250. return 1;
  251. }
  252.  
  253. public OnPlayerStreamOut(playerid, forplayerid)
  254. {
  255. return 1;
  256. }
  257.  
  258. public OnVehicleStreamIn(vehicleid, forplayerid)
  259. {
  260. return 1;
  261. }
  262.  
  263. public OnVehicleStreamOut(vehicleid, forplayerid)
  264. {
  265. return 1;
  266. }
  267.  
  268. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  269. {
  270. return 1;
  271. }
  272.  
  273. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  274. {
  275. return 1;
  276. }
  277.  
  278. stock UserPath(playerid)
  279. {
  280. new string[128],playername[MAX_PLAYER_NAME];
  281. GetPlayerName(playerid,playername,sizeof(playername));
  282. format(string,sizeof(string),PATH,playername);
  283. return string;
  284. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement