Advertisement
Guest User

Untitled

a guest
Mar 6th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.43 KB | None | 0 0
  1. //includes
  2. #include <a_samp>
  3. #include <zcmd>
  4. #include <fly>
  5. #include <sscanf2>
  6. //defines obligatori
  7. #define FILTERSCRIPT
  8. #if defined FILTERSCRIPT
  9. //defines
  10. #define SCM SendClientMessage
  11. #define SCMTOALL SendClientMessageToAll
  12. #define COLOR_GREEN 0x7DAB57FF
  13. //new
  14. new FarmCars[3];
  15. new FarmCP[MAX_PLAYERS];
  16.  
  17. public OnFilterScriptInit()
  18. {
  19. print("\n--------------------------------------");
  20. print(" Blank Filterscript by your name here");
  21. print("--------------------------------------\n");
  22. return 1;
  23. }
  24.  
  25. public OnFilterScriptExit()
  26. {
  27. return 1;
  28. }
  29.  
  30. #else
  31.  
  32. main()
  33. {
  34. print("\n----------------------------------");
  35. print(" Blank Gamemode by your name here");
  36. print("----------------------------------\n");
  37. }
  38.  
  39. #endif
  40.  
  41. public OnGameModeInit()
  42. {
  43. FarmCars[0] = CreateVehicle(531, -373.4141, -1422.6749, 25.7817, -2.1000, -1, -1, 100);
  44. FarmCars[1] = CreateVehicle(531, -373.4141, -1417.8628, 25.7817, -2.8800, -1, -1, 100);
  45. FarmCars[2] = CreateVehicle(531, -373.4141, -1427.2970, 25.7817, -2.1000, -1, -1, 100);
  46. SetGameModeText("rpg.gamers.ro v0.1");
  47. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  48. return 1;
  49. }
  50.  
  51. public OnGameModeExit()
  52. {
  53. return 1;
  54. }
  55.  
  56. public OnPlayerRequestClass(playerid, classid)
  57. {
  58. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  59. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  60. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  61. return 1;
  62. }
  63.  
  64. public OnPlayerConnect(playerid)
  65. {
  66. FarmCP(playerid) = 0;
  67. SetPlayerPos(playerid,1799.2095, -1866.3105, 13.5716);
  68. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  69. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  70. InitFly(playerid);
  71. return 1;
  72. }
  73.  
  74. public OnPlayerDisconnect(playerid, reason)
  75. {
  76. return 1;
  77. }
  78.  
  79. public OnPlayerSpawn(playerid)
  80. {
  81. SendClientMessage(playerid, COLOR_GREEN, "Bine ai venit!");
  82. return 1;
  83. }
  84.  
  85. public OnPlayerDeath(playerid, killerid, reason)
  86. {
  87. return 1;
  88. }
  89.  
  90. public OnVehicleSpawn(vehicleid)
  91. {
  92. return 1;
  93. }
  94.  
  95. public OnVehicleDeath(vehicleid, killerid)
  96. {
  97. return 1;
  98. }
  99.  
  100. public OnPlayerText(playerid, text[])
  101. {
  102. return 1;
  103. }
  104.  
  105. public OnPlayerCommandText(playerid, cmdtext[])
  106. {
  107. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  108. {
  109. // Do something here
  110. return 1;
  111. }
  112. return 0;
  113. }
  114.  
  115. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  116. {
  117. return 1;
  118. }
  119.  
  120. public OnPlayerExitVehicle(playerid, vehicleid)
  121. {
  122. if(vehicleid == FarmCars[0] || vehicleid == FarmCars[1] || vehicleid == FarmCars[2])
  123. {
  124. DisablePlayerCheckpoint(playerid);
  125. FarmCP(playerid) = 0;
  126. SetVehicleToRespawn(vehicleid);
  127. SCM(playerid, -1, "Jobul tau a esuat!");
  128. }
  129. return 1;
  130. }
  131.  
  132. public OnPlayerStateChange(playerid, newstate, oldstate)
  133. {
  134. if(newstate == PLAYER_STATE_DRIVER)
  135. {
  136. new vehicleid = GetPlayerVehicleID(playerid);
  137. if(vehicleid == FarmCars[0] || vehicleid == FarmCars[1] || vehicleid == FarmCars[2])
  138. {
  139. FarmCP(playerid) = 1;
  140. DisablePlayerCheckpoint(playerid);
  141. SetPlayerCheckpoint(playerid, -384.6528, -1389.7775, 25.8392, 3.0);
  142. }
  143. }
  144. return 1;
  145. }
  146.  
  147. public OnPlayerEnterCheckpoint(playerid)
  148. {
  149. if(FarmCP(playerid) == 1)
  150. {
  151. DisablePlayerCheckpoint(playerid);
  152. FarmCP(playerid) = 2;
  153. SetPlayerCheckpoint(playerid, -384.5160, -1379.8358, 25.8392, 3.0);
  154. }
  155. else if(FarmCP(playerid) = 2)
  156. {
  157. DisablePlayerCheckpoint(playerid);
  158. FarmCP(playerid) = 3;
  159. SetPlayerCheckpoint(playerid, -384.3154, -1373.1550, 25.8392, 3.0);
  160. }
  161. else if(FarmCP(playerid) = 3)
  162. {
  163. DisablePlayerCheckpoint(playerid);
  164. FarmCP(playerid) = 0;
  165. SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  166. SCM(playerid, -1, "Ai primit $10.000 pentru ca ai terminat de muncit");
  167. GivePlayerMoney(playerid, 10000);
  168. }
  169. return 1;
  170. }
  171.  
  172. public OnPlayerLeaveCheckpoint(playerid)
  173. {
  174. return 1;
  175. }
  176.  
  177. public OnPlayerEnterRaceCheckpoint(playerid)
  178. {
  179. return 1;
  180. }
  181.  
  182. public OnPlayerLeaveRaceCheckpoint(playerid)
  183. {
  184. return 1;
  185. }
  186.  
  187. public OnRconCommand(cmd[])
  188. {
  189. return 1;
  190. }
  191.  
  192. public OnPlayerRequestSpawn(playerid)
  193. {
  194. return 1;
  195. }
  196.  
  197. public OnObjectMoved(objectid)
  198. {
  199. return 1;
  200. }
  201.  
  202. public OnPlayerObjectMoved(playerid, objectid)
  203. {
  204. return 1;
  205. }
  206.  
  207. public OnPlayerPickUpPickup(playerid, pickupid)
  208. {
  209. return 1;
  210. }
  211.  
  212. public OnVehicleMod(playerid, vehicleid, componentid)
  213. {
  214. return 1;
  215. }
  216.  
  217. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  218. {
  219. return 1;
  220. }
  221.  
  222. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  223. {
  224. return 1;
  225. }
  226.  
  227. public OnPlayerSelectedMenuRow(playerid, row)
  228. {
  229. return 1;
  230. }
  231.  
  232. public OnPlayerExitedMenu(playerid)
  233. {
  234. return 1;
  235. }
  236.  
  237. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  238. {
  239. return 1;
  240. }
  241.  
  242. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  243. {
  244. return 1;
  245. }
  246.  
  247. public OnRconLoginAttempt(ip[], password[], success)
  248. {
  249. return 1;
  250. }
  251.  
  252. public OnPlayerUpdate(playerid)
  253. {
  254. return 1;
  255. }
  256.  
  257. public OnPlayerStreamIn(playerid, forplayerid)
  258. {
  259. return 1;
  260. }
  261.  
  262. public OnPlayerStreamOut(playerid, forplayerid)
  263. {
  264. return 1;
  265. }
  266.  
  267. public OnVehicleStreamIn(vehicleid, forplayerid)
  268. {
  269. return 1;
  270. }
  271.  
  272. public OnVehicleStreamOut(vehicleid, forplayerid)
  273. {
  274. return 1;
  275. }
  276.  
  277. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  278. {
  279. return 1;
  280. }
  281.  
  282. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  283. {
  284. return 1;
  285. }
  286.  
  287. CMD:healme(playerid, params[])
  288. {
  289. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD111CFF, "Nu esti autorizat sa folosesti aceasta comanda.");
  290. SetPlayerHealth(playerid, 100);
  291. SendClientMessage(playerid, 0xBA3A7CFF, "You are healed");
  292. return 1;
  293. }
  294.  
  295. CMD:kill(playerid, params[])
  296. {
  297. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD111CFF, "Nu esti autorizat sa folosesti aceasta comanda.");
  298. SetPlayerHealth(playerid, 0);
  299. SendClientMessage(playerid, 0x756553FF, "You are killed");
  300. return 1;
  301. }
  302.  
  303. CMD:gmx(playerid, params[])
  304. {
  305. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD111CFF, "Nu esti autorizat sa folosesti aceasta comanda.");
  306. SendRconCommand("gmx");
  307. return 1;
  308. }
  309.  
  310. CMD:aonduty(playerid, params[])
  311. {
  312. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD111CFF, "Nu esti autorizat sa folosesti aceasta comanda.");
  313. SetPlayerSkin(playerid, 271);
  314. SendClientMessage(playerid, 0x64705AFF, "Ai activat aduty");
  315. return 1;
  316. }
  317.  
  318. CMD:aoffduty(playerid, params[])
  319. {
  320. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD111CFF, "Nu esti autorizat sa folosesti aceasta comanda.");
  321. SetPlayerSkin(playerid, 7);
  322. SendClientMessage(playerid, 0x64705AFF, "Ai dezactivat aduty");
  323. return 1;
  324. }
  325.  
  326. CMD:inf(playerid, parmas[])
  327. {
  328. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD111CFF, "Nu esti autorizat sa folosesti aceasta comanda.");
  329. new Float:x, Float:y, Float:z, Float:az;
  330. GetPlayerPos(playerid, x, y, z);
  331. GetPlayerFacingAngle(playerid, az);
  332. CreateVehicle(411, x+5, y+5, z, az, -1, -1, 180);
  333. return 1;
  334. }
  335.  
  336. CMD:nrg(playerid, parmas[])
  337. {
  338. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD111CFF, "Nu esti autorizat sa folosesti aceasta comanda.");
  339. new Float:x, Float:y, Float:z, Float:az;
  340. GetPlayerPos(playerid, x, y, z);
  341. GetPlayerFacingAngle(playerid, az);
  342. CreateVehicle(522, x+5, y+5, z, az, -1, -1, 180);
  343. return 1;
  344. }
  345.  
  346. CMD:gotospawn(playerid, params[])
  347. {
  348. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD111CFF, "Nu esti autorizat sa folosesti aceasta comanda.");
  349. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  350. SendClientMessage(playerid, 0x4D5ABDFF, "Teleported");
  351. return 1;
  352. }
  353.  
  354. CMD:getdeagle(playerid, params[])
  355. {
  356. //if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD111CFF, "Nu esti autorizat sa folosesti aceasta comanda.");
  357. if(GetPlayerMoney(playerid) <2400) return SendClientMessage(playerid,0xAA3333AA, "Nu ai $2400");
  358. GivePlayerWeapon(playerid, 24, 999);
  359. SendClientMessage(playerid, 0x14A348FF, "Arma a fost primita.");
  360. return 1;
  361. }
  362.  
  363. CMD:getm4(playerid, params[])
  364. {
  365. //if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD111CFF, "Nu esti autorizat sa folosesti aceasta comanda.");
  366. if(GetPlayerMoney(playerid) <3100) return SendClientMessage(playerid,0xAA3333AA, "Nu ai $3100");
  367. GivePlayerWeapon(playerid, 31, 999);
  368. SendClientMessage(playerid, 0x14A348FF, "Arma a fost primita.");
  369. return 1;
  370. }
  371.  
  372. CMD:owner(playerid, params[])
  373. {
  374. SCM(playerid, 0xF21313FF, "Ownerul principal este Bogdy");
  375. return 1;
  376. }
  377.  
  378. CMD:panel(playerid, params[])
  379. {
  380. SCM(playerid, 0x6E6E6EFF, "Panel-ul server-ului este xplaygamers.ro/panel te rog sa il vizitezi si tu.");
  381. return 1;
  382. }
  383.  
  384. CMD:forum(playerid, params[])
  385. {
  386. SCM(playerid, 0x6E6E6EFF, "Forum-ul server-ului este xplaygamers.ro/forum te rog sa il vizitezi si tu.");
  387. return 1;
  388. }
  389.  
  390. CMD:flymode(playerid,parmas[])
  391. {
  392. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD111CFF, "Nu esti autorizat sa folosesti aceasta comanda.");
  393. StartFly(playerid);
  394. return 1;
  395. }
  396.  
  397. CMD:stopfly(playerid,params[])
  398. {
  399. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD111CFF, "Nu esti autorizat sa folosesti aceasta comanda.");
  400. StopFly(playerid);
  401. return 1;
  402. }
  403.  
  404. CMD:freezeme(playerid, params[])
  405. {
  406. TogglePlayerControllable(playerid, 0);
  407. SCM(playerid, -1, "You are freezed.");
  408. return 1;
  409. }
  410.  
  411. CMD:unfreezeme(playerid, params[])
  412. {
  413. TogglePlayerControllable(playerid, 1);
  414. SCM(playerid, -1, "You are unfreezed.");
  415. return 1;
  416. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement