SHARE
TWEET

Untitled

a guest Jul 21st, 2012 114 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // SA-MP surfing bug.
  2. // Requested by JernejL
  3. // Script by Strawhat
  4. #include <a_samp>
  5. #include <streamer>
  6.  
  7. main()
  8. {
  9.         print("\n----------------------------------");
  10.         print("SA-MP surfing bug.");
  11.         print("----------------------------------\n");
  12. }
  13.  
  14. public OnGameModeInit()
  15. {
  16.         SetGameModeText("Surfing Bug");
  17.         AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  18.         CreateDynamicObject(2064, 0, 0, 5, 0.00000000, 0.00000000, 0.00000000, -1, -1, -1, 800.0); //soemthing to stream in for.
  19.         return 1;
  20. }
  21.  
  22. public OnGameModeExit()
  23. {
  24.         return 1;
  25. }
  26.  
  27. public OnPlayerRequestClass(playerid, classid)
  28. {
  29.         SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  30.         SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  31.         SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  32.         return 1;
  33. }
  34.  
  35. public OnPlayerConnect(playerid)
  36. {
  37.         return 1;
  38. }
  39.  
  40. public OnPlayerDisconnect(playerid, reason)
  41. {
  42.         return 1;
  43. }
  44.  
  45. public OnPlayerSpawn(playerid)
  46. {
  47.         SetPlayerPos(playerid, 0, -5000, 0);
  48.         return 1;
  49. }
  50.  
  51. public OnPlayerDeath(playerid, killerid, reason)
  52. {
  53.         return 1;
  54. }
  55.  
  56. public OnVehicleSpawn(vehicleid)
  57. {
  58.         return 1;
  59. }
  60.  
  61. public OnVehicleDeath(vehicleid, killerid)
  62. {
  63.         return 1;
  64. }
  65.  
  66. public OnPlayerText(playerid, text[])
  67. {
  68.         return 1;
  69. }
  70.  
  71. public OnPlayerCommandText(playerid, cmdtext[])
  72. {
  73.         if(strcmp("/shipdynamicobject", cmdtext, true, 10) == 0)
  74.         {
  75.                 new
  76.                     boatid,
  77.                     Float: pos[3],
  78.                     Float: fangle;
  79.  
  80.                 GetPlayerFacingAngle(playerid, fangle);
  81.                 GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  82.                 boatid = CreateVehicle(484, pos[0], pos[1], pos[2], fangle, -1, -1, 0);
  83.                 LinkVehicleToInterior(boatid, 1);
  84.                 new objectid = CreateDynamicObject(8493, 0, 0, 0, 0, 0, 0, -1, -1, -1, 100);
  85.                 AttachDynamicObjectToVehicle(objectid, boatid, 0, 3, 16.8, 0, 0, 0);
  86.                 SetPlayerPos(playerid, pos[0], pos[1], pos[2] + 6);
  87.                 return 1;
  88.         }
  89.         if(strcmp("/shipobject", cmdtext, true, 10) == 0)
  90.         {
  91.                 new
  92.                     boatid,
  93.                     Float: pos[3],
  94.                     Float: fangle;
  95.  
  96.                 GetPlayerFacingAngle(playerid, fangle);
  97.                 GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  98.                 boatid = CreateVehicle(484, pos[0], pos[1], pos[2], fangle, -1, -1, 0);
  99.                 LinkVehicleToInterior(boatid, 1);
  100.                 new objectid = CreateObject(8493, 0, 0, 0, 0, 0, 0, 100);
  101.                 AttachObjectToVehicle(objectid, boatid, 0, 3, 16.8, 0, 0, 0);
  102.                 SetPlayerPos(playerid, pos[0], pos[1], pos[2] + 6);
  103.                 return 1;
  104.         }
  105.         if(strcmp("/savepos", cmdtext, true, 10) == 0)
  106.         {
  107.             new
  108.                 Float: pos[3];
  109.                
  110.             SendClientMessage(playerid, -1, "Make sure you move once you moved location.");
  111.             GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  112.             SetPVarFloat(playerid, "x", pos[0]);
  113.             SetPVarFloat(playerid, "y", pos[1]);
  114.             SetPVarFloat(playerid, "z", pos[2]);
  115.             SetPlayerPos(playerid, 0, 0, 8);
  116.             return 1;
  117.         }
  118.         if(strcmp("/pos", cmdtext, true, 10) == 0)
  119.         {
  120.             SetPlayerPos(playerid, GetPVarFloat(playerid, "x"), GetPVarFloat(playerid, "y"), GetPVarFloat(playerid, "z"));
  121.             return 1;
  122.         }
  123.         if(strcmp("/spawn", cmdtext, true, 10) == 0)
  124.         {
  125.             SpawnPlayer(playerid);
  126.             return 1;
  127.         }
  128.         if(strcmp("/slap", cmdtext, true, 10) == 0)
  129.         {
  130.             new
  131.                 Float: pos[3];
  132.  
  133.         GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  134.             SetPlayerPos(playerid, pos[0], pos[1], pos[2] + 5);
  135.             return 1;
  136.         }
  137.         return 0;
  138. }
  139.  
  140.  
  141. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  142. {
  143.         return 1;
  144. }
  145.  
  146. public OnPlayerExitVehicle(playerid, vehicleid)
  147. {
  148.         return 1;
  149. }
  150.  
  151. public OnPlayerStateChange(playerid, newstate, oldstate)
  152. {
  153.         return 1;
  154. }
  155.  
  156. public OnPlayerEnterCheckpoint(playerid)
  157. {
  158.         return 1;
  159. }
  160.  
  161. public OnPlayerLeaveCheckpoint(playerid)
  162. {
  163.         return 1;
  164. }
  165.  
  166. public OnPlayerEnterRaceCheckpoint(playerid)
  167. {
  168.         return 1;
  169. }
  170.  
  171. public OnPlayerLeaveRaceCheckpoint(playerid)
  172. {
  173.         return 1;
  174. }
  175.  
  176. public OnRconCommand(cmd[])
  177. {
  178.         return 1;
  179. }
  180.  
  181. public OnPlayerRequestSpawn(playerid)
  182. {
  183.         return 1;
  184. }
  185.  
  186. public OnObjectMoved(objectid)
  187. {
  188.         return 1;
  189. }
  190.  
  191. public OnPlayerObjectMoved(playerid, objectid)
  192. {
  193.         return 1;
  194. }
  195.  
  196. public OnPlayerPickUpPickup(playerid, pickupid)
  197. {
  198.         return 1;
  199. }
  200.  
  201. public OnVehicleMod(playerid, vehicleid, componentid)
  202. {
  203.         return 1;
  204. }
  205.  
  206. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  207. {
  208.         return 1;
  209. }
  210.  
  211. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  212. {
  213.         return 1;
  214. }
  215.  
  216. public OnPlayerSelectedMenuRow(playerid, row)
  217. {
  218.         return 1;
  219. }
  220.  
  221. public OnPlayerExitedMenu(playerid)
  222. {
  223.         return 1;
  224. }
  225.  
  226. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  227. {
  228.         return 1;
  229. }
  230.  
  231. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  232. {
  233.         return 1;
  234. }
  235.  
  236. public OnRconLoginAttempt(ip[], password[], success)
  237. {
  238.         return 1;
  239. }
  240.  
  241. public OnPlayerUpdate(playerid)
  242. {
  243.         return 1;
  244. }
  245.  
  246. public OnPlayerStreamIn(playerid, forplayerid)
  247. {
  248.         return 1;
  249. }
  250.  
  251. public OnPlayerStreamOut(playerid, forplayerid)
  252. {
  253.         return 1;
  254. }
  255.  
  256. public OnVehicleStreamIn(vehicleid, forplayerid)
  257. {
  258.         return 1;
  259. }
  260.  
  261. public OnVehicleStreamOut(vehicleid, forplayerid)
  262. {
  263.         return 1;
  264. }
  265.  
  266. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  267. {
  268.         return 1;
  269. }
  270.  
  271. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  272. {
  273.         return 1;
  274. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top