Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Paste Description for GMCycle INC

Replace a_samp.inc with this.

GMCycle INC
Sunday, September 30th, 2007 at 11:15:21pm MDT 

  1. /*  SA:MP Functions
  2.  *
  3.  *  (c) Copyright 2005-2006, SA:MP Team
  4.  *
  5.  */
  6.  
  7. #if defined _samp_included
  8.         #endinput
  9. #endif
  10. #define _samp_included
  11. #pragma library samp
  12.  
  13. #pragma tabsize 4
  14. // Ignores warning 217 for properly indented PAWNO code
  15. // It's tab size is 4 and often uses 4 spaces instead, PAWNCC's is 8
  16.  
  17. #include <core>
  18. #include <float>
  19. #include <string>
  20. #include <file>
  21. #include <time>
  22. #include <datagram>
  23. #include <a_players>
  24. #include <a_vehicles>
  25. #include <a_objects>
  26. #include <a_sampdb>
  27.  
  28. // --------------------------------------------------
  29. // Natives
  30. // --------------------------------------------------
  31.  
  32. // Util
  33. native print(const string[]);
  34. native printf(const format[], {Float,_}:...);
  35. native format(output[], len, const format[], {Float,_}:...);
  36. native SendClientMessage(playerid, color, const message[]);
  37. native SendClientMessageToAll(color, const message[]);
  38. native SendPlayerMessageToPlayer(playerid, senderid, const message[]);
  39. native SendPlayerMessageToAll(senderid, const message[]);
  40. native SendDeathMessage(killer,killee,weapon);
  41. native GameTextForAll(const string[],time,style);
  42. native GameTextForPlayer(playerid,const string[],time,style);
  43. native SetTimer(const funcname[], interval, repeating);
  44. native SetTimerEx(const funcname[], interval, repeating, const format[], {Float,_}:...);
  45. native KillTimer(timerid);
  46. native GetTickCount();
  47. native GetMaxPlayers();
  48. native LimitGlobalChatRadius(Float:chat_radius);
  49. native CallRemoteFunction(const function[], const format[], {Float,_}:...);
  50. native CallLocalFunction(const function[], const format[], {Float,_}:...);
  51. native Float:asin(Float:value);
  52. native Float:acos(Float:value);
  53. native Float:atan(Float:value);
  54.  
  55. // Game
  56. native SetGameModeText(const string[]);
  57. native SetTeamCount(count);
  58. native AddPlayerClass(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  59. native AddPlayerClassEx(teamid, modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  60. native AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2);
  61. native AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, respawn_delay);
  62. native AddStaticPickup(model,type,Float:X,Float:Y,Float:Z);
  63. native CreatePickup(model, type, Float:X, Float:Y, Float:Z);
  64. native DestroyPickup(pickup);
  65. native ShowNameTags(show);
  66. native ShowPlayerMarkers(show);
  67.  
  68.  
  69. // GM Cycle Entry
  70.  
  71.  
  72. native r_GameModeExit() = GameModeExit;
  73. stock GameModeExit() CallRemoteFunction("GameModeExitEx", "");
  74.  
  75.  
  76. // GM Cycle Exit
  77.  
  78. native SetWorldTime(hour);
  79. native GetWeaponName(weaponid, weapon[], len);
  80. native EnableTirePopping(enable);
  81. native AllowInteriorWeapons(allow);
  82. native SetWeather(weatherid);
  83. native SetGravity(Float:gravity);
  84. native AllowAdminTeleport(allow);
  85. native SetDeathDropAmount(amount);
  86. native CreateExplosion(Float:X, Float:Y, Float:Z, type, Float:Radius);
  87. native SetDisabledWeapons(...);
  88. native EnableZoneNames(enable);
  89. native UsePlayerPedAnims();          // Will cause the players to use CJ running/walking animations
  90. native DisableInteriorEnterExits();  // will disable all interior enter/exits in the game.
  91. native SetNameTagDrawDistance(Float:distance); // Distance at which nametags will start rendering on the client.
  92.  
  93. // Admin
  94. native IsPlayerAdmin(playerid);
  95. native Kick(playerid);
  96. native Ban(playerid);
  97. native BanEx(playerid, const reason[]);
  98. native SendRconCommand(const command[]);
  99. native GetServerVarAsString(const varname[], buffer[], len);
  100. native GetServerVarAsInt(const varname[]);
  101. native GetServerVarAsBool(const varname[]);
  102.  
  103. // Menu
  104. native Menu:CreateMenu(const title[], columns, Float:x, Float:y, Float:col1width, Float:col2width = 0.0);
  105. native DestroyMenu(Menu:menuid);
  106. native AddMenuItem(Menu:menuid, column, const menutext[]);
  107. native SetMenuColumnHeader(Menu:menuid, column, const columnheader[]);
  108. native ShowMenuForPlayer(Menu:menuid, playerid);
  109. native HideMenuForPlayer(Menu:menuid, playerid);
  110. native IsValidMenu(Menu:menuid);
  111. native DisableMenu(Menu:menuid);
  112. native DisableMenuRow(Menu:menuid, row);
  113. native Menu:GetPlayerMenu(playerid);
  114.  
  115. // Text Draw
  116. native Text:TextDrawCreate(Float:x, Float:y, const text[]);
  117. native TextDrawDestroy(Text:text);
  118. native TextDrawLetterSize(Text:text, Float:x, Float:y);
  119. native TextDrawTextSize(Text:text, Float:x, Float:y);
  120. native TextDrawAlignment(Text:text, alignment);
  121. native TextDrawColor(Text:text, color);
  122. native TextDrawUseBox(Text:text, use);
  123. native TextDrawBoxColor(Text:text, color);
  124. native TextDrawSetShadow(Text:text, size);
  125. native TextDrawSetOutline(Text:text, size);
  126. native TextDrawBackgroundColor(Text:text, color);
  127. native TextDrawFont(Text:text, font);
  128. native TextDrawSetProportional(Text:text, set);
  129. native TextDrawShowForPlayer(playerid, Text:text);
  130. native TextDrawHideForPlayer(playerid, Text:text);
  131. native TextDrawShowForAll(Text:text);
  132. native TextDrawHideForAll(Text:text);
  133.  
  134. // Gang Zones
  135.  
  136. native GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy);
  137. native GangZoneDestroy(zone);
  138. native GangZoneShowForPlayer(playerid, zone, color);
  139. native GangZoneShowForAll(zone, color);
  140. native GangZoneHideForPlayer(playerid, zone);
  141. native GangZoneHideForAll(zone);
  142. native GangZoneFlashForPlayer(playerid, zone, flashcolor);
  143. native GangZoneFlashForAll(zone, flashcolor);
  144. native GangZoneStopFlashForPlayer(playerid, zone);
  145. native GangZoneStopFlashForAll(zone);
  146.  
  147. // --------------------------------------------------
  148. // Defines
  149. // --------------------------------------------------
  150.  
  151. // States
  152. #define PLAYER_STATE_NONE                                          0
  153. #define PLAYER_STATE_ONFOOT                              1
  154. #define PLAYER_STATE_DRIVER                              2
  155. #define PLAYER_STATE_PASSENGER          3
  156. #define PLAYER_STATE_EXIT_VEHICLE                            4 // (used internally)
  157. #define PLAYER_STATE_ENTER_VEHICLE_DRIVER              5 // (used internally)
  158. #define PLAYER_STATE_ENTER_VEHICLE_PASSENGER    6 // (used internally)
  159. #define PLAYER_STATE_WASTED                              7
  160. #define PLAYER_STATE_SPAWNED                    8
  161. #define PLAYER_STATE_SPECTATING     9
  162.  
  163. // Misc
  164. #define MAX_PLAYER_NAME       24
  165. #define MAX_PLAYERS                                        200
  166. #define MAX_VEHICLES                            700
  167. #define INVALID_PLAYER_ID                                          255
  168. #define INVALID_VEHICLE_ID                                    0xFFFF
  169. #define NO_TEAM         255
  170. #define MAX_OBJECTS                                        150
  171. #define INVALID_OBJECT_ID                                          255
  172. #define MAX_GANG_ZONES              1024
  173. #define MAX_TEXT_DRAWS              96
  174. #define MAX_MENUS                                                        128
  175. #define INVALID_MENU                            0xFF
  176. #define INVALID_TEXT_DRAW                                          0xFF
  177. #define INVALID_GANG_ZONE                                          -1
  178.  
  179. // Weapons
  180. #define WEAPON_BRASSKNUCKLE                    1
  181. #define WEAPON_GOLFCLUB     2
  182. #define WEAPON_NITESTICK                                3
  183. #define WEAPON_KNIFE                    4
  184. #define WEAPON_BAT                                    5
  185. #define WEAPON_SHOVEL               6
  186. #define WEAPON_POOLSTICK                                7
  187. #define WEAPON_KATANA               8
  188. #define WEAPON_CHAINSAW     9
  189. #define WEAPON_DILDO                    10
  190. #define WEAPON_DILDO2               11
  191. #define WEAPON_VIBRATOR     12
  192. #define WEAPON_VIBRATOR2                                13
  193. #define WEAPON_FLOWER               14
  194. #define WEAPON_CANE                              15
  195. #define WEAPON_GRENADE          16
  196. #define WEAPON_TEARGAS          17
  197. #define WEAPON_MOLTOV               18
  198. #define WEAPON_COLT45               22
  199. #define WEAPON_SILENCED     23
  200. #define WEAPON_DEAGLE               24
  201. #define WEAPON_SHOTGUN          25
  202. #define WEAPON_SAWEDOFF     26
  203. #define WEAPON_SHOTGSPA     27
  204. #define WEAPON_UZI                                    28
  205. #define WEAPON_MP5                                    29
  206. #define WEAPON_AK47                              30
  207. #define WEAPON_M4                                          31
  208. #define WEAPON_TEC9                              32
  209. #define WEAPON_RIFLE                    33
  210. #define WEAPON_SNIPER               34
  211. #define WEAPON_ROCKETLAUNCHER         35
  212. #define WEAPON_HEATSEEKER                            36
  213. #define WEAPON_FLAMETHROWER                    37
  214. #define WEAPON_MINIGUN          38
  215. #define WEAPON_SATCHEL          39
  216. #define WEAPON_BOMB                              40
  217. #define WEAPON_SPRAYCAN     41
  218. #define WEAPON_FIREEXTINGUISHER   42
  219. #define WEAPON_CAMERA               43
  220. #define WEAPON_PARACHUTE                                46
  221. #define WEAPON_VEHICLE          49
  222. #define WEAPON_DROWN                    53
  223. #define WEAPON_COLLISION                                54
  224.  
  225. // Keys
  226. #define KEY_ACTION                        1
  227. #define KEY_CROUCH                        2
  228. #define KEY_FIRE                                4
  229. #define KEY_SPRINT                        8
  230. #define KEY_SECONDARY_ATTACK    16
  231. #define KEY_JUMP                                32
  232. #define KEY_LOOK_RIGHT      64
  233. #define KEY_HANDBRAKE         128
  234. #define KEY_LOOK_LEFT         256
  235. #define KEY_SUBMISSION      512
  236. #define KEY_LOOK_BEHIND   512
  237. #define KEY_WALK                                1024
  238. #define KEY_ANALOG_UP         2048
  239. #define KEY_ANALOG_DOWN   4096
  240. #define KEY_ANALOG_RIGHT                8192
  241. #define KEY_ANALOG_LEFT   16384
  242.  
  243. #define KEY_UP          -128
  244. #define KEY_DOWN                                128
  245. #define KEY_LEFT                                -128
  246. #define KEY_RIGHT                            128
  247.  
  248. // --------------------------------------------------
  249. // Forwards (Callback declarations)
  250. // --------------------------------------------------
  251.  
  252. forward OnGameModeInit();
  253. forward OnGameModeExit();
  254. forward OnFilterScriptInit();
  255. forward OnFilterScriptExit();
  256. forward OnPlayerConnect(playerid);
  257. forward OnPlayerDisconnect(playerid, reason);
  258. forward OnPlayerSpawn(playerid);
  259. forward OnPlayerDeath(playerid, killerid, reason);
  260. forward OnVehicleSpawn(vehicleid);
  261. forward OnVehicleDeath(vehicleid, killerid);
  262. forward OnPlayerText(playerid, text[]);
  263. forward OnPlayerCommandText(playerid, cmdtext[]);
  264. forward OnPlayerInfoChange(playerid);
  265. forward OnPlayerRequestClass(playerid, classid);
  266. forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger);
  267. forward OnPlayerExitVehicle(playerid, vehicleid);
  268. forward OnPlayerStateChange(playerid, newstate, oldstate);
  269. forward OnPlayerEnterCheckpoint(playerid);
  270. forward OnPlayerLeaveCheckpoint(playerid);
  271. forward OnPlayerEnterRaceCheckpoint(playerid);
  272. forward OnPlayerLeaveRaceCheckpoint(playerid);
  273. forward OnRconCommand(cmd[]);
  274. forward OnPlayerPrivmsg(playerid, recieverid, text[]);
  275. forward OnPlayerRequestSpawn(playerid);
  276. forward OnObjectMoved(objectid);
  277. forward OnPlayerObjectMoved(playerid, objectid);
  278. forward OnPlayerPickUpPickup(playerid, pickupid);
  279. forward OnVehicleMod(vehicleid, componentid);
  280. forward OnVehiclePaintjob(vehicleid, paintjobid);
  281. forward OnVehicleRespray(vehicleid, color1, color2);
  282. forward OnPlayerSelectedMenuRow(playerid, row);
  283. forward OnPlayerExitedMenu(playerid);
  284. forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid);
  285. forward OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
  286. forward OnPlayerTeamPrivmsg(playerid, msg[]);

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

fantasy-obligation
fantasy-obligation