Guest User

Tutorial doesn't work?

a guest
Jan 18th, 2012
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.22 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. #define TEAM_GROVE 1
  7. #define TEAM_BALLAS 2
  8. #define TEAM_VAGOS 3
  9. #if defined FILTERSCRIPT
  10.  
  11. enum eZone
  12. {
  13. Float:zMinX,
  14. Float:zMinY,
  15. Float:zMaxX,
  16. Float:zMaxY,
  17. zTeam
  18. }
  19. new ZoneInfo[][eZone] = {
  20. {2337.9004,-1808.8383,2590.2043,-1610.3673,TEAM_GROVE},
  21. {2084.7,-1808.8383,2337.9004,-1610.3673,TEAM_BALLAS},
  22. {2590.2043,-1808.8383,2842.3,-1610.3673,TEAM_VAGOS}
  23. };
  24. new ZoneID[sizeof(ZoneInfo)];
  25.  
  26. public OnFilterScriptInit()
  27. for(new i=0; i < sizeof(ZoneInfo); i++)
  28. {
  29. ZoneID[i] = GangZoneCreate(ZoneInfo[i][zMinX], ZoneInfo[i][zMinY], ZoneInfo[i][zMaxX], ZoneInfo[i][zMaxY]);
  30. }
  31.  
  32. public OnFilterScriptExit()
  33. {
  34. return 1;
  35. }
  36.  
  37. #else
  38.  
  39. main()
  40. {
  41. print("\n----------------------------------");
  42. print(" Blank Gamemode by your name here");
  43. print("----------------------------------\n");
  44. }
  45.  
  46. #endif
  47.  
  48. public OnGameModeInit()
  49. {
  50. // Don't use these lines if it's a filterscript
  51. SetGameModeText("Blank Script");
  52. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  53. return 1;
  54. }
  55.  
  56. public OnGameModeExit()
  57. {
  58. return 1;
  59. }
  60.  
  61. public OnPlayerRequestClass(playerid, classid)
  62. {
  63. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  64. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  65. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  66. return 1;
  67. }
  68.  
  69. public OnPlayerConnect(playerid)
  70. {
  71. return 1;
  72. }
  73.  
  74. public OnPlayerDisconnect(playerid, reason)
  75. {
  76. return 1;
  77. }
  78.  
  79. public OnPlayerSpawn(playerid)
  80. for(new i=0; i < sizeof(ZoneInfo); i++);
  81. {
  82. GangZoneShowForPlayer(playerid, ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam]));
  83. }
  84. stock GetTeamZoneColor(teamid)
  85. {
  86. switch(teamid)
  87. {
  88. case TEAM_GROVE: return 0x00FF0088;
  89. case TEAM_BALLAS: return 0xFF00FF88;
  90. case TEAM_VAGOS: return 0xFFFF0088;
  91. }
  92. return -1;
  93. }
  94.  
  95. public OnPlayerDeath(playerid, killerid, reason)
  96. {
  97. return 1;
  98. }
  99.  
  100. public OnVehicleSpawn(vehicleid)
  101. {
  102. return 1;
  103. }
  104.  
  105. public OnVehicleDeath(vehicleid, killerid)
  106. {
  107. return 1;
  108. }
  109.  
  110. public OnPlayerText(playerid, text[])
  111. {
  112. return 1;
  113. }
  114.  
  115. public OnPlayerCommandText(playerid, cmdtext[])
  116. {
  117. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  118. {
  119. // Do something here
  120. return 1;
  121. }
  122. return 0;
  123. }
  124.  
  125. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  126. {
  127. return 1;
  128. }
  129.  
  130. public OnPlayerExitVehicle(playerid, vehicleid)
  131. {
  132. return 1;
  133. }
  134.  
  135. public OnPlayerStateChange(playerid, newstate, oldstate)
  136. {
  137. return 1;
  138. }
  139.  
  140. public OnPlayerEnterCheckpoint(playerid)
  141. {
  142. return 1;
  143. }
  144.  
  145. public OnPlayerLeaveCheckpoint(playerid)
  146. {
  147. return 1;
  148. }
  149.  
  150. public OnPlayerEnterRaceCheckpoint(playerid)
  151. {
  152. return 1;
  153. }
  154.  
  155. public OnPlayerLeaveRaceCheckpoint(playerid)
  156. {
  157. return 1;
  158. }
  159.  
  160. public OnRconCommand(cmd[])
  161. {
  162. return 1;
  163. }
  164.  
  165. public OnPlayerRequestSpawn(playerid)
  166. {
  167. return 1;
  168. }
  169.  
  170. public OnObjectMoved(objectid)
  171. {
  172. return 1;
  173. }
  174.  
  175. public OnPlayerObjectMoved(playerid, objectid)
  176. {
  177. return 1;
  178. }
  179.  
  180. public OnPlayerPickUpPickup(playerid, pickupid)
  181. {
  182. return 1;
  183. }
  184.  
  185. public OnVehicleMod(playerid, vehicleid, componentid)
  186. {
  187. return 1;
  188. }
  189.  
  190. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  191. {
  192. return 1;
  193. }
  194.  
  195. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  196. {
  197. return 1;
  198. }
  199.  
  200. public OnPlayerSelectedMenuRow(playerid, row)
  201. {
  202. return 1;
  203. }
  204.  
  205. public OnPlayerExitedMenu(playerid)
  206. {
  207. return 1;
  208. }
  209.  
  210. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  211. {
  212. return 1;
  213. }
  214.  
  215. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  216. {
  217. return 1;
  218. }
  219.  
  220. public OnRconLoginAttempt(ip[], password[], success)
  221. {
  222. return 1;
  223. }
  224.  
  225. public OnPlayerUpdate(playerid)
  226. {
  227. return 1;
  228. }
  229.  
  230. public OnPlayerStreamIn(playerid, forplayerid)
  231. {
  232. return 1;
  233. }
  234.  
  235. public OnPlayerStreamOut(playerid, forplayerid)
  236. {
  237. return 1;
  238. }
  239.  
  240. public OnVehicleStreamIn(vehicleid, forplayerid)
  241. {
  242. return 1;
  243. }
  244.  
  245. public OnVehicleStreamOut(vehicleid, forplayerid)
  246. {
  247. return 1;
  248. }
  249.  
  250. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  251. {
  252. return 1;
  253. }
  254.  
  255. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  256. {
  257. return 1;
  258. }
Advertisement
Add Comment
Please, Sign In to add comment