Advertisement
Guest User

Untitled

a guest
Dec 18th, 2011
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 22.00 KB | None | 0 0
  1. //***********************************************************************************CONFIG**********************************************************************************************
  2.  
  3. //In dieser Version gibts noch keine Konfiguration
  4. //Geplant: Anpassbare Fahrzeuge
  5.  
  6. //***********************************************************************************ENDE************************************************************************************************
  7. //Verändere NICHTS unter diesen Zeilen wenn du nicht genau weisst was du tust!
  8. /* Dieses Filterscript wurde erstellt von PoTTii, entfernen des Copyrights ist strafbar und kann gemäss dem geltenden Gesetz Bestraft werden */
  9.  
  10.  
  11. #define FILTERSCRIPT
  12.  
  13. #include <a_samp>
  14.  
  15. #define DIA_VEH 32674
  16. #define DIA_CAR 32675
  17. #define DIA_BIKE 32676
  18. #define DIA_BOAT 32677
  19. #define DIA_FLY 12423
  20. #define DIA_HELI 10234
  21.  
  22. #define rot 0xFF0000FF
  23.  
  24. new Float:VehPos[4];
  25.  
  26.  
  27.  
  28.  
  29. #if defined FILTERSCRIPT
  30.  
  31. public OnFilterScriptInit()
  32. {
  33.     print("  Car Spawner by PoTTii: Erfolgreich geladen!");
  34.     return 1;
  35. }
  36.  
  37. public OnFilterScriptExit()
  38. {
  39.     return 1;
  40. }
  41.  
  42. #else
  43.  
  44. main()
  45. {
  46.     print("\n----------------------------------");
  47.     print(" Blank Gamemode by your name here");
  48.     print("----------------------------------\n");
  49. }
  50.  
  51. #endif
  52.  
  53. public OnGameModeInit()
  54. {
  55.  
  56.     return 1;
  57. }
  58.  
  59. public OnGameModeExit()
  60. {
  61.     return 1;
  62. }
  63.  
  64. public OnPlayerRequestClass(playerid, classid)
  65. {
  66.  
  67.     return 1;
  68. }
  69.  
  70. public OnPlayerConnect(playerid)
  71. {
  72.     return 1;
  73. }
  74.  
  75. public OnPlayerDisconnect(playerid, reason)
  76. {
  77.     return 1;
  78. }
  79.  
  80. public OnPlayerSpawn(playerid)
  81. {
  82.     return 1;
  83. }
  84.  
  85. public OnPlayerDeath(playerid, killerid, reason)
  86. {
  87.     return 1;
  88. }
  89.  
  90. public OnVehicleSpawn(vehicleid)
  91. {
  92.     return 1;
  93. }
  94.  
  95. public OnVehicleDeath(vehicleid, killerid)
  96. {
  97.     return 1;
  98. }
  99.  
  100. public OnPlayerText(playerid, text[])
  101. {
  102.     return 1;
  103. }
  104.  
  105. public OnPlayerCommandText(playerid, cmdtext[])
  106. {
  107.     if(strcmp("/veh", cmdtext, true, 10) == 0)
  108.     {
  109.         ShowPlayerDialog(playerid, DIA_VEH, DIALOG_STYLE_LIST, "Fahrzeug-Menu", "Autos\nBikes\nBoote\nFlugzeuge\nHelikopter", "Weiter", "Abbrechen");
  110.         return 1;
  111.     }
  112.     return 0;
  113. }
  114.  
  115. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  116. {
  117.     return 1;
  118. }
  119.  
  120. public OnPlayerExitVehicle(playerid, vehicleid)
  121. {
  122.     return 1;
  123. }
  124.  
  125. public OnPlayerStateChange(playerid, newstate, oldstate)
  126. {
  127.     return 1;
  128. }
  129.  
  130. public OnPlayerEnterCheckpoint(playerid)
  131. {
  132.     return 1;
  133. }
  134.  
  135. public OnPlayerLeaveCheckpoint(playerid)
  136. {
  137.     return 1;
  138. }
  139.  
  140. public OnPlayerEnterRaceCheckpoint(playerid)
  141. {
  142.     return 1;
  143. }
  144.  
  145. public OnPlayerLeaveRaceCheckpoint(playerid)
  146. {
  147.     return 1;
  148. }
  149.  
  150. public OnRconCommand(cmd[])
  151. {
  152.     return 1;
  153. }
  154.  
  155. public OnPlayerRequestSpawn(playerid)
  156. {
  157.     return 1;
  158. }
  159.  
  160. public OnObjectMoved(objectid)
  161. {
  162.     return 1;
  163. }
  164.  
  165. public OnPlayerObjectMoved(playerid, objectid)
  166. {
  167.     return 1;
  168. }
  169.  
  170. public OnPlayerPickUpPickup(playerid, pickupid)
  171. {
  172.     return 1;
  173. }
  174.  
  175. public OnVehicleMod(playerid, vehicleid, componentid)
  176. {
  177.     return 1;
  178. }
  179.  
  180. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  181. {
  182.     return 1;
  183. }
  184.  
  185. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  186. {
  187.     return 1;
  188. }
  189.  
  190. public OnPlayerSelectedMenuRow(playerid, row)
  191. {
  192.     return 1;
  193. }
  194.  
  195. public OnPlayerExitedMenu(playerid)
  196. {
  197.     return 1;
  198. }
  199.  
  200. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  201. {
  202.     return 1;
  203. }
  204.  
  205. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  206. {
  207.     return 1;
  208. }
  209.  
  210. public OnRconLoginAttempt(ip[], password[], success)
  211. {
  212.     return 1;
  213. }
  214.  
  215. public OnPlayerUpdate(playerid)
  216. {
  217.     return 1;
  218. }
  219.  
  220. public OnPlayerStreamIn(playerid, forplayerid)
  221. {
  222.     return 1;
  223. }
  224.  
  225. public OnPlayerStreamOut(playerid, forplayerid)
  226. {
  227.     return 1;
  228. }
  229.  
  230. public OnVehicleStreamIn(vehicleid, forplayerid)
  231. {
  232.     return 1;
  233. }
  234.  
  235. public OnVehicleStreamOut(vehicleid, forplayerid)
  236. {
  237.     return 1;
  238. }
  239.  
  240. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  241. {
  242. //--------------------------------------[FAHRZEUG DIALOG]-------------------------------------------------------------------
  243.     if(dialogid == DIA_VEH)
  244.     {
  245.    
  246.         if(!response)
  247.         {
  248.             SendClientMessage(playerid, 0xFF0000FF, "Abgebrochen");
  249.             return 1;
  250.         }
  251.  
  252.         switch(listitem)
  253.         {
  254.             case 0:
  255.             {
  256.                 ShowPlayerDialog(playerid, DIA_CAR, DIALOG_STYLE_LIST, "Auto-Menu", "Buffalo\nSuper GT\nSultan\nInfernus\nCheetah", "Weiter", "Zurück");
  257.             }
  258.             case 1:
  259.             {
  260.                 ShowPlayerDialog(playerid, DIA_BIKE, DIALOG_STYLE_LIST, "Bike-Menu", "PCJ-600\nFreeway\nFaggio\nSanchez\nQuad", "Weiter", "Zurück");
  261.             }
  262.             case 2:
  263.             {
  264.                 ShowPlayerDialog(playerid, DIA_BOAT, DIALOG_STYLE_LIST, "Boot-Menu", "Coastguard\nDinghy\nJetmax\nPredator\nSquallo", "Weiter", "Zurück");
  265.             }
  266.             case 3:
  267.             {
  268.                 ShowPlayerDialog(playerid, DIA_FLY, DIALOG_STYLE_LIST, "Flugzeug-Menu", "Skimmer\nBeagle\nCropduster\nStuntflugzeug\nShamal", "Weiter", "Zurück");
  269.             }
  270.             case 4:
  271.             {
  272.                 ShowPlayerDialog(playerid, DIA_HELI, DIALOG_STYLE_LIST, "Helikopter-Menu", "Cargobob\nRaindance\nLeviathan\nSparrow\nMaverick", "Weiter", "Zurück");
  273.             }
  274.            
  275.         }
  276.    
  277.  
  278.     }
  279.    
  280. //--------------------------------------[Der Dialog für die Autos]------------------------------------------------------------------
  281.     if(dialogid == DIA_CAR)
  282.     {
  283.         if(!response)
  284.         {
  285.             ShowPlayerDialog(playerid, DIA_VEH, DIALOG_STYLE_LIST, "Fahrzeug-Menu", "Autos\nBikes\nBoote\nFlugzeuge\nHelikopter", "Weiter", "Abbrechen");
  286.             return 0;
  287.         }
  288.         switch(listitem)
  289.         {
  290.             case 0:
  291.             {
  292.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  293.                 new vehicleid;
  294.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  295.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  296.                 vehicleid = CreateVehicle(402,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  297.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  298.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  299.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  300.             }
  301.             case 1:
  302.             {
  303.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  304.                 new vehicleid;
  305.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  306.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  307.                 vehicleid = CreateVehicle(506,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  308.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  309.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  310.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  311.             }
  312.             case 2:
  313.             {
  314.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  315.                 new vehicleid;
  316.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  317.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  318.                 vehicleid = CreateVehicle(560,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  319.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  320.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  321.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  322.             }
  323.             case 3:
  324.             {
  325.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  326.                 new vehicleid;
  327.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  328.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  329.                 vehicleid = CreateVehicle(411,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  330.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  331.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  332.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  333.             }
  334.             case 4:
  335.             {
  336.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  337.                 new vehicleid;
  338.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  339.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  340.                 vehicleid = CreateVehicle(415,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  341.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  342.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  343.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  344.             }
  345.        
  346.        
  347.         }
  348.    
  349.     }
  350. //---------------------------------------------------------[Dialog für die Bikes]------------------------------------------------------------
  351.     if(dialogid == DIA_BIKE)
  352.     {
  353.         if(!response)
  354.         {
  355.             ShowPlayerDialog(playerid, DIA_VEH, DIALOG_STYLE_LIST, "Fahrzeug-Menu", "Autos\nBikes\nBoote\nFlugzeuge\nHelikopter", "Weiter", "Abbrechen");
  356.             return 0;
  357.         }
  358.         switch(listitem)
  359.         {
  360.             case 0:
  361.             {
  362.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  363.                 new vehicleid;
  364.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  365.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  366.                 vehicleid = CreateVehicle(461,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  367.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  368.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  369.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  370.             }
  371.             case 1:
  372.             {
  373.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  374.                 new vehicleid;
  375.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  376.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  377.                 vehicleid = CreateVehicle(463,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  378.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  379.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  380.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  381.             }
  382.             case 2:
  383.             {
  384.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  385.                 new vehicleid;
  386.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  387.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  388.                 vehicleid = CreateVehicle(462,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  389.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  390.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  391.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  392.             }
  393.             case 3:
  394.             {
  395.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  396.                 new vehicleid;
  397.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  398.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  399.                 vehicleid = CreateVehicle(468,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  400.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  401.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  402.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  403.             }
  404.             case 4:
  405.             {
  406.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  407.                 new vehicleid;
  408.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  409.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  410.                 vehicleid = CreateVehicle(471,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  411.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  412.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  413.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  414.             }
  415.  
  416.  
  417.         }
  418.  
  419.     }
  420. ////////////////////////////////////////////////////////////DIALOG FÜR DIE BOOTE////////////////////////////////////////////////////////////////////////////////////
  421.     if(dialogid == DIA_BOAT)
  422.     {
  423.         if(!response)
  424.         {
  425.             ShowPlayerDialog(playerid, DIA_VEH, DIALOG_STYLE_LIST, "Fahrzeug-Menu", "Autos\nBikes\nBoote\nFlugzeuge\nHelikopter", "Weiter", "Abbrechen");
  426.             return 0;
  427.         }
  428.         switch(listitem)
  429.         {
  430.             case 0:
  431.             {
  432.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  433.                 new vehicleid;
  434.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  435.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  436.                 vehicleid = CreateVehicle(472,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  437.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  438.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  439.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  440.             }
  441.             case 1:
  442.             {
  443.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  444.                 new vehicleid;
  445.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  446.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  447.                 vehicleid = CreateVehicle(473,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  448.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  449.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  450.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  451.             }
  452.             case 2:
  453.             {
  454.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  455.                 new vehicleid;
  456.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  457.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  458.                 vehicleid = CreateVehicle(493,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  459.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  460.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  461.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  462.             }
  463.             case 3:
  464.             {
  465.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  466.                 new vehicleid;
  467.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  468.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  469.                 vehicleid = CreateVehicle(430,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  470.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  471.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  472.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  473.             }
  474.             case 4:
  475.             {
  476.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  477.                 new vehicleid;
  478.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  479.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  480.                 vehicleid = CreateVehicle(446,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  481.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  482.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  483.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  484.             }
  485.  
  486.  
  487.         }
  488.  
  489.     }
  490.  
  491.  
  492. ////////////////////////////////////////////////////////////DIALOGE FÜR FLUGZEUGE////////////////////////////////////////////////////////////////////////////////////
  493.     if(dialogid == DIA_FLY)
  494.     {
  495.         if(!response)
  496.         {
  497.             ShowPlayerDialog(playerid, DIA_VEH, DIALOG_STYLE_LIST, "Fahrzeug-Menu", "Autos\nBikes\nBoote\nFlugzeuge\nHelikopter", "Weiter", "Abbrechen");
  498.             return 0;
  499.         }
  500.         switch(listitem)
  501.         {
  502.             case 0:
  503.             {
  504.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  505.                 new vehicleid;
  506.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  507.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  508.                 vehicleid = CreateVehicle(460,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  509.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  510.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  511.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  512.             }
  513.             case 1:
  514.             {
  515.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  516.                 new vehicleid;
  517.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  518.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  519.                 vehicleid = CreateVehicle(511,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  520.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  521.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  522.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  523.             }
  524.             case 2:
  525.             {
  526.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  527.                 new vehicleid;
  528.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  529.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  530.                 vehicleid = CreateVehicle(512,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  531.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  532.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  533.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  534.             }
  535.             case 3:
  536.             {
  537.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  538.                 new vehicleid;
  539.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  540.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  541.                 vehicleid = CreateVehicle(513,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  542.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  543.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  544.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  545.             }
  546.             case 4:
  547.             {
  548.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  549.                 new vehicleid;
  550.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  551.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  552.                 vehicleid = CreateVehicle(519,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  553.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  554.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  555.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  556.             }
  557.  
  558.  
  559.         }
  560.  
  561.     }
  562.  
  563.  
  564.  
  565.  
  566. /////////////////////////////////////////////////////////DIALOGE FÜR DIE HELIS///////////////////////////////////////////////////////////////////////////////////////
  567.  
  568.     if(dialogid == DIA_HELI)
  569.     {
  570.         if(!response)
  571.         {
  572.             ShowPlayerDialog(playerid, DIA_VEH, DIALOG_STYLE_LIST, "Fahrzeug-Menu", "Autos\nBikes\nBoote\nFlugzeuge\nHelikopter", "Weiter", "Abbrechen");
  573.             return 0;
  574.         }
  575.         switch(listitem)
  576.         {
  577.             case 0:
  578.             {
  579.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  580.                 new vehicleid;
  581.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  582.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  583.                 vehicleid = CreateVehicle(548,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  584.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  585.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  586.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  587.             }
  588.             case 1:
  589.             {
  590.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  591.                 new vehicleid;
  592.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  593.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  594.                 vehicleid = CreateVehicle(563,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  595.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  596.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  597.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  598.             }
  599.             case 2:
  600.             {
  601.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  602.                 new vehicleid;
  603.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  604.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  605.                 vehicleid = CreateVehicle(417,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  606.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  607.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  608.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  609.             }
  610.             case 3:
  611.             {
  612.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  613.                 new vehicleid;
  614.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  615.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  616.                 vehicleid = CreateVehicle(469,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  617.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  618.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  619.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  620.             }
  621.             case 4:
  622.             {
  623.                 if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT)return SendClientMessage(playerid, rot, "Du bist nicht zu Fuss unterwegs!");
  624.                 new vehicleid;
  625.                 GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  626.                 GetPlayerFacingAngle(playerid, VehPos[3]);
  627.                 vehicleid = CreateVehicle(487,VehPos[0],VehPos[1],VehPos[2],VehPos[3],1,1,-1);
  628.                 LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  629.                 SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  630.                 PutPlayerInVehicle(playerid, vehicleid, 0);
  631.             }
  632.  
  633.  
  634.         }
  635.  
  636.     }
  637. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  638.  
  639.     return 1;
  640. }
  641.  
  642.  
  643. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  644. {
  645.     return 1;
  646. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement