Advertisement
Guest User

TankSpeedo By !Stan

a guest
May 8th, 2011
3,051
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 16.15 KB | None | 0 0
  1. ////////////////////SA:MP Tacho & Tank System by !Stan//////////////////////////
  2. ////////////////////////////////////////////////////////////////////////////////
  3. //////////////////////////www.SAMP-German.de////////////////////////////////////
  4. #include <a_samp>
  5.  
  6.  
  7. /*defines*/
  8. #define GasMax      100
  9. #define RunOutTime  30000
  10. #define RefuelWait  5000
  11. #define CAR_AMOUNT  700
  12. #define SpeedoTime  500
  13. #define COLOR_RED 0xFF0000FF
  14. #define COLOR_YELLOW 0xFFFF00AA
  15. #define Dialog_Tanken 1
  16.  
  17. /*forwards*/
  18. forward UpdateSpeedo();
  19. forward CheckGas();
  20. forward Fillup();
  21. forward SpeedoMeter();
  22. forward IsAtGasStation(playerid);
  23. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  24.  
  25. /*new´s*/
  26. new Text:SpeedoBox, Text:SpeedoVehText, Text:SpeedoVeh[MAX_PLAYERS], Text:SpeedoKMHText, Text:SpeedoKMH[MAX_PLAYERS],Text:SpeedoTankText, Text:SpeedoTank[MAX_PLAYERS];
  27. new Gas[CAR_AMOUNT], Betanken[MAX_PLAYERS],Float:TachoX[MAX_PLAYERS],Float:TachoY[MAX_PLAYERS],Float:TachoZ[MAX_PLAYERS];
  28. new FahrzeugName[][] =
  29. {
  30.     "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
  31.     "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
  32.     "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
  33.     "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection",
  34.     "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus",
  35.     "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
  36.     "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral",
  37.     "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
  38.     "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van",
  39.     "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
  40.     "Oceanic","Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy",
  41.     "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX",
  42.     "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper",
  43.     "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking",
  44.     "Blista Compact", "Police Maverick", "Boxvillde", "Benson", "Mesa", "RC Goblin",
  45.     "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT",
  46.     "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt",
  47.     "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra",
  48.     "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
  49.     "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer",
  50.     "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
  51.     "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo",
  52.     "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite",
  53.     "Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratum",
  54.     "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
  55.     "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper",
  56.     "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400",
  57.     "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
  58.     "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car",
  59.     "Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha",
  60.     "Phoenix", "2. Gebrauchtwagen", "1. Gebrauchtwagen", "Luggage", "Luggage", "Stairs", "Boxville",
  61.     "Tiller", "Utility Trailer"
  62. };
  63.  
  64.  
  65. public OnFilterScriptInit()
  66. {
  67.     /*Server Online*/
  68.     print("\n__________________________________________");
  69.     print("[!Stan´s] Speedometer geladen...");
  70.     print("__________________________________________\n");
  71.     /*Textdraws*/
  72.     SpeedoBox = TextDrawCreate(623.000000, 324.000000, "       .");
  73.     TextDrawBackgroundColor(SpeedoBox, 255);
  74.     TextDrawFont(SpeedoBox, 1);
  75.     TextDrawLetterSize(SpeedoBox, 27.410072, 1.000000);
  76.     TextDrawColor(SpeedoBox, -1);
  77.     TextDrawSetOutline(SpeedoBox, 0);
  78.     TextDrawSetProportional(SpeedoBox, 1);
  79.     TextDrawSetShadow(SpeedoBox, 1);
  80.     TextDrawUseBox(SpeedoBox, 1);
  81.     TextDrawBoxColor(SpeedoBox, 50);
  82.     TextDrawTextSize(SpeedoBox, 511.000000, -7.000000);
  83.  
  84.     SpeedoVehText = TextDrawCreate(516.000000, 322.000000, "Fahrzeug:");
  85.     TextDrawBackgroundColor(SpeedoVehText, 255);
  86.     TextDrawFont(SpeedoVehText, 2);
  87.     TextDrawLetterSize(SpeedoVehText, 0.320000, 1.000000);
  88.     TextDrawColor(SpeedoVehText, 75366399);
  89.     TextDrawSetOutline(SpeedoVehText, 1);
  90.     TextDrawSetProportional(SpeedoVehText, 1);
  91.  
  92.     SpeedoTankText = TextDrawCreate(516.000000, 376.000000, "Tank:");
  93.     TextDrawBackgroundColor(SpeedoTankText, 255);
  94.     TextDrawFont(SpeedoTankText, 2);
  95.     TextDrawLetterSize(SpeedoTankText, 0.320000, 1.000000);
  96.     TextDrawColor(SpeedoTankText, 75366399);
  97.     TextDrawSetOutline(SpeedoTankText, 1);
  98.     TextDrawSetProportional(SpeedoTankText, 1);
  99.  
  100.     SpeedoKMHText = TextDrawCreate(516.000000, 349.000000, "KM/H:");
  101.     TextDrawBackgroundColor(SpeedoKMHText, 255);
  102.     TextDrawFont(SpeedoKMHText, 2);
  103.     TextDrawLetterSize(SpeedoKMHText, 0.320000, 1.000000);
  104.     TextDrawColor(SpeedoKMHText, 75366399);
  105.     TextDrawSetOutline(SpeedoKMHText, 1);
  106.     TextDrawSetProportional(SpeedoKMHText, 1);
  107.     for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
  108.     {
  109.         SpeedoVeh[playerid] = TextDrawCreate(516.000000, 333.000000, " ");
  110.         TextDrawBackgroundColor(SpeedoVeh[playerid], 255);
  111.         TextDrawFont(SpeedoVeh[playerid], 2);
  112.         TextDrawLetterSize(SpeedoVeh[playerid], 0.320000, 1.000000);
  113.         TextDrawColor(SpeedoVeh[playerid], -1);
  114.         TextDrawSetOutline(SpeedoVeh[playerid], 1);
  115.         TextDrawSetProportional(SpeedoVeh[playerid], 1);
  116.  
  117.         SpeedoKMH[playerid] = TextDrawCreate(516.000000, 360.000000, " ");
  118.         TextDrawBackgroundColor(SpeedoKMH[playerid], 255);
  119.         TextDrawFont(SpeedoKMH[playerid], 2);
  120.         TextDrawLetterSize(SpeedoKMH[playerid], 0.320000, 1.000000);
  121.         TextDrawColor(SpeedoKMH[playerid], -1);
  122.         TextDrawSetOutline(SpeedoKMH[playerid], 1);
  123.         TextDrawSetProportional(SpeedoKMH[playerid], 1);
  124.  
  125.         SpeedoTank[playerid] = TextDrawCreate(516.000000, 387.000000, " ");
  126.         TextDrawBackgroundColor(SpeedoTank[playerid], 255);
  127.         TextDrawFont(SpeedoTank[playerid], 2);
  128.         TextDrawLetterSize(SpeedoTank[playerid], 0.320000, 1.000000);
  129.         TextDrawColor(SpeedoTank[playerid], -1);
  130.         TextDrawSetOutline(SpeedoTank[playerid], 1);
  131.         TextDrawSetProportional(SpeedoTank[playerid], 1);
  132.     }
  133.     /*Timer*/
  134.     SetTimer("UpdateSpeedo",1000,1);
  135.     SetTimer("SpeedoMeter",1000,1);
  136.     SetTimer("CheckGas",30000,1);
  137.     for(new c = 0; c < CAR_AMOUNT; c++)
  138.     {
  139.         Gas[c] = GasMax;
  140.     }
  141.     return 1;
  142. }
  143.  
  144. public OnFilterScriptExit()
  145. {
  146.     return 1;
  147. }
  148.  
  149.  
  150. public OnGameModeInit()
  151. {
  152.     // Don't use these lines if it's a filterscript
  153.     SetGameModeText("Blank Script");
  154.     AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  155.     return 1;
  156. }
  157.  
  158. public OnGameModeExit()
  159. {
  160.     return 1;
  161. }
  162.  
  163. public OnPlayerRequestClass(playerid, classid)
  164. {
  165.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  166.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  167.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  168.     return 1;
  169. }
  170.  
  171. public OnPlayerConnect(playerid)
  172. {
  173.     return 1;
  174. }
  175.  
  176. public OnPlayerDisconnect(playerid, reason)
  177. {
  178.     return 1;
  179. }
  180.  
  181. public OnPlayerSpawn(playerid)
  182. {
  183.     return 1;
  184. }
  185.  
  186. public OnPlayerDeath(playerid, killerid, reason)
  187. {
  188.     return 1;
  189. }
  190.  
  191. public OnVehicleSpawn(vehicleid)
  192. {
  193.     return 1;
  194. }
  195.  
  196. public OnVehicleDeath(vehicleid, killerid)
  197. {
  198.     return 1;
  199. }
  200.  
  201. public OnPlayerText(playerid, text[])
  202. {
  203.     return 1;
  204. }
  205.  
  206. public OnPlayerCommandText(playerid, cmdtext[])
  207. {
  208.     if(strcmp("/Tanken", cmdtext, true, 10) == 0)
  209.     {
  210.         if(IsPlayerInAnyVehicle(playerid))
  211.         {
  212.             if(IsAtGasStation(playerid))
  213.             {
  214.                 ShowPlayerDialog(playerid,Dialog_Tanken,DIALOG_STYLE_MSGBOX,"{FF0000}Möchtest du dein Fahrzeug Betanken ?","{FFFFFF}Wähle 'Ja' oder 'Nein'.","Ja","Nein");
  215.                 return 1;
  216.             }
  217.             else
  218.             {
  219.                 SendClientMessage(playerid, COLOR_RED, "Du bist an keiner Tankstelle!");
  220.                 return 1;
  221.             }
  222.         }
  223.         else
  224.         {
  225.             SendClientMessage(playerid,COLOR_RED,"Du sitzt in keinem Fahrzeug!");
  226.             return 1;
  227.         }
  228.     }
  229.     return 0;
  230. }
  231.  
  232. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  233. {
  234.     return 1;
  235. }
  236.  
  237. public OnPlayerExitVehicle(playerid, vehicleid)
  238. {
  239.     return 1;
  240. }
  241.  
  242. public OnPlayerStateChange(playerid, newstate, oldstate)
  243. {
  244.     if(newstate == PLAYER_STATE_DRIVER)
  245.     {
  246.         TextDrawShowForPlayer(playerid,SpeedoBox);
  247.         TextDrawShowForPlayer(playerid,SpeedoVehText);
  248.         TextDrawShowForPlayer(playerid,SpeedoVeh[playerid]);
  249.         TextDrawShowForPlayer(playerid,SpeedoKMHText);
  250.         TextDrawShowForPlayer(playerid,SpeedoKMH[playerid]);
  251.         TextDrawShowForPlayer(playerid,SpeedoTankText);
  252.         TextDrawShowForPlayer(playerid,SpeedoTank[playerid]);
  253.     }
  254.     if(oldstate == PLAYER_STATE_DRIVER)
  255.     {
  256.         TextDrawHideForPlayer(playerid,SpeedoBox);
  257.         TextDrawHideForPlayer(playerid,SpeedoVehText);
  258.         TextDrawHideForPlayer(playerid,SpeedoVeh[playerid]);
  259.         TextDrawHideForPlayer(playerid,SpeedoKMHText);
  260.         TextDrawHideForPlayer(playerid,SpeedoKMH[playerid]);
  261.         TextDrawHideForPlayer(playerid,SpeedoTankText);
  262.         TextDrawHideForPlayer(playerid, SpeedoTank[playerid]);
  263.     }
  264.     return 1;
  265. }
  266.  
  267. public OnPlayerEnterCheckpoint(playerid)
  268. {
  269.     return 1;
  270. }
  271.  
  272. public OnPlayerLeaveCheckpoint(playerid)
  273. {
  274.     return 1;
  275. }
  276.  
  277. public OnPlayerEnterRaceCheckpoint(playerid)
  278. {
  279.     return 1;
  280. }
  281.  
  282. public OnPlayerLeaveRaceCheckpoint(playerid)
  283. {
  284.     return 1;
  285. }
  286.  
  287. public OnRconCommand(cmd[])
  288. {
  289.     return 1;
  290. }
  291.  
  292. public OnPlayerRequestSpawn(playerid)
  293. {
  294.     return 1;
  295. }
  296.  
  297. public OnObjectMoved(objectid)
  298. {
  299.     return 1;
  300. }
  301.  
  302. public OnPlayerObjectMoved(playerid, objectid)
  303. {
  304.     return 1;
  305. }
  306.  
  307. public OnPlayerPickUpPickup(playerid, pickupid)
  308. {
  309.     return 1;
  310. }
  311.  
  312. public OnVehicleMod(playerid, vehicleid, componentid)
  313. {
  314.     return 1;
  315. }
  316.  
  317. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  318. {
  319.     return 1;
  320. }
  321.  
  322. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  323. {
  324.     return 1;
  325. }
  326.  
  327. public OnPlayerSelectedMenuRow(playerid, row)
  328. {
  329.     return 1;
  330. }
  331.  
  332. public OnPlayerExitedMenu(playerid)
  333. {
  334.     return 1;
  335. }
  336.  
  337. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  338. {
  339.     return 1;
  340. }
  341.  
  342. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  343. {
  344.     return 1;
  345. }
  346.  
  347. public OnRconLoginAttempt(ip[], password[], success)
  348. {
  349.     return 1;
  350. }
  351.  
  352. public OnPlayerUpdate(playerid)
  353. {
  354.     return 1;
  355. }
  356.  
  357. public OnPlayerStreamIn(playerid, forplayerid)
  358. {
  359.     return 1;
  360. }
  361.  
  362. public OnPlayerStreamOut(playerid, forplayerid)
  363. {
  364.     return 1;
  365. }
  366.  
  367. public OnVehicleStreamIn(vehicleid, forplayerid)
  368. {
  369.     return 1;
  370. }
  371.  
  372. public OnVehicleStreamOut(vehicleid, forplayerid)
  373. {
  374.     return 1;
  375. }
  376.  
  377.  
  378. public UpdateSpeedo()
  379. {
  380.     for(new i = 0;i<MAX_PLAYERS;i++)
  381.     {
  382.         if(IsPlayerConnected(i))
  383.         {
  384.             if(GetPlayerState(i)==2)
  385.             {
  386.  
  387.                 new speed[128];
  388.                 new Float:xfloat,Float:yfloat,Float:zfloat;
  389.                 new Float:distance,value;
  390.                 GetPlayerPos(i, xfloat, yfloat, zfloat);
  391.                 distance = floatsqroot(floatpower(floatabs(floatsub(xfloat,TachoX[i])),2)+floatpower(floatabs(floatsub(yfloat,TachoY[i])),2)+floatpower(floatabs(floatsub(zfloat,TachoZ[i])),2));
  392.                 value = floatround(distance * 11000);
  393.                 TachoX[i] = xfloat;
  394.                 TachoY[i] = yfloat;
  395.                 TachoZ[i] = zfloat;
  396.                 format(speed,sizeof(speed),"%d",floatround(value/3200));
  397.                 TextDrawSetString(SpeedoKMH[i],speed);
  398.                 new namestring[128];
  399.                 format(namestring,sizeof(namestring),"%s",FahrzeugName[GetVehicleModel(GetPlayerVehicleID(i))-400]);
  400.                 TextDrawSetString(SpeedoVeh[i],namestring);
  401.             }
  402.         }
  403.     }
  404.     return 1;
  405. }
  406.  
  407. public SpeedoMeter()
  408. {
  409.     for(new i = 0; i < MAX_PLAYERS; i++)
  410.     {
  411.         if(IsPlayerConnected(i))
  412.         {
  413.             if(IsPlayerInAnyVehicle(i) && GetPlayerState(i) == 2)
  414.             {
  415.                 new string[100];
  416.                 new vehicle = GetPlayerVehicleID(i);
  417.                 if(Gas[vehicle] <= 10)
  418.                 {
  419.                     format(string, sizeof(string), "%d%", Gas[vehicle]);
  420.                     TextDrawSetString(SpeedoTank[i], string);
  421.                 }
  422.                 else
  423.                 {
  424.                     format(string, sizeof(string), "%d%", Gas[vehicle]);
  425.                     TextDrawSetString(SpeedoTank[i], string);
  426.                 }
  427.             }
  428.         }
  429.     }
  430.     return 1;
  431. }
  432.  
  433. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  434. {
  435.     if(IsPlayerConnected(playerid))
  436.     {
  437.         new Float:oldposx, Float:oldposy, Float:oldposz;
  438.         new Float:tempposx, Float:tempposy, Float:tempposz;
  439.         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  440.         tempposx = (oldposx -x);
  441.         tempposy = (oldposy -y);
  442.         tempposz = (oldposz -z);
  443.         //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  444.         if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  445.         {
  446.             return 1;
  447.         }
  448.     }
  449.     return 0;
  450. }
  451.  
  452. public CheckGas()
  453. {
  454.     for(new i = 0; i < MAX_PLAYERS; i++)
  455.     {
  456.         if(IsPlayerConnected(i))
  457.         {
  458.             if(IsPlayerInAnyVehicle(i) && GetPlayerState(i) == 2)
  459.             {
  460.                 new vehicle = GetPlayerVehicleID(i);
  461.                 if(Gas[vehicle] >= 1)
  462.                 {
  463.                     if(Gas[vehicle] <= 10)
  464.                     {
  465.                         PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0);
  466.                     }
  467.                     Gas[vehicle]--;
  468.                 } else {
  469.                     TogglePlayerControllable(i, 0);
  470.                     GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~r~Dein Tank ist leer!~n~~w~/exit zum aussteigen", 5000, 3);
  471.                 }
  472.             }
  473.         }
  474.     }
  475.     return 1;
  476. }
  477.  
  478. public Fillup()
  479. {
  480.     for(new i = 0; i < MAX_PLAYERS; i++)
  481.     {
  482.         if(IsPlayerConnected(i))
  483.         {
  484.             new string[255];
  485.             new TankPreis;
  486.             new vehicle = GetPlayerVehicleID(i);
  487.             TankPreis = ((GasMax - Gas[vehicle]) * 2);
  488.  
  489.             if(Betanken[i] == 1)
  490.             {
  491.                 if(GetPlayerMoney(i) >= TankPreis)
  492.                 {
  493.                     Gas[vehicle] = GasMax;
  494.                     TogglePlayerControllable(i, 1);
  495.                     GivePlayerMoney(i, - TankPreis);
  496.                     Betanken[i] = 0;
  497.  
  498.                     format(string,sizeof(string),"Dein Fahrzeug wurde für %d$ voll aufgetankt!", TankPreis);
  499.                     SendClientMessage(i, COLOR_YELLOW, string);
  500.                 } else {
  501.                     SendClientMessage(i, COLOR_RED, "Leider hast du nicht genug Geld um dein Fahrzeug voll zu tanken!");
  502.                     format(string,sizeof(string),"Um deinen Tank bis auf das letzte aufzufüllen bräuchtest du %d$.", TankPreis);
  503.                     SendClientMessage(i, COLOR_RED, string);
  504.                 }
  505.             }
  506.         }
  507.     }
  508.     return 1;
  509. }
  510.  
  511. public IsAtGasStation(playerid)
  512. {
  513.     if(IsPlayerConnected(playerid))
  514.     {
  515.         if(PlayerToPoint(6.0,playerid,1004.0070,-939.3102,42.1797) || PlayerToPoint(6.0,playerid,1944.3260,-1772.9254,13.3906))
  516.         {//LS
  517.             return 1;
  518.         }
  519.         else if(PlayerToPoint(6.0,playerid,-90.5515,-1169.4578,2.4079) || PlayerToPoint(6.0,playerid,-1609.7958,-2718.2048,48.5391))
  520.         {//LS
  521.             return 1;
  522.         }
  523.         else if(PlayerToPoint(6.0,playerid,-2029.4968,156.4366,28.9498) || PlayerToPoint(8.0,playerid,-2408.7590,976.0934,45.4175))
  524.         {//SF
  525.             return 1;
  526.         }
  527.         else if(PlayerToPoint(5.0,playerid,-2243.9629,-2560.6477,31.8841) || PlayerToPoint(8.0,playerid,-1676.6323,414.0262,6.9484))
  528.         {//Between LS and SF
  529.             return 1;
  530.         }
  531.         else if(PlayerToPoint(6.0,playerid,2202.2349,2474.3494,10.5258) || PlayerToPoint(10.0,playerid,614.9333,1689.7418,6.6968))
  532.         {//LV
  533.             return 1;
  534.         }
  535.         else if(PlayerToPoint(8.0,playerid,-1328.8250,2677.2173,49.7665) || PlayerToPoint(6.0,playerid,70.3882,1218.6783,18.5165))
  536.         {//LV
  537.             return 1;
  538.         }
  539.         else if(PlayerToPoint(8.0,playerid,2113.7390,920.1079,10.5255) || PlayerToPoint(6.0,playerid,-1327.7218,2678.8723,50.0625))
  540.         {//LV
  541.             return 1;
  542.         }
  543.     }
  544.     return 0;
  545. }
  546.  
  547. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  548. {
  549.     if(dialogid == Dialog_Tanken)
  550.     {
  551.         if(response == 1)
  552.         {
  553.             TogglePlayerControllable(playerid, 0);
  554.             GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~r~Betanke Fahrzeug!~n~~y~~h~Bitte warten...",4600,3);
  555.             SetTimer("Fillup", RefuelWait, 0);
  556.             Betanken[playerid] = 1;
  557.         }
  558.         if(response == 0)
  559.         {
  560.             SendClientMessage(playerid,COLOR_RED,"Dann Betankst du dein Fahrzeug nicht.");
  561.         }
  562.     }
  563.     return 1;
  564. }
  565.  
  566. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  567. {
  568.     return 1;
  569. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement