Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.20 KB | None | 0 0
  1. #include <a_samp>
  2. #define Yellow 0xFFFF00AA
  3. #define Black 0x000000FF
  4. #define Blue 0x00FFFFFF
  5. #define Pink 0xFF00FFFF
  6. #define GreenD 0x33AA33AA
  7. #define Grey 0x999999ff
  8. #define Orange 0xFF9900AA
  9. #define White 0xFFFFFFFF
  10. #define Green 0x00FF00FF
  11. #define Red 0xFF0000FF
  12. //=========== - Defines - ===========
  13. new Pickup[7];
  14. new Move[1];
  15. #if defined FILTERSCRIPT
  16.  
  17. public OnFilterScriptInit()
  18. {
  19. print("\n--------------------------------------");
  20. print(" Blank Filterscript by Or - ShiTDemoN & Kfir - H0LyPrO");
  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 Filterscript by Or - ShiTDemoN & Kfir - H0LyPrO");
  36. print("----------------------------------\n");
  37. }
  38.  
  39. #endif
  40.  
  41. public OnGameModeInit()
  42. {
  43. SetGameModeText("RPMode");
  44. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  45. AddPlayerClass(270, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  46. //--------Pizza - Grove Street--------
  47. Pickup[0] = CreatePickup(1239,23,2105.4868,-1806.5668,13.5547);
  48. Pickup[1] = CreatePickup(1239,23,372.3207,-133.5246,1001.4922);
  49. //--------Binco Clothes Shop - Grove Street--------
  50. Pickup[2] = CreatePickup(1239,23,2244.3958,-1665.5691,15.4766);
  51. Pickup[3] = CreatePickup(1239,23,207.6549,-111.2661,1005.132);
  52. //--------Los Santos Police Department--------
  53. Pickup[4] = CreatePickup(1239,23,1555.4967,-1675.6340,16.1953);
  54. return 1;
  55. }
  56.  
  57. public OnGameModeExit()
  58. {
  59. return 1;
  60. }
  61.  
  62. public OnPlayerRequestClass(playerid, classid)
  63. {
  64. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  65. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  66. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  67. return 1;
  68. }
  69.  
  70. public OnPlayerConnect(playerid)
  71. {
  72. return 1;
  73. }
  74.  
  75. public OnPlayerDisconnect(playerid, reason)
  76. {
  77. return 1;
  78. }
  79.  
  80. public OnPlayerSpawn(playerid)
  81. {
  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. // text range
  103. for(new i=0; i<MAX_PLAYERS; i++)
  104. {
  105. new Float:x, Float:y, Float:z;
  106. GetPlayerPos(playerid, x, y, z);
  107. new s[256];
  108. new pName[MAX_PLAYER_NAME];
  109. GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  110. format(s, sizeof(s), "%s [ID:%d] say: %s ",pName, playerid, text);
  111. if(IsPlayerInRangeOfPoint(i, 5, x, y, z))
  112. {
  113. SendClientMessage(i, Grey, s);
  114. return 1;
  115. }
  116. }
  117. return 1;
  118. }
  119.  
  120. public OnPlayerCommandText(playerid, cmdtext[])
  121. {
  122. new cmd[256],idx;
  123. cmd = strtok(cmdtext,idx);
  124. new tmp[256];
  125. tmp = strrest(cmdtext,idx);
  126. // b
  127. if(!strcmp(cmd,"/b",true))
  128. {
  129. if(!strlen(tmp)) return SendClientMessage(playerid,0xFF9900AA,"ERROR: /B Text");
  130. for(new i; i<MAX_PLAYERS;i++)
  131. {
  132. new Float:X,Float:Y,Float:Z;
  133. GetPlayerPos(playerid,X,Y,Z);
  134. if(IsPlayerInRangeOfPoint(i,10.0,X,Y,Z))
  135. {
  136. new str[256];
  137. new pName[MAX_PLAYER_NAME];
  138. GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  139. format(str,sizeof(str),"((%s [ID:%d] say: %s ))" ,pName,playerid,tmp);
  140. SendClientMessage(i,0xFF9900AA,str);
  141. }
  142. }
  143. return 1;
  144. }
  145. // b end
  146. return 1;
  147. }
  148.  
  149. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  150. {
  151. return 1;
  152. }
  153.  
  154. public OnPlayerExitVehicle(playerid, vehicleid)
  155. {
  156. return 1;
  157. }
  158.  
  159. public OnPlayerStateChange(playerid, newstate, oldstate)
  160. {
  161. return 1;
  162. }
  163.  
  164. public OnPlayerEnterCheckpoint(playerid)
  165. {
  166. return 1;
  167. }
  168.  
  169. public OnPlayerLeaveCheckpoint(playerid)
  170. {
  171. return 1;
  172. }
  173.  
  174. public OnPlayerEnterRaceCheckpoint(playerid)
  175. {
  176. return 1;
  177. }
  178.  
  179. public OnPlayerLeaveRaceCheckpoint(playerid)
  180. {
  181. return 1;
  182. }
  183.  
  184. public OnRconCommand(cmd[])
  185. {
  186. return 1;
  187. }
  188.  
  189. public OnPlayerRequestSpawn(playerid)
  190. {
  191. return 1;
  192. }
  193.  
  194. public OnObjectMoved(objectid)
  195. {
  196. return 1;
  197. }
  198.  
  199. public OnPlayerObjectMoved(playerid, objectid)
  200. {
  201. return 1;
  202. }
  203.  
  204. public OnPlayerPickUpPickup(playerid, pickupid)
  205. {
  206. if(pickupid == Pickup[0])
  207. {
  208. GameTextForPlayer(playerid,"~g~Pizza",1000,1);
  209. }
  210. if(pickupid == Pickup[2])
  211. {
  212. GameTextForPlayer(playerid,"~g~Clothes Shop",1000,1);
  213. }
  214. if(pickupid == Pickup[4])
  215. {
  216. GameTextForPlayer(playerid,"~g~LSPD",1000,1);
  217. }
  218. if(pickupid == Pickup[5])
  219. {
  220. GameTextForPlayer(playerid,"~g~Taxi Station",1000,1);
  221. }
  222. return 1;
  223. }
  224.  
  225. public OnVehicleMod(playerid, vehicleid, componentid)
  226. {
  227. return 1;
  228. }
  229.  
  230. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  231. {
  232. return 1;
  233. }
  234.  
  235. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  236. {
  237. return 1;
  238. }
  239.  
  240. public OnPlayerSelectedMenuRow(playerid, row)
  241. {
  242. return 1;
  243. }
  244.  
  245. public OnPlayerExitedMenu(playerid)
  246. {
  247. return 1;
  248. }
  249.  
  250. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  251. {
  252. return 1;
  253. }
  254.  
  255. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  256. {
  257. #define PRESSED(%0) \
  258. (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  259. if(PRESSED(KEY_SECONDARY_ATTACK))
  260. {
  261. if(IsPlayerInRangeOfPoint(playerid,1.0,2104.8760,-1806.3451,13.5547))
  262. {
  263. SetPlayerInterior(playerid,5);
  264. SetPlayerPos(playerid,372.3520,-131.6510,1001.4922);
  265. SetPlayerFacingAngle(playerid,359.9000);
  266. return 1;
  267. }
  268. if(IsPlayerInRangeOfPoint(playerid,1.0,372.3207,-133.5246,1001.4922))
  269. {
  270. SetPlayerInterior(playerid,0);
  271. SetPlayerPos(playerid,2101.6208,-1806.2668,13.5547);
  272. SetPlayerFacingAngle(playerid,88.3070);
  273. return 1;
  274. }
  275. if(IsPlayerInRangeOfPoint(playerid,1.0,2244.3958,-1665.5691,15.4766))
  276. {
  277. SetPlayerInterior(playerid,15);
  278. SetPlayerPos(playerid,207.7380,-109.0200,1005.1328);
  279. SetPlayerFacingAngle(playerid,0.0000);
  280. return 1;
  281. }
  282. if(IsPlayerInRangeOfPoint(playerid,1.0,207.6549,-111.2661,1005.1328))
  283. {
  284. SetPlayerInterior(playerid,0);
  285. SetPlayerPos(playerid,2244.9370,-1664.0079,15.4766);
  286. SetPlayerFacingAngle(playerid,342.8983);
  287. return 1;
  288. }
  289. if(IsPlayerInRangeOfPoint(playerid,1.0,1080.4435,-1741.8802,13.4836))
  290. {
  291. SetPlayerInterior(playerid,0);
  292. SetPlayerPos(playerid,1080.4448,-1738.8640,13.5101);
  293. SetPlayerFacingAngle(playerid,1.4081);
  294. return 1;
  295. }
  296. if(IsPlayerInRangeOfPoint(playerid,1.0,1080.3885,-1740.9690,13.4917))
  297. {
  298. SetPlayerInterior(playerid,0);
  299. SetPlayerPos(playerid,1080.3326,-1743.6438,13.4683);
  300. SetPlayerFacingAngle(playerid,175.0775);
  301. return 1;
  302. }
  303. }
  304. if(PRESSED(KEY_CROUCH))
  305. {
  306. if(IsPlayerInRangeOfPoint(playerid,5.0,1102.009765625, -1743.4544677734, 13.11607170105))
  307. {
  308. SetObjectRot(Move[0],1.6095886230469, 0, 91.355895996094);
  309. SetTimerEx("Gate",6000,0,"i",playerid);
  310. return 1;
  311. }
  312. }
  313. return 1;
  314. }
  315.  
  316. public OnRconLoginAttempt(ip[], password[], success)
  317. {
  318. return 1;
  319. }
  320.  
  321. public OnPlayerUpdate(playerid)
  322. {
  323. for(new i = 0; i < MAX_PLAYERS; i++)
  324. {
  325. new Float:X,Float:Y,Float:Z;
  326. GetPlayerPos(playerid,X,Y,Z);
  327. if(IsPlayerInRangeOfPoint(playerid,10.0,X,Y,Z))
  328. {
  329. ShowPlayerNameTagForPlayer(i,playerid,1);
  330. }
  331. }
  332. return 1;
  333. }
  334.  
  335. public OnPlayerStreamIn(playerid, forplayerid)
  336. {
  337. return 1;
  338. }
  339.  
  340. public OnPlayerStreamOut(playerid, forplayerid)
  341. {
  342. return 1;
  343. }
  344.  
  345. public OnVehicleStreamIn(vehicleid, forplayerid)
  346. {
  347. return 1;
  348. }
  349.  
  350. public OnVehicleStreamOut(vehicleid, forplayerid)
  351. {
  352. return 1;
  353. }
  354.  
  355. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  356. {
  357. return 1;
  358. }
  359.  
  360. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  361. {
  362. return 1;
  363. }
  364. stock strrest(const string[],index)
  365. {
  366. new length = strlen(string),offset = index,result[256];
  367. while((index < length) && ((index - offset) < (sizeof(result) - 1)) && (string[index] > '\r')) result[index - offset] = string[index],index++;
  368. result[index - offset] = EOS;
  369. if(result[0] == ' ' && string[0] != ' ') strdel(result,0,1);
  370. return result;
  371. }
  372. strtok(const string[], &index)
  373. {
  374. new length = strlen(string);
  375. while ((index < length) && (string[index] <= ' '))
  376. {
  377. index++;
  378. }
  379. new offset = index;
  380. new result[20];
  381. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  382. {
  383. result[index - offset] = string[index];
  384. index++;
  385. }
  386. result[index - offset] = EOS;
  387. return result;
  388. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement