Guest User

Untitled

a guest
Apr 8th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.83 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 <cp>
  7. #include <streamer>
  8.  
  9. #if defined FILTERSCRIPT
  10.  
  11. public OnFilterScriptInit()
  12. {
  13. print("\n--------------------------------------");
  14. print(" Blank Filterscript by your name here");
  15. print("--------------------------------------\n");
  16. return 1;
  17. }
  18.  
  19.  
  20. #define TELEPORTE_FROM_POS<%0> _TELE[%0][FromX],_TELE[%0][FromY],_TELE[%0][FromZ],INTERIOR<INTERIORES:_TELE[%0][Fi]>
  21. #define TELEPORTE_TO_POS<%0> _TELE[%0][ToX],_TELE[%0][ToY],_TELE[%0][ToZ],INTERIOR<INTERIORES:_TELE[%0][Ti]>
  22.  
  23. #define MAX_TELEPORTES 5
  24.  
  25. #define INTERIOR<%0> _:%0,_Interior[%0][I_interior]
  26.  
  27. enum INTERIOR_INFO
  28. {
  29. I_interior,
  30. I_nome[32]
  31. }
  32.  
  33. enum INTERIORES
  34. {
  35. _MUNDO,
  36. _PREF_LS,
  37. _PREF_LV,
  38. _PREF_BC
  39. }
  40.  
  41.  
  42. new _Interior[INTERIORES][INTERIOR_INFO]=
  43. {
  44. {0, "Mundo"},
  45. {3, "Prefeitura LS"},
  46. {3, "Prefeitura LV"},
  47. {3, "Prefeitura BC"}
  48. };
  49.  
  50.  
  51. stock GetWord(i)
  52. return _:i;
  53.  
  54. stock GetInterior(i)
  55. return _:_Interior[_:i][I_interior];
  56.  
  57. stock GetInteriorNome(wordid)
  58. return _Interior[_:wordid][I_nome];
  59.  
  60.  
  61.  
  62.  
  63.  
  64. static CPT[MAX_TELEPORTES]; //CheckPoint Teleporte
  65. static LastCPT[MAX_PLAYERS]; //ultimo CheckPoint de telerpote
  66.  
  67.  
  68. enum TELE_INFO
  69. {
  70. Float:FromX,
  71. Float:FromY,
  72. Float:FromZ,
  73. Fi,
  74. Float:ToX,
  75. Float:ToY,
  76. Float:ToZ,
  77. Ti,
  78. Tmessage[100]
  79. }
  80.  
  81. static _TELE[MAX_TELEPORTES][TELE_INFO]=
  82. {
  83. {246.7840,63.9002,1003.6406,_:_DP_LS, 1553.9879,-1675.4504,16.2953, _:_MUNDO, "~w~Precisone: ~g~~h~(F)~w~ para sair da delegacia"},
  84. {246.3030,87.2807,1003.6406,_:_DP_LS, 1525.4456,-1678.0431,5.8906, _:_MUNDO, "~w~Precisone: ~g~~h~(F)~w~ para sair da delegacia"},
  85. {1553.9879,-1675.4504,16.2953,_:_MUNDO, 246.7840,63.9002, 1003.6406, _:_DP_LS, "~w~Precisone: ~g~~h~(F)~w~ para entrar na delegacia"},
  86. {1568.6914,-1691.1642,5.8906,_:_MUNDO, 246.3030,87.2807, 1003.6406, _:_DP_LS, "~w~Precisone: ~g~~h~(F)~w~ para entrar na delegacia"},
  87. {1525.4456,-1678.0431,5.8906,_:_MUNDO, 246.3030,87.2807, 1003.6406, _:_DP_LS, "~w~Precisone: ~g~~h~(F)~w~ para entrar na delegacia"},
  88. };
  89.  
  90.  
  91.  
  92. public OnFilterScriptExit()
  93. {
  94. return 1;
  95. }
  96.  
  97. #else
  98.  
  99. main()
  100. {
  101. print("\n----------------------------------");
  102. print(" Blank Gamemode by your name here");
  103. print("----------------------------------\n");
  104. }
  105.  
  106. #endif
  107.  
  108. public OnGameModeInit()
  109. {
  110.  
  111. CreateButton(244.898437,73.343383,1003.000,"",INTERIOR<_DP_LS>);
  112. CreateCheckPoint("dp", CP_CIRCLE, 0x99FF0000, 249.3933,69.7072, 1003.6406,INTERIOR<_DP_LS>);
  113. CreateDynamicObject(19273, 247.75360, 72.38390, 1004.00000, 0.00000, 0.00000, 0.00000,INTERIOR<_DP_LS>);
  114.  
  115.  
  116.  
  117. for(new i = 0; i < MAX_TELEPORTES; i++)//criação de todos os CheckPoint de teleporte
  118. CPT[i]=CreateCheckPoint("entrar", CP_INVISIBLE , 0x99FF0000, TELEPORTE_FROM_POS<i>);
  119.  
  120. //-------------------------------------
  121. CreateDynamicPickup(19197, 1,246.7840,63.9002, 1003.64044, INTERIOR<_DP_LS>);//visual dos pickups são bem bonitos
  122. CreateDynamicPickup(19197, 1,246.3030,87.2807, 1003.64044, INTERIOR<_DP_LS>);
  123. CreateDynamicPickup(19197, 1,1553.9879,-1675.4504,16.2953, INTERIOR<_MUNDO>);
  124. CreateDynamicPickup(19197, 1,1525.4456,-1678.0431,5.89060, INTERIOR<_MUNDO>);
  125. CreateDynamicPickup(19197, 1,1568.6914,-1691.1642,5.8906, INTERIOR<_MUNDO>);
  126. //----------------------------------------
  127. return 1;
  128. }
  129.  
  130. CPEnter:entrar(playerid, CPID)
  131. {
  132. for(new i = 0; i < MAX_TELEPORTES; i++)
  133. {
  134. if(IsPlayerInCP(playerid, CPT[i]))
  135. {
  136. GameTextForPlayer(playerid, _TELE[i][Tmessage], 4000, 4);
  137. LastCPT[playerid]=i;
  138. return 1;
  139. }
  140. }
  141. return 1;
  142. }
  143.  
  144.  
  145. public OnGameModeExit()
  146. {
  147. return 1;
  148. }
  149.  
  150. public OnPlayerRequestClass(playerid, classid)
  151. {
  152. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  153. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  154. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  155. return 1;
  156. }
  157.  
  158. public OnPlayerConnect(playerid)
  159. {
  160. return 1;
  161. }
  162.  
  163. public OnPlayerDisconnect(playerid, reason)
  164. {
  165. return 1;
  166. }
  167.  
  168. public OnPlayerSpawn(playerid)
  169. {
  170. return 1;
  171. }
  172.  
  173. public OnPlayerDeath(playerid, killerid, reason)
  174. {
  175. return 1;
  176. }
  177.  
  178. public OnVehicleSpawn(vehicleid)
  179. {
  180. return 1;
  181. }
  182.  
  183. public OnVehicleDeath(vehicleid, killerid)
  184. {
  185. return 1;
  186. }
  187.  
  188. public OnPlayerText(playerid, text[])
  189. {
  190. return 1;
  191. }
  192.  
  193. public OnPlayerCommandText(playerid, cmdtext[])
  194. {
  195. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  196. {
  197. // Do something here
  198. return 1;
  199. }
  200. return 0;
  201. }
  202.  
  203. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  204. {
  205. return 1;
  206. }
  207.  
  208. public OnPlayerExitVehicle(playerid, vehicleid)
  209. {
  210. return 1;
  211. }
  212.  
  213. public OnPlayerStateChange(playerid, newstate, oldstate)
  214. {
  215. return 1;
  216. }
  217.  
  218. public OnPlayerEnterCheckpoint(playerid)
  219. {
  220. return 1;
  221. }
  222.  
  223. public OnPlayerLeaveCheckpoint(playerid)
  224. {
  225. return 1;
  226. }
  227.  
  228. public OnPlayerEnterRaceCheckpoint(playerid)
  229. {
  230. return 1;
  231. }
  232.  
  233. public OnPlayerLeaveRaceCheckpoint(playerid)
  234. {
  235. return 1;
  236. }
  237.  
  238. public OnRconCommand(cmd[])
  239. {
  240. return 1;
  241. }
  242.  
  243. public OnPlayerRequestSpawn(playerid)
  244. {
  245. return 1;
  246. }
  247.  
  248. public OnObjectMoved(objectid)
  249. {
  250. return 1;
  251. }
  252.  
  253. public OnPlayerObjectMoved(playerid, objectid)
  254. {
  255. return 1;
  256. }
  257.  
  258. public OnPlayerPickUpPickup(playerid, pickupid)
  259. {
  260. return 1;
  261. }
  262.  
  263. public OnVehicleMod(playerid, vehicleid, componentid)
  264. {
  265. return 1;
  266. }
  267.  
  268. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  269. {
  270. return 1;
  271. }
  272.  
  273. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  274. {
  275. return 1;
  276. }
  277.  
  278. public OnPlayerSelectedMenuRow(playerid, row)
  279. {
  280. return 1;
  281. }
  282.  
  283. public OnPlayerExitedMenu(playerid)
  284. {
  285. return 1;
  286. }
  287.  
  288. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  289. {
  290. return 1;
  291. }
  292.  
  293. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  294. {
  295.  
  296. if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT)
  297. return 1;
  298.  
  299. if(!PRESSED(KEY_SECONDARY_ATTACK))
  300. return 1;
  301.  
  302. if(IsPlayerInCP(playerid,CPT[LastCPT[playerid]]))
  303. return TeleportCP(playerid, TELEPORTE_TO_POS<LastCPT[playerid]>);
  304.  
  305. return 1;
  306. }
  307.  
  308. public OnRconLoginAttempt(ip[], password[], success)
  309. {
  310. return 1;
  311. }
  312.  
  313. public OnPlayerUpdate(playerid)
  314. {
  315. return 1;
  316. }
  317.  
  318. public OnPlayerStreamIn(playerid, forplayerid)
  319. {
  320. return 1;
  321. }
  322.  
  323. public OnPlayerStreamOut(playerid, forplayerid)
  324. {
  325. return 1;
  326. }
  327.  
  328. public OnVehicleStreamIn(vehicleid, forplayerid)
  329. {
  330. return 1;
  331. }
  332.  
  333. public OnVehicleStreamOut(vehicleid, forplayerid)
  334. {
  335. return 1;
  336. }
  337.  
  338. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  339. {
  340. return 1;
  341. }
  342.  
  343. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  344. {
  345. return 1;
  346. }
Advertisement
Add Comment
Please, Sign In to add comment