Advertisement
Guest User

Untitled

a guest
May 26th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.07 KB | None | 0 0
  1. #include <a_samp>
  2. #include <voice>
  3. #include "lazypawn/main.cpp"
  4.  
  5.  
  6. main()
  7. {
  8. print("\n----------------------------------");
  9. print(" Weed City Gamemode loaded");
  10. print("----------------------------------\n");
  11. }
  12.  
  13. public OnGameModeInit()
  14. {
  15. AddStaticVehicle(560, 10.0, 0.0, 10.0, 0.0, -1, -1);
  16. // Don't use these lines if it's a filterscript
  17. SetGameModeText("Freeroam");
  18. InitVoice(FREQUENCY_48K, 128000, 30.0);
  19. return 1;
  20. }
  21.  
  22. public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
  23. {
  24. printf("VEHICLE UPDATE: PLAYER %d MOVES VEHICLE %d - %s", playerid, vehicleid, (passenger_seat == 1) ? ("PASSENGER") : ("NOT IN CAR"));
  25. return true;
  26. }
  27.  
  28. public OnGameModeExit()
  29. {
  30. return 1;
  31. }
  32.  
  33. public OnPlayerRequestClass(playerid, classid)
  34. {
  35. SetSpawnInfo(playerid, 0, 0, 0.0, 0.0, 2.0, 0, 0, 0, 0, 0, 0, 0);
  36. TogglePlayerControllable(playerid, false);
  37. return 1;
  38. }
  39.  
  40. public OnPlayerConnect(playerid)
  41. {
  42. SetConfig(playerid, CONFIG_GSTREAM_VOL, 10000);
  43. TogglePlayerControllable(playerid, true);
  44. return 1;
  45. }
  46.  
  47. public OnPlayerDisconnect(playerid, reason)
  48. {
  49. return 1;
  50. }
  51.  
  52. public OnPlayerSpawn(playerid)
  53. {
  54. return 1;
  55. }
  56.  
  57. public OnPlayerDeath(playerid, killerid, reason)
  58. {
  59. return 1;
  60. }
  61.  
  62. public OnVehicleSpawn(vehicleid)
  63. {
  64. return 1;
  65. }
  66.  
  67. public OnVehicleDeath(vehicleid, killerid)
  68. {
  69. return 1;
  70. }
  71.  
  72. public OnPlayerText(playerid, text[])
  73. {
  74. return 1;
  75. }
  76.  
  77. public OnPlayerCommandText(playerid, cmdtext[])
  78. {
  79. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  80. {
  81. // Do something here
  82. return 1;
  83. }
  84. return 0;
  85. }
  86.  
  87. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  88. {
  89. return 1;
  90. }
  91.  
  92. public OnPlayerExitVehicle(playerid, vehicleid)
  93. {
  94. return 1;
  95. }
  96.  
  97. public OnPlayerStateChange(playerid, newstate, oldstate)
  98. {
  99. return 1;
  100. }
  101.  
  102. public OnPlayerEnterCheckpoint(playerid)
  103. {
  104. return 1;
  105. }
  106.  
  107. public OnPlayerLeaveCheckpoint(playerid)
  108. {
  109. return 1;
  110. }
  111.  
  112. public OnPlayerEnterRaceCheckpoint(playerid)
  113. {
  114. return 1;
  115. }
  116.  
  117. public OnPlayerLeaveRaceCheckpoint(playerid)
  118. {
  119. return 1;
  120. }
  121.  
  122. public OnRconCommand(cmd[])
  123. {
  124. return 1;
  125. }
  126.  
  127. public OnPlayerRequestSpawn(playerid)
  128. {
  129. return 1;
  130. }
  131.  
  132. public OnObjectMoved(objectid)
  133. {
  134. return 1;
  135. }
  136.  
  137. public OnPlayerObjectMoved(playerid, objectid)
  138. {
  139. return 1;
  140. }
  141.  
  142. public OnPlayerPickUpPickup(playerid, pickupid)
  143. {
  144. return 1;
  145. }
  146.  
  147. public OnVehicleMod(playerid, vehicleid, componentid)
  148. {
  149. return 1;
  150. }
  151.  
  152. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  153. {
  154. return 1;
  155. }
  156.  
  157. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  158. {
  159. return 1;
  160. }
  161.  
  162. public OnPlayerSelectedMenuRow(playerid, row)
  163. {
  164. return 1;
  165. }
  166.  
  167. public OnPlayerExitedMenu(playerid)
  168. {
  169. return 1;
  170. }
  171.  
  172. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  173. {
  174. return 1;
  175. }
  176.  
  177. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  178. {
  179. if(newkeys == KEY_YES)StartVoice(playerid);
  180. if(RELEASED(KEY_NO))StopVoice(playerid);
  181. return 1;
  182. }
  183.  
  184. public OnPlayerVoice(playerid, BitStream:bs, Float:amplitude)
  185. {
  186. printf("ON VOICE %d", playerid);
  187. new Float:pos[3];
  188. GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  189.  
  190. SetPlayerChatBubble(playerid, #HTML_ORANGE"o)))", -1, 30.0, 1000);
  191. for(new i = 0; i< MAX_PLAYERS; i++)
  192. {
  193. if(i==playerid)continue;
  194. if(!IsPlayerConnected(playerid))continue;
  195.  
  196. if(IsPlayerInRangeOfPoint(i, 10.00, pos[0], pos[1], pos[2]))
  197. {
  198. printf("SEND AUDIO FROM %d TO %d", playerid, i);
  199. SendVoice(i, bs, false);
  200. }
  201. }
  202. }
  203.  
  204. public OnRconLoginAttempt(ip[], password[], success)
  205. {
  206. return 1;
  207. }
  208.  
  209. public OnPlayerUpdate(playerid)
  210. {
  211. return 1;
  212. }
  213.  
  214. public OnPlayerStreamIn(playerid, forplayerid)
  215. {
  216. return 1;
  217. }
  218.  
  219. public OnPlayerStreamOut(playerid, forplayerid)
  220. {
  221. return 1;
  222. }
  223.  
  224. public OnVehicleStreamIn(vehicleid, forplayerid)
  225. {
  226. return 1;
  227. }
  228.  
  229. public OnVehicleStreamOut(vehicleid, forplayerid)
  230. {
  231. return 1;
  232. }
  233.  
  234. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  235. {
  236. return 1;
  237. }
  238.  
  239. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  240. {
  241. return 1;
  242. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement