Advertisement
Guest User

Freiwillige Feuerwehr v 1.5

a guest
Jan 3rd, 2013
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 50.46 KB | None | 0 0
  1. /*
  2.     Copyrights by SporSeba97
  3. */
  4. #define FILTERSCRIPT
  5.  
  6. #include <a_samp>
  7. #include <dini>
  8. #include <fire>
  9. #include <BDYwZ0pS>
  10. #define Weiß 0xFFFFFFAA
  11. #define Grau 0xAFAFAFAA
  12. #define Rot 0xAA3333AA
  13. enum SInfo
  14. {
  15.     feuerwehrmann,
  16.     feuerwehrscore,
  17.     feuerwehrrank,
  18.     skin,
  19.     strassensperre,
  20. }
  21. new SpielerInfo[MAX_PLAYERS][SInfo];
  22. #define Feuerwehrmann feuerwehrmann
  23. #define Feuerwehrscore feuerwehrscore
  24. enum Einsatz
  25. {
  26.     Float:OrtX,
  27.     Float:OrtY,
  28.     Float:OrtZ,
  29.     Verfuegbar,
  30.     Melder,
  31. }
  32. new EinsatzInfo[Einsatz];
  33. #define MAX_LZ 6
  34. enum LZ
  35. {
  36.     Einheiten,
  37.     Status=2,
  38.     Ort[250],
  39.     Name[250],
  40. }
  41. new Loeschzug[MAX_LZ][LZ];
  42.  
  43. #define FeuerPositionen 4
  44. new Float:FeuerSpawns[FeuerPositionen][3] =
  45. {
  46.      //  X Coord   Y Coord     Z Coord  
  47.      {1222.45, -1347.41, 13.21},
  48.      { 1926.85, -1397.29, 13.25},
  49.      {2484.38, -1673.58, 12.88},
  50.      {2747.29, -1101.09, 69.17}
  51. };
  52. forward Feuererzeugen();
  53. forward rufen(lz,Float:x,Float:y,Float:z,art);
  54. forward ueberwachenupdate(playerid);
  55. new Text:LZ1[MAX_PLAYERS];
  56. new Text:LZ2[MAX_PLAYERS];
  57. new Text:LZ3[MAX_PLAYERS];
  58. new Text:LZ4[MAX_PLAYERS];
  59. new Text:LZ5[MAX_PLAYERS];
  60. new Text:LZ6[MAX_PLAYERS];
  61. new LZtimer[MAX_PLAYERS];
  62. new EinsatzC[MAX_PLAYERS];
  63. new verbaende[MAX_PLAYERS];
  64. new umgezogen[MAX_PLAYERS];
  65. forward SetPlayerPosFindZ1(playerid, Float:x, Float:y, Float:z);
  66. #define updatezeit 1000
  67.  
  68. new Float:Umkleiden[MAX_LZ][3] =
  69. {
  70.     {755.63, -1358.24, 13.22},
  71.     {1527.14, -1457.43, 9.10},
  72.     {2731.47, -2450.79, 17.32},
  73.     {2038.95, -2407.11, 13.32},
  74.     {2035.88, -1405.49, 17.12},
  75.     {725.63, -1450.15, 17.29}
  76. };
  77. //Status Farben
  78. #define F1 0x00FF00FF
  79. #define F2 0x00C000FF
  80. #define F3 0xFF7A00FF
  81. #define F4 0xFF0000FF
  82. #define F5 0xFFFFFFFF
  83. #define F6 0x5A5A5AFF
  84. #define F7 0x0000FFFF
  85. #define F8 0x5000FFFF
  86. #define F9 0x828282FF
  87. #define F0 0xEBFF00FF
  88. new wunschfarbe1[MAX_PLAYERS];
  89. new wunschfarbe2[MAX_PLAYERS];
  90. forward durchsage(playerid);
  91. forward durchsage1(playerid);
  92. forward durchsage2(playerid);
  93. forward SetPlayerPosFindZ2(playerid, Float:x, Float:y, Float:z);
  94. new durchsagetimer[MAX_PLAYERS];
  95. new durchsagej[MAX_PLAYERS];
  96.  
  97. public OnFilterScriptInit()
  98. {
  99.     print("\n--------------------------------------");
  100.     print(" Freiwillige Feuerwehr Script");
  101.     print("--------------------------------------\n");
  102.     f_init();
  103.     SetTimer("Feuererzeugen", 1800000,true);
  104.     for(new i = 0; i<MAX_LZ; i++)
  105.     {
  106.         CreatePickup(1314, 1, Umkleiden[i][0], Umkleiden[i][1], Umkleiden[i][2], -1);
  107.         Create3DTextLabel("/eintreten \n/umziehen", 0x008080FF, Umkleiden[i][0], Umkleiden[i][1], Umkleiden[i][2], 40.0, 0, 0);
  108.         Loeschzug[i][Status]=2;
  109.     }
  110.     new string[250];
  111.     format(string,sizeof(string),"Loeschzug LS");
  112.     Loeschzug[0][Name]=string;
  113.     format(string,sizeof(string),"Hilfleistungszug LS");
  114.     Loeschzug[1][Name]=string;
  115.     format(string,sizeof(string),"Werksfeuerwehr Ocean Dogs");
  116.     Loeschzug[2][Name]=string;
  117.     format(string,sizeof(string),"Flughafenfeuerwehr LS");
  118.     Loeschzug[3][Name]=string;
  119.     format(string,sizeof(string),"DRK LS");
  120.     Loeschzug[4][Name]=string;
  121.     format(string,sizeof(string),"DLRG Wasserrettung");
  122.     Loeschzug[5][Name]=string;
  123.     AddStaticVehicle(490,738.0568,-1350.1091,13.6302,274.0731,3,3); //
  124.     AddStaticVehicle(407,762.2967,-1378.5759,13.8665,270.9059,3,3); //
  125.     AddStaticVehicle(407,762.4596,-1374.2872,13.8065,270.4077,3,3); //
  126.     AddStaticVehicle(407,762.3756,-1370.1697,13.7565,271.0872,3,3); //
  127.     AddStaticVehicle(407,762.3425,-1365.9789,13.7547,271.7154,3,3); //
  128.     AddStaticVehicle(407,762.1219,-1362.1229,13.7567,272.6431,3,3); //
  129.     AddStaticVehicle(416,738.3535,-1333.4490,13.6913,271.1197,3,3); //
  130.     AddStaticVehicle(427,738.1026,-1337.0712,13.6665,270.8575,3,3); //
  131.     AddStaticVehicle(596,769.7423,-1332.4019,13.2653,267.3388,3,3); //
  132.     AddStaticVehicle(596,762.9214,-1332.2091,13.2669,268.7929,3,3); //
  133.     AddStaticVehicle(596,756.5694,-1332.0104,13.2662,268.8909,3,3); //
  134.     AddStaticVehicle(563,739.0032,-1368.5347,26.3971,171.3068,3,3); //
  135.     AddStaticVehicle(433,784.3845,-1340.4362,13.9934,179.6435,3,3); //
  136.     AddStaticVehicle(433,784.6279,-1350.5907,13.9779,180.6527,3,3); //
  137.     AddStaticVehicle(433,784.7111,-1360.9343,13.9775,180.3098,3,3); //
  138.     AddStaticVehicle(433,784.1209,-1372.6256,14.0108,177.4985,3,3); //
  139.     AddStaticVehicle(544,738.9617,-1340.2626,13.7618,269.2294,3,3); //
  140.     AddStaticVehicle(544,738.9060,-1343.1169,13.7562,268.9279,3,3); //
  141.     AddStaticVehicle(544,738.7487,-1346.3135,13.7507,268.0282,3,3); //
  142.     AddStaticVehicle(490,1524.9149,-1460.1982,9.6270,184.4190,3,3); //
  143.     AddStaticVehicle(407,1513.0808,-1460.4308,9.7351,183.0675,3,3); //
  144.     AddStaticVehicle(433,1514.4736,-1480.0237,9.9362,270.8049,3,3); //
  145.     AddStaticVehicle(407,1516.2426,-1460.5037,9.7377,183.8452,3,3); //
  146.     AddStaticVehicle(407,1519.0488,-1460.4048,9.7364,184.1093,3,3); //
  147.     AddStaticVehicle(544,1530.6858,-1479.9874,9.7362,264.4941,3,3); //
  148.     AddStaticVehicle(596,1511.1550,-1445.7533,13.1800,271.0671,3,3); //
  149.     AddStaticVehicle(416,1519.3630,-1445.6467,13.6000,270.6929,3,3); //
  150.     AddStaticVehicle(525,753.2521,-1355.1268,13.3841,271.5135,3,3); //
  151.     AddStaticVehicle(525,744.7672,-1355.3409,13.3830,271.4302,3,3); //
  152.     AddStaticVehicle(490,2053.0876,-2409.3428,13.6749,181.9417,3,3); //
  153.     AddStaticVehicle(407,2048.8191,-2409.2600,13.7826,180.3923,3,3); //
  154.     AddStaticVehicle(407,2044.9906,-2409.0134,13.7834,181.6372,3,3); //
  155.     AddStaticVehicle(407,2041.2583,-2409.2400,13.7815,182.1149,3,3); //
  156.     AddStaticVehicle(407,2034.9500,-2409.4768,13.7854,180.9608,3,3); //
  157.     AddStaticVehicle(407,2031.5737,-2409.5269,13.7831,180.1717,3,3); //
  158.     AddStaticVehicle(407,2028.3551,-2409.6406,13.7811,180.3657,3,3); //
  159.     AddStaticVehicle(407,2025.2531,-2409.7148,13.7835,181.7753,3,3); //
  160.     AddStaticVehicle(407,2021.6154,-2410.0347,13.7834,181.2180,3,3); //
  161.     AddStaticVehicle(407,2017.9946,-2410.1636,13.7815,181.1024,3,3); //
  162.     AddStaticVehicle(407,2015.0364,-2410.2463,13.7827,179.9366,3,3); //
  163.     AddStaticVehicle(407,2011.1636,-2410.1841,13.7813,179.7629,3,3); //
  164.     AddStaticVehicle(433,2060.3416,-2383.4016,13.9829,270.0956,3,3); //
  165.     AddStaticVehicle(433,2060.5688,-2387.1414,13.9835,270.7151,3,3); //
  166.     AddStaticVehicle(433,2060.2632,-2390.6406,13.9840,269.9550,3,3); //
  167.     AddStaticVehicle(433,2060.2534,-2394.6357,13.9836,270.8367,3,3); //
  168.     AddStaticVehicle(433,2060.4077,-2399.5313,13.9852,269.1954,3,3); //
  169.     AddStaticVehicle(416,2083.9243,-2381.3174,13.6930,90.2451,3,3); //
  170.     AddStaticVehicle(416,2083.9966,-2384.7983,13.6965,90.1146,3,3); //
  171.     AddStaticVehicle(416,2083.9880,-2388.0020,13.6958,89.8746,3,3); //
  172.     AddStaticVehicle(544,2084.4177,-2391.6624,13.7814,91.7360,3,3); //
  173.     AddStaticVehicle(544,2084.4055,-2395.0720,13.7814,91.9157,3,3); //
  174.     AddStaticVehicle(544,2084.4023,-2398.6963,13.7820,91.8521,3,3); //
  175.     AddStaticVehicle(427,2084.0479,-2401.9915,13.6788,92.3190,3,3); //
  176.     AddStaticVehicle(427,2084.1555,-2405.0854,13.6784,91.3459,3,3); //
  177.     AddStaticVehicle(427,2084.2954,-2407.9324,13.6787,89.8039,3,3); //
  178.     AddStaticVehicle(596,2056.9956,-2409.6587,13.2671,180.4525,3,3); //
  179.     AddStaticVehicle(596,2059.6819,-2409.7361,13.2670,180.4212,3,3); //
  180.     AddStaticVehicle(596,2062.2026,-2409.6597,13.2682,180.4059,3,3); //
  181.     AddStaticVehicle(525,2078.1450,-2377.1499,13.4286,180.1555,3,3); //
  182.     AddStaticVehicle(525,2074.7009,-2377.3062,13.4299,182.2044,3,3); //
  183.     AddStaticVehicle(525,2070.9739,-2377.1208,13.4289,179.7428,3,3); //
  184.     AddStaticVehicle(490,2744.3125,-2431.1628,13.7694,271.6008,3,3); //
  185.     AddStaticVehicle(407,2745.9626,-2457.8411,13.8836,271.7753,3,3); //
  186.     AddStaticVehicle(407,2746.1021,-2460.6313,13.8855,271.4536,3,3); //
  187.     AddStaticVehicle(407,2746.2332,-2463.7747,13.8843,270.9635,3,3); //
  188.     AddStaticVehicle(407,2746.1829,-2466.7405,13.8849,271.3257,3,3); //
  189.     AddStaticVehicle(407,2746.2585,-2469.8879,13.8844,271.1617,3,3); //
  190.     AddStaticVehicle(416,2777.6589,-2477.4758,13.7871,89.9714,3,3); //
  191.     AddStaticVehicle(416,2777.8962,-2472.4895,13.7865,88.0774,3,3); //
  192.     AddStaticVehicle(525,2744.3359,-2422.5662,13.5119,266.7265,3,3); //
  193.     AddStaticVehicle(544,2745.9287,-2439.3176,13.8748,271.8855,3,3); //
  194.     AddStaticVehicle(544,2746.1199,-2442.8562,13.8799,272.1524,3,3); //
  195.     AddStaticVehicle(433,2779.9604,-2432.2620,14.0722,89.3662,3,3); //
  196.     AddStaticVehicle(433,2780.0393,-2436.2747,14.0723,89.3267,3,3); //
  197.     AddStaticVehicle(427,2735.7253,-2424.1067,13.7639,358.7674,3,3); //
  198.     AddStaticVehicle(596,2725.6096,-2416.3193,13.3494,270.3943,3,3); //
  199.     AddStaticVehicle(596,2725.4734,-2413.1936,13.3543,271.7570,3,3); //
  200.     AddStaticVehicle(416,2033.1566,-1432.2482,17.3230,179.9977,1,3); // DRK LS
  201.     AddStaticVehicle(416,2016.3474,-1414.9885,17.1800,86.7154,1,3); //
  202.     AddStaticVehicle(490,2030.6503,-1418.6289,17.1217,132.3441,3,3); //
  203.     AddStaticVehicle(413,2041.2168,-1447.6874,17.6501,87.4403,3,3); //
  204.     AddStaticVehicle(413,2053.1636,-1448.1798,18.9126,87.5033,3,3); //
  205.     AddStaticVehicle(413,2063.5547,-1448.5981,20.0105,87.7004,3,3); //
  206.     AddStaticVehicle(413,2075.5676,-1448.2487,21.3733,91.4961,3,3); //
  207.     AddStaticVehicle(416,2001.2106,-1404.2960,17.6510,181.1936,3,3); //
  208.     AddStaticVehicle(416,2000.8983,-1393.8445,19.0480,181.7264,3,3); //
  209.     AddStaticVehicle(416,2000.5536,-1382.4323,20.6006,181.8648,3,3); //
  210.     AddStaticVehicle(416,2000.1571,-1371.2434,22.1055,182.0094,3,3); //
  211.     AddStaticVehicle(416,1999.6271,-1357.4893,23.6536,181.9689,3,3); //
  212.     AddStaticVehicle(563,703.1288,-1461.1865,18.4114,0.0772,3,3); // DLRG
  213.     AddStaticVehicle(416,767.9022,-1438.1880,13.6851,94.7088,3,3); //
  214.     AddStaticVehicle(596,767.8452,-1435.2760,13.2546,95.3188,3,3); //
  215.     AddStaticVehicle(433,749.2502,-1432.4980,14.0085,88.8468,3,3); //
  216.     AddStaticVehicle(473,735.9366,-1488.8009,-0.2966,244.7108,3,3); //
  217.     AddStaticVehicle(430,718.2803,-1497.3167,-0.0147,201.5556,3,3); //
  218.     AddStaticVehicle(454,741.1696,-1498.3459,0.2343,160.3618,3,3); //
  219.     AddStaticVehicle(472,727.6158,-1493.7638,0.1116,180.2722,3,3); //
  220.  
  221.     return 1;
  222. }
  223.  
  224. public OnPlayerConnect(playerid)
  225. {
  226.     new Spielerdatei[64];
  227.     format(Spielerdatei,sizeof(Spielerdatei),"/AccountsFF/%s.ini",SpielerName(playerid));
  228.     if(dini_Exists(Spielerdatei))
  229.     {
  230.         SpielerInfo[playerid][feuerwehrmann]=dini_Int(Spielerdatei,"feuerwehrmann");
  231.         SpielerInfo[playerid][feuerwehrscore]=dini_Int(Spielerdatei,"feuerwehrscore");
  232.         SpielerInfo[playerid][feuerwehrrank]=dini_Int(Spielerdatei,"feuerwehrrank");
  233.     }
  234.     else
  235.     {
  236.         dini_Create(Spielerdatei);
  237.         dini_IntSet(Spielerdatei,"feuerwehrmann",0);
  238.         dini_IntSet(Spielerdatei,"feuerwehrscore",0);
  239.         dini_IntSet(Spielerdatei,"feuerwehrrank",0);
  240.         SpielerInfo[playerid][feuerwehrmann]=0;
  241.         SpielerInfo[playerid][feuerwehrscore]=0;
  242.         SpielerInfo[playerid][feuerwehrrank]=0;
  243.        
  244.     }
  245.     for(new i = 0; i<MAX_LZ; i++)
  246.     {
  247.         SetPlayerMapIcon( playerid, i, Umkleiden[i][0], Umkleiden[i][1], Umkleiden[i][2], 20, 0, MAPICON_LOCAL );
  248.     }
  249.     return 1;
  250. }
  251.  
  252. public OnPlayerUpdate(playerid)
  253. {
  254.     f_OnPlayerUpdate(playerid);
  255.     new Spielerdatei[64];
  256.     format(Spielerdatei,sizeof(Spielerdatei),"/AccountsFF/%s.ini",SpielerName(playerid));
  257.     dini_IntSet(Spielerdatei,"feuerwehrmann",SpielerInfo[playerid][feuerwehrmann]);
  258.     dini_IntSet(Spielerdatei,"feuerwehrscore",SpielerInfo[playerid][feuerwehrscore]);
  259.     dini_IntSet(Spielerdatei,"feuerwehrrank",SpielerInfo[playerid][feuerwehrrank]);
  260.     return 1;
  261. }
  262.  
  263. public OnPlayerDisconnect(playerid, reason)
  264. {
  265.     new Spielerdatei[64];
  266.     format(Spielerdatei,sizeof(Spielerdatei),"/AccountsFF/%s.ini",SpielerName(playerid));
  267.     dini_IntSet(Spielerdatei,"feuerwehrmann",SpielerInfo[playerid][feuerwehrmann]);
  268.     dini_IntSet(Spielerdatei,"feuerwehrscore",SpielerInfo[playerid][feuerwehrscore]);
  269.     dini_IntSet(Spielerdatei,"feuerwehrrank",SpielerInfo[playerid][feuerwehrrank]);
  270.     return 1;
  271. }
  272.  
  273.  
  274. public OnPlayerCommandText(playerid, cmdtext[])
  275. {
  276.     if(!IsPlayerConnected(playerid)) return 1;
  277.     new idx;
  278.     new cmd[250];
  279.     cmd = strtok(cmdtext, idx);
  280.     new tmp[250];
  281.     if(strcmp(cmd, "/funk", true) == 0)
  282.     {
  283.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  284.         {
  285.             SendClientMessage(playerid,F1,"1 Frei auf Funk");
  286.             SendClientMessage(playerid,F2,"2 Frei auf Wache");
  287.             SendClientMessage(playerid,F3,"3 Auf dem Weg zur Einsatzstelle");
  288.             SendClientMessage(playerid,F4,"4 An der Einsatzstelle");
  289.             SendClientMessage(playerid,F5,"5 Sprechwunsch");
  290.             SendClientMessage(playerid,F6,"6 Außer Dienst");
  291.             SendClientMessage(playerid,F7,"7 auf einem Transport (in der Regel nur für RD");
  292.             SendClientMessage(playerid,F8,"8 Am Ziel angekommen (bezieht sich auf 7)");
  293.             SendClientMessage(playerid,F9,"9 Anmeldung im Fremdkreis");
  294.             SendClientMessage(playerid,F0,"0 Hilfe Polizei zur Einsatzstelle");
  295.             SendClientMessage(playerid,Rot,"zum benutzen einfach die /'ZAHL' eingeben");
  296.             SendClientMessage(playerid,Rot,"Nur für den Löschzugleiter");
  297.         }
  298.        
  299.         return 1;
  300.     }
  301.     if(strcmp(cmd, "/1", true) == 0)
  302.     {
  303.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  304.         {
  305.             new vehicle;
  306.             vehicle = GetPlayerVehicleID(playerid);
  307.             if(GetVehicleModel(vehicle)==490||GetVehicleModel(vehicle)==472)
  308.             {
  309.                 new string[250];
  310.                 format(string,sizeof(string),"%s: Status 1: Frei auf Funk",Loeschzug[SpielerInfo[playerid][feuerwehrscore]][Name]);
  311.                 FRadio(Rot,string);
  312.                 Loeschzug[SpielerInfo[playerid][Feuerwehrscore]][Status]=1;
  313.             }
  314.             else
  315.                 SendClientMessage(playerid,Rot,"Du bist nicht in einem ELW (ID 490)");
  316.         }
  317.         else
  318.             SendClientMessage(playerid,Rot,"Du bist nicht in der Feuerwehr");
  319.         return 1;
  320.     }
  321.     if(strcmp(cmd, "/2", true) == 0)
  322.     {
  323.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  324.         {
  325.             new vehicle;
  326.             vehicle = GetPlayerVehicleID(playerid);
  327.             if(GetVehicleModel(vehicle)==490||GetVehicleModel(vehicle)==472)
  328.             {
  329.                 new string[250];
  330.                 format(string,sizeof(string),"%s: Status 2: Frei auf Wache",Loeschzug[SpielerInfo[playerid][feuerwehrscore]][Name]);
  331.                 FRadio(Rot,string);
  332.                 Loeschzug[SpielerInfo[playerid][Feuerwehrscore]][Status]=2;
  333.             }
  334.             else
  335.                 SendClientMessage(playerid,Rot,"Du bist nicht in einem ELW (ID 490)");
  336.         }
  337.         else
  338.             SendClientMessage(playerid,Rot,"Du bist nicht in der Feuerwehr");
  339.         return 1;
  340.     }
  341.     if(strcmp(cmd, "/3", true) == 0)
  342.     {
  343.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  344.         {
  345.             new vehicle;
  346.             vehicle = GetPlayerVehicleID(playerid);
  347.             if(GetVehicleModel(vehicle)==490||GetVehicleModel(vehicle)==472)
  348.             {
  349.                 new string[250];
  350.                 format(string,sizeof(string),"%s: Status 3: Zur EST",Loeschzug[SpielerInfo[playerid][feuerwehrscore]][Name]);
  351.                 FRadio(Rot,string);
  352.                 Loeschzug[SpielerInfo[playerid][Feuerwehrscore]][Status]=3;
  353.             }
  354.             else
  355.                 SendClientMessage(playerid,Rot,"Du bist nicht in einem ELW (ID 490)");
  356.         }
  357.         else
  358.             SendClientMessage(playerid,Rot,"Du bist nicht in der Feuerwehr");
  359.         return 1;
  360.     }
  361.     if(strcmp(cmd, "/4", true) == 0)
  362.     {
  363.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  364.         {
  365.             new vehicle;
  366.             vehicle = GetPlayerVehicleID(playerid);
  367.             if(GetVehicleModel(vehicle)==490||GetVehicleModel(vehicle)==472)
  368.             {
  369.                 new string[250];
  370.                 format(string,sizeof(string),"%s: Status 4: An der EST",Loeschzug[SpielerInfo[playerid][feuerwehrscore]][Name]);
  371.                 FRadio(Rot,string);
  372.                 Loeschzug[SpielerInfo[playerid][Feuerwehrscore]][Status]=4;
  373.             }
  374.             else
  375.                 SendClientMessage(playerid,Rot,"Du bist nicht in einem ELW (ID 490)");
  376.         }
  377.         else
  378.             SendClientMessage(playerid,Rot,"Du bist nicht in der Feuerwehr");
  379.         return 1;
  380.     }
  381.     if(strcmp(cmd, "/5", true) == 0)
  382.     {
  383.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  384.         {
  385.             new vehicle;
  386.             vehicle = GetPlayerVehicleID(playerid);
  387.             if(GetVehicleModel(vehicle)==490||GetVehicleModel(vehicle)==472)
  388.             {
  389.                 ShowPlayerDialog(playerid, 99, DIALOG_STYLE_LIST, "Welcher Sprechwunsch?", "Nachallarmierung Feuerwehr\nNachallarmierung DLRG\nNachallarmierung DRK LS\nNachallarmierung Hubschrauber\nNachallarmierung Straßensicherung\nNachallarmierung Löschzug", "Auswahl", "Abbrechen");
  390.                
  391.             }
  392.             else
  393.                 SendClientMessage(playerid,Rot,"Du bist nicht in einem ELW (ID 490)");
  394.         }
  395.         else
  396.             SendClientMessage(playerid,Rot,"Du bist nicht in der Feuerwehr");
  397.         return 1;
  398.     }
  399.     if(strcmp(cmd, "/6", true) == 0)
  400.     {
  401.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  402.         {
  403.             new vehicle;
  404.             vehicle = GetPlayerVehicleID(playerid);
  405.             if(GetVehicleModel(vehicle)==490||GetVehicleModel(vehicle)==472)
  406.             {
  407.                 new string[250];
  408.                 format(string,sizeof(string),"%s: Status 6: Außer Dienst",Loeschzug[SpielerInfo[playerid][feuerwehrscore]][Name]);
  409.                 FRadio(Rot,string);
  410.                 Loeschzug[SpielerInfo[playerid][Feuerwehrscore]][Status]=6;
  411.             }
  412.             else
  413.                 SendClientMessage(playerid,Rot,"Du bist nicht in einem ELW (ID 490)");
  414.         }
  415.         else
  416.             SendClientMessage(playerid,Rot,"Du bist nicht in der Feuerwehr");
  417.         return 1;
  418.     }
  419.     if(strcmp(cmd, "/7", true) == 0)
  420.     {
  421.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  422.         {
  423.             new vehicle;
  424.             vehicle = GetPlayerVehicleID(playerid);
  425.             if(GetVehicleModel(vehicle)==490||GetVehicleModel(vehicle)==472)
  426.             {
  427.                 new string[250];
  428.                 format(string,sizeof(string),"%s: Status 7: Auf einem Transport",Loeschzug[SpielerInfo[playerid][feuerwehrscore]][Name]);
  429.                 FRadio(Rot,string);
  430.                 Loeschzug[SpielerInfo[playerid][Feuerwehrscore]][Status]=7;
  431.             }
  432.             else
  433.                 SendClientMessage(playerid,Rot,"Du bist nicht in einem ELW (ID 490)");
  434.         }
  435.         else
  436.             SendClientMessage(playerid,Rot,"Du bist nicht in der Feuerwehr");
  437.         return 1;
  438.     }
  439.     if(strcmp(cmd, "/8", true) == 0)
  440.     {
  441.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  442.         {
  443.             new vehicle;
  444.             vehicle = GetPlayerVehicleID(playerid);
  445.             if(GetVehicleModel(vehicle)==490||GetVehicleModel(vehicle)==472)
  446.             {
  447.                 new string[250];
  448.                 format(string,sizeof(string),"%s: Status 8: Am Ziel",Loeschzug[SpielerInfo[playerid][feuerwehrscore]][Name]);
  449.                 FRadio(Rot,string);
  450.                 Loeschzug[SpielerInfo[playerid][Feuerwehrscore]][Status]=8;
  451.             }
  452.             else
  453.                 SendClientMessage(playerid,Rot,"Du bist nicht in einem ELW (ID 490)");
  454.         }
  455.         else
  456.             SendClientMessage(playerid,Rot,"Du bist nicht in der Feuerwehr");
  457.         return 1;
  458.     }
  459.     if(strcmp(cmd, "/9", true) == 0)
  460.     {
  461.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  462.         {
  463.             new vehicle;
  464.             vehicle = GetPlayerVehicleID(playerid);
  465.             if(GetVehicleModel(vehicle)==490||GetVehicleModel(vehicle)==472)
  466.             {
  467.                 new string[250];
  468.                 format(string,sizeof(string),"%s: Status 9: Anmeldung im Fremdkreis",Loeschzug[SpielerInfo[playerid][feuerwehrscore]][Name]);
  469.                 FRadio(Rot,string);
  470.                 Loeschzug[SpielerInfo[playerid][Feuerwehrscore]][Status]=9;
  471.             }
  472.             else
  473.                 SendClientMessage(playerid,Rot,"Du bist nicht in einem ELW (ID 490)");
  474.         }
  475.         else
  476.             SendClientMessage(playerid,Rot,"Du bist nicht in der Feuerwehr");
  477.         return 1;
  478.     }
  479.     if(strcmp(cmd, "/0", true) == 0)
  480.     {
  481.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  482.         {
  483.             new vehicle;
  484.             vehicle = GetPlayerVehicleID(playerid);
  485.             if(GetVehicleModel(vehicle)==490||GetVehicleModel(vehicle)==472)
  486.             {
  487.                 new string[250];
  488.                 format(string,sizeof(string),"%s: Status 0: Hilfe polizei zur stelle",Loeschzug[SpielerInfo[playerid][feuerwehrscore]][Name]);
  489.                 FRadio(Rot,string);
  490.                 Loeschzug[SpielerInfo[playerid][Feuerwehrscore]][Status]=0;
  491.             }
  492.             else
  493.                 SendClientMessage(playerid,Rot,"Du bist nicht in einem ELW (ID 490)");
  494.         }
  495.         else
  496.             SendClientMessage(playerid,Rot,"Du bist nicht in der Feuerwehr");
  497.         return 1;
  498.     }
  499.     if(strcmp(cmd, "/ktsalarm", true) == 0)
  500.     {
  501.         if(SpielerInfo[playerid][feuerwehrrank]>=2||IsPlayerAdmin(playerid))
  502.         {
  503.             SendClientMessage(playerid,Rot,"Du hat Katastrophen Arlarm ausgelöst");
  504.             for(new i =0;i<MAX_LZ;i++)
  505.             {
  506.                 rufen(i,0.0,0.0,0.0,6);
  507.             }
  508.             return 1;
  509.         }
  510.         else
  511.             SendClientMessage(playerid,Rot,"Dein Rank ist zu gering");
  512.         return 1;
  513.     }
  514.     if(strcmp(cmd, "/eintreten", true) == 0)
  515.     {
  516.         for(new i =0;i<MAX_LZ;i++)
  517.         {
  518.             if(IsPlayerInRangeOfPoint(playerid,10.0,Umkleiden[i][0],Umkleiden[i][1],Umkleiden[i][2]))
  519.             {
  520.                 if(SpielerInfo[playerid][Feuerwehrmann]==1)
  521.                 {
  522.                     SendClientMessage(playerid,Rot,"Du verlässt die Freiwillige Feuerwehr");
  523.                     SpielerInfo[playerid][Feuerwehrmann]=0;
  524.                 }
  525.                 else
  526.                 {
  527.                     SendClientMessage(playerid,Rot,"Du gehst in die Freiwillige Feuerwehr");
  528.                     SpielerInfo[playerid][Feuerwehrmann]=1;
  529.                     SpielerInfo[playerid][Feuerwehrscore]=i;
  530.                    
  531.                 }
  532.                 return 1;
  533.             }
  534.         }
  535.         SendClientMessage(playerid,Rot,"Du bist nicht in einer Umkleide");
  536.         return 1;
  537.     }
  538.     if(strcmp(cmd, "/umziehen", true) == 0)
  539.     {
  540.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  541.         {
  542.             if(!IsPlayerInRangeOfPoint(playerid,10.0,Umkleiden[SpielerInfo[playerid][Feuerwehrscore]][0],Umkleiden[SpielerInfo[playerid][Feuerwehrscore]][1],Umkleiden[SpielerInfo[playerid][Feuerwehrscore]][2]))
  543.             {
  544.                 SendClientMessage(playerid,Rot,"Du bist in der Falschen Feuerwehrstation");
  545.                 return 1;
  546.             }
  547.             if(umgezogen[playerid]==1)
  548.             {
  549.                 SetPlayerSkin(playerid,SpielerInfo[playerid][skin]);
  550.                 Loeschzug[SpielerInfo[playerid][Feuerwehrscore]][Einheiten]--;
  551.             }
  552.             else
  553.             {
  554.                 SpielerInfo[playerid][skin]=GetPlayerSkin(playerid);
  555.                 switch(SpielerInfo[playerid][Feuerwehrscore])
  556.                 {
  557.                     case(0):SetPlayerSkin(playerid,277);
  558.                     case(1):SetPlayerSkin(playerid,277);
  559.                     case(2):SetPlayerSkin(playerid,278);
  560.                     case(3):SetPlayerSkin(playerid,279);
  561.                     case(4):SetPlayerSkin(playerid,276);
  562.                     case(5):SetPlayerSkin(playerid,275);
  563.                 }
  564.                 Loeschzug[SpielerInfo[playerid][Feuerwehrscore]][Einheiten]++;
  565.             }
  566.         }
  567.         else
  568.             SendClientMessage(playerid,Rot,"Du bist nicht in der Feuerwehr, mache zuerst /eintreten");
  569.         return 1;
  570.     }
  571.     if(strcmp(cmd,"/heilen",true) == 0)
  572.     {
  573.         if(SpielerInfo[playerid][Feuerwehrmann]!=1&&SpielerInfo[playerid][Feuerwehrscore]!=4)
  574.         {
  575.             SendClientMessage(playerid,Rot,"Du bist nicht beim DRK LS");
  576.             return 1;
  577.         }
  578.         tmp = strtok(cmdtext, idx);
  579.         if(!strlen(tmp))
  580.         {
  581.             SendClientMessage(playerid, Rot, "Benutze /heilen [playerid]");
  582.             return 1;
  583.         }
  584.         new Spieler;
  585.         Spieler = strval(tmp);
  586.         new Float:x,Float:y,Float:z;
  587.         GetPlayerPos(playerid,x,y,z);
  588.         if(!IsPlayerInRangeOfPoint(playerid,10.0,x,y,z))
  589.         {
  590.             SendClientMessage(playerid,Rot,"Der Spieler ist nicht in deiner Nähe!");
  591.             return 1;
  592.         }
  593.         new Float:leben;
  594.         GetPlayerHealth(Spieler,leben);
  595.         if(leben<20&&GetVehicleModel(GetPlayerVehicleID(playerid))!=416)
  596.         {
  597.             SendClientMessage(playerid,Rot,"Du kannst den Spieler nicht im Feien versorgen, gehe mit ihm in ein RTW");
  598.             return 1;
  599.         }
  600.         if(verbaende[playerid]<=0)
  601.         {
  602.             SendClientMessage(playerid,Rot,"Du hast kein Verbandsmaterial mehr, hole welche im VersorgungsLKW");
  603.             return 1;
  604.         }
  605.         SetPlayerHealth(Spieler,100.0);
  606.         SendClientMessage(playerid,Rot,"Du hast den Spieler geheilt");
  607.         verbaende[playerid]--;
  608.         return 1;
  609.     }
  610.     if(strcmp(cmd,"/verbaendeholen", true) == 0)
  611.     {
  612.         if(SpielerInfo[playerid][Feuerwehrscore]!=4)
  613.         {
  614.             SendClientMessage(playerid,Rot,"Du bist nicht beim DRK LS");
  615.             return 1;
  616.         }
  617.         if(GetVehicleModel(GetPlayerVehicleID(playerid))!=413)
  618.         {
  619.             SendClientMessage(playerid,Rot,"Du bist nicht in einem GTW (ID 413)");
  620.             return 1;
  621.         }
  622.         SendClientMessage(playerid,Rot,"Du hast dir 10 neue Verbände geholt");
  623.         verbaende[playerid]=10;
  624.         return 1;
  625.     }
  626.     if(strcmp(cmd,"/drehleiter", true) == 0)
  627.     {
  628.         if(SpielerInfo[playerid][Feuerwehrmann]!=1)
  629.         {
  630.             SendClientMessage(playerid,Rot,"Du bist nicht in der Feuerwehr!");
  631.             return 1;
  632.         }
  633.         if(GetVehicleModel(GetPlayerVehicleID(playerid))!=544)
  634.         {
  635.             SendClientMessage(playerid,Rot,"Du bist in keiner Drehleiter (ID 544)!");
  636.             return 1;
  637.         }
  638.         TogglePlayerControllable(playerid,0);
  639.         new Float:px, Float:py, Float:pz, Float:pa;
  640.         GetPlayerFacingAngle(playerid,pa);
  641.         if(pa >= 0.0 && pa <= 22.5) //n1
  642.         {
  643.             GetPlayerPos(playerid, px, py, pz);
  644.             SetPlayerPosFindZ1(playerid, px, py+5, pz+50);
  645.         }
  646.         if(pa >= 332.5 && pa < 0.0) //n2
  647.         {
  648.             GetPlayerPos(playerid, px, py, pz);
  649.             SetPlayerPosFindZ1(playerid, px, py+5, pz+50);
  650.         }
  651.         if(pa >= 22.5 && pa <= 67.5) //nw
  652.         {
  653.             GetPlayerPos(playerid, px, py, pz);
  654.             SetPlayerPosFindZ1(playerid, px-2.5, py+2.5, pz+50);
  655.         }
  656.         if(pa >= 67.5 && pa <= 112.5) //w
  657.         {
  658.             GetPlayerPos(playerid, px, py, pz);
  659.             SetPlayerPosFindZ1(playerid, px-5, py, pz+50);
  660.         }
  661.         if(pa >= 112.5 && pa <= 157.5) //sw
  662.         {
  663.             GetPlayerPos(playerid, px, py, pz);
  664.             SetPlayerPosFindZ1(playerid, px-2.5, py-2.5, pz+50);
  665.         }
  666.         if(pa >= 157.5 && pa <= 202.5) //s
  667.         {
  668.             GetPlayerPos(playerid, px, py, pz);
  669.             SetPlayerPosFindZ1(playerid, px, py-5, pz+50);
  670.         }
  671.         if(pa >= 202.5 && pa <= 247.5)//se
  672.         {
  673.             GetPlayerPos(playerid, px, py, pz);
  674.             SetPlayerPosFindZ1(playerid, px+2.5, py-2.5, pz+50);
  675.         }
  676.         if(pa >= 247.5 && pa <= 292.5)//e
  677.         {
  678.             GetPlayerPos(playerid, px, py, pz);
  679.             SetPlayerPosFindZ1(playerid, px+5, py, pz+50);
  680.         }
  681.         if(pa >= 292.5 && pa <= 332.5)//e
  682.         {
  683.             GetPlayerPos(playerid, px, py, pz);
  684.             SetPlayerPosFindZ1(playerid, px+2.5, py+2.5, pz+50);
  685.         }
  686.         return 1;
  687.     }
  688.     if(strcmp(cmd,"/strassensperren", true) == 0)
  689.     {
  690.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  691.         {
  692.             if(GetVehicleModel(GetPlayerVehicleID(playerid))==433)
  693.             {
  694.                 SpielerInfo[playerid][strassensperre]=1;
  695.                 SendClientMessage(playerid,Rot,"Du hast dir eine Straßensprre geholt");
  696.             }
  697.         }
  698.         return 1;
  699.     }
  700.     if(strcmp(cmd,"/feuerloescher", true) == 0)
  701.     {
  702.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  703.         {
  704.             if(GetVehicleModel(GetPlayerVehicleID(playerid))==433)
  705.             {
  706.                 GivePlayerWeapon(playerid,42,10000);
  707.                 SendClientMessage(playerid,Rot,"Du hast dir einen Feuerlöscher geholt");
  708.             }
  709.         }
  710.         return 1;
  711.     }
  712.     if(strcmp(cmd,"/saege", true) == 0)
  713.     {
  714.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  715.         {
  716.             if(GetVehicleModel(GetPlayerVehicleID(playerid))==433)
  717.             {
  718.                 GivePlayerWeapon(playerid,9,10000);
  719.                 SendClientMessage(playerid,Rot,"Du hast dir eine Säge geholt");
  720.             }
  721.         }
  722.         return 1;
  723.     }
  724.     if(strcmp(cmd,"/durchsage", true) == 0)
  725.     {
  726.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  727.         {
  728.             if(GetVehicleModel(GetPlayerVehicleID(playerid))==596)
  729.             {
  730.                 if(durchsagej[playerid]==1)
  731.                 {
  732.                     KillTimer(durchsagetimer[playerid]);
  733.                 }
  734.                 else
  735.                 durchsagetimer[playerid]=SetTimerEx("durchsage",10000,true,"i",playerid);
  736.             }
  737.             else
  738.                 SendClientMessage(playerid,Rot,"Du musst in einem PKW sitzen (ID: 506)");
  739.         }
  740.         return 1;
  741.     }
  742.     if(strcmp(cmd,"/durchsage1", true) == 0)
  743.     {
  744.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  745.         {
  746.             if(GetVehicleModel(GetPlayerVehicleID(playerid))==596)
  747.             {
  748.                 if(durchsagej[playerid]==1)
  749.                 {
  750.                     KillTimer(durchsagetimer[playerid]);
  751.                 }
  752.                 else
  753.                 durchsagetimer[playerid]=SetTimerEx("durchsage1",10000,true,"i",playerid);
  754.             }
  755.             else
  756.                 SendClientMessage(playerid,Rot,"Du musst in einem PKW sitzen (ID: 506)");
  757.         }
  758.         return 1;
  759.     }
  760.     if(strcmp(cmd,"/durchsage2", true) == 0)
  761.     {
  762.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  763.         {
  764.             if(GetVehicleModel(GetPlayerVehicleID(playerid))==596)
  765.             {
  766.                 if(durchsagej[playerid]==1)
  767.                 {
  768.                     KillTimer(durchsagetimer[playerid]);
  769.                 }
  770.                 else
  771.                 durchsagetimer[playerid]=SetTimerEx("durchsage2",10000,true,"i",playerid);
  772.             }
  773.             else
  774.                 SendClientMessage(playerid,Rot,"Du musst in einem PKW sitzen (ID: 506)");
  775.         }
  776.         return 1;
  777.     }
  778.     if(strcmp(cmd,"/durchsageende", true) == 0)
  779.     {
  780.         if(SpielerInfo[playerid][Feuerwehrmann]==1)
  781.         {
  782.             if(GetVehicleModel(GetPlayerVehicleID(playerid))==596)
  783.             {
  784.                 if(durchsagej[playerid]==1)
  785.                 {
  786.                     KillTimer(durchsagetimer[playerid]);
  787.                 }
  788.             }
  789.         }
  790.         return 1;
  791.     }
  792.     if(strcmp(cmd, "/SSzurueckgeben", true) == 0)
  793.     {
  794.         if(SpielerInfo[playerid][strassensperre]==1)
  795.         {
  796.             if(GetVehicleModel(GetPlayerVehicleID(playerid))==433)
  797.             {
  798.                 SendClientMessage(playerid,Rot,"Du hast die Strassensperre zurück gelegt!");
  799.                 SpielerInfo[playerid][strassensperre]=0;
  800.             }
  801.         }
  802.         return 1;
  803.     }
  804.     if(strcmp(cmd, "/setzeSS", true) == 0)
  805.     {
  806.         if( SpielerInfo[playerid][strassensperre] == 1)
  807.         {
  808.             AddStrassensperre(playerid);
  809.             SpielerInfo[playerid][strassensperre] = 0;
  810.         }
  811.         else SendClientMessage(playerid,Rot,"Du hast keine Strassensperre!");
  812.         return 1;
  813.     }
  814.     if(strcmp(cmd, "/nehmeSS", true) == 0)
  815.     {
  816.         if(SpielerInfo[playerid][Feuerwehrmann]!=1) return 1;
  817.         if(SpielerInfo[playerid][strassensperre] == 0)
  818.         {
  819.             RemoveStrassensperre(playerid);
  820.             SpielerInfo[playerid][strassensperre]=1;
  821.         }
  822.         else SendClientMessage(playerid,Rot,"Du hast bereits eine Strassensperre, binge sie zuerst zurück!");
  823.         return 1;
  824.     }
  825.     if(strcmp(cmd, "/farbe", true) == 0)
  826.     {
  827.         new string[250];
  828.         if (!IsPlayerAdmin(playerid))
  829.         {
  830.             SendClientMessage(playerid, Rot, "   you are not authorized to use that command!");
  831.             return 1;
  832.         }
  833.         tmp = strtok(cmdtext, idx);
  834.         if(!strlen(tmp))
  835.         {
  836.             SendClientMessage(playerid, Rot, "USAGE: /farbe [1.Farbe] [2.Farbe]");
  837.             return 1;
  838.         }
  839.         new farbe1;
  840.         farbe1 = strval(tmp);
  841.         if(farbe1 < 0 || farbe1 > 126) { SendClientMessage(playerid, Rot, "   Color Number can't be below 0 or above 126 !"); return 1; }
  842.         if(!strlen(tmp))
  843.         {
  844.             SendClientMessage(playerid, Rot, "USAGE: /sveh [carid] [color1] [color2]");
  845.             return 1;
  846.         }
  847.         new farbe2;
  848.         farbe2 = strval(tmp);
  849.         if(farbe1 < 0 || farbe1 > 126) { SendClientMessage(playerid, Rot, "   Color Number can't be below 0 or above 126 !"); return 1; }
  850.         wunschfarbe1[playerid]=farbe1;
  851.         wunschfarbe2[playerid]=farbe2;
  852.         format(string, sizeof(string), "Farbe 1: %i Farbe 2: %i", wunschfarbe1[playerid],wunschfarbe2[playerid]);
  853.         SendClientMessage(playerid, Rot, string);
  854.         return 1;
  855.     }
  856.     if(strcmp(cmd, "/sveh", true) == 0)
  857.     {
  858.         if(IsPlayerConnected(playerid))
  859.         {
  860.             if (!IsPlayerAdmin(playerid))
  861.             {
  862.                 SendClientMessage(playerid, Rot, "   you are not authorized to use that command!");
  863.                 return 1;
  864.             }
  865.             tmp = strtok(cmdtext, idx);
  866.             if(!strlen(tmp))
  867.             {
  868.                 SendClientMessage(playerid, Rot, "USAGE: /sveh [carid] ");
  869.                 return 1;
  870.             }
  871.             new car;
  872.             car = strval(tmp);
  873.             if(car < 400 || car > 611) { SendClientMessage(playerid, Rot, "   Vehicle Number can't be below 400 or above 611 !"); return 1; }
  874.             new Float:X,Float:Y,Float:Z;
  875.             GetPlayerPos(playerid, X,Y,Z);
  876.             new carid = AddStaticVehicleEx(car, X,Y,Z, 0.0, wunschfarbe1[playerid], wunschfarbe2[playerid], -1);
  877.             new string[250];
  878.             format(string, sizeof(string), "   Vehicle %d spawned.", carid);
  879.             SendClientMessage(playerid, Rot, string);
  880.             PutPlayerInVehicle(playerid,carid,0);
  881.         }
  882.         return 1;
  883.     }
  884.     if(strcmp(cmd, "/fupgrade", true) == 0)
  885.     {
  886.         if(SpielerInfo[playerid][feuerwehrrank]==2||IsPlayerAdmin(playerid))
  887.         {
  888.             tmp = strtok(cmdtext, idx);
  889.             if(!strlen(tmp))
  890.             {
  891.                 SendClientMessage(playerid,Rot,"Benutzung: /fupgrade [playerid]");
  892.                 return 1;
  893.             }
  894.             new Spieler;
  895.             Spieler = strval(tmp);
  896.             SpielerInfo[Spieler][feuerwehrrank]=2;
  897.             return 1;
  898.         }
  899.         SendClientMessage(playerid,Rot,"Dein Rank ist zu gering");
  900.         return 1;
  901.     }
  902.     if(strcmp(cmd, "/feuerwehr", true)==0)
  903.     {
  904.         ShowPlayerDialog(playerid, 98, DIALOG_STYLE_LIST, "Wählen sie eine Kategorie", "Brand\nBrand mit Menschenleben in Gefahr\n Technisches Problem\nUnfall\nSonstiges\nSeenot", "Auswahl", "Abbrechen");
  905.         return 1;
  906.     }
  907.     if(strcmp(cmd,"/ueberwachung",true)==0)
  908.     {
  909.         if(SpielerInfo[playerid][feuerwehrrank]!=2)
  910.         {
  911.             SendClientMessage(playerid,Rot,"Dein Rank ist zu gering");
  912.             return 1;
  913.         }
  914.         if(SpielerInfo[playerid][Feuerwehrmann]!=1)
  915.         {
  916.             SendClientMessage(playerid,Rot,"Du bist nicht in der Feuerwehr!");
  917.             return 1;
  918.         }
  919.         new string[250];
  920.         format(string,sizeof(string),"%s: %i Einheiten in Einsatz",Loeschzug[0][Name],Loeschzug[0][Einheiten]);
  921.         LZ1[playerid]= TextDrawCreate(250.0, 425.0, string);
  922.         TextDrawUseBox(LZ1[playerid], 1);
  923.         switch (Loeschzug[0][Status])
  924.         {
  925.             case(1): TextDrawBoxColor(LZ1[playerid], F1);
  926.             case(2): TextDrawBoxColor(LZ1[playerid], F2);
  927.             case(3): TextDrawBoxColor(LZ1[playerid], F3);
  928.             case(4): TextDrawBoxColor(LZ1[playerid], F4);
  929.             case(5): TextDrawBoxColor(LZ1[playerid], F5);
  930.             case(6): TextDrawBoxColor(LZ1[playerid], F6);
  931.             case(7): TextDrawBoxColor(LZ1[playerid], F7);
  932.             case(8): TextDrawBoxColor(LZ1[playerid], F8);
  933.             case(9): TextDrawBoxColor(LZ1[playerid], F9);
  934.             case(0): TextDrawBoxColor(LZ1[playerid], F0);
  935.         }  
  936.         TextDrawShowForPlayer(playerid,LZ1[playerid]);
  937.         format(string,sizeof(string),"%s: %i Einheiten in Einsatz",Loeschzug[1][Name],Loeschzug[1][Einheiten]);
  938.         LZ2[playerid]= TextDrawCreate(250.0, 400.0, string);
  939.         TextDrawUseBox(LZ2[playerid], 1);
  940.         switch (Loeschzug[1][Status])
  941.         {
  942.             case(1): TextDrawBoxColor(LZ2[playerid], F1);
  943.             case(2): TextDrawBoxColor(LZ2[playerid], F2);
  944.             case(3): TextDrawBoxColor(LZ2[playerid], F3);
  945.             case(4): TextDrawBoxColor(LZ2[playerid], F4);
  946.             case(5): TextDrawBoxColor(LZ2[playerid], F5);
  947.             case(6): TextDrawBoxColor(LZ2[playerid], F6);
  948.             case(7): TextDrawBoxColor(LZ2[playerid], F7);
  949.             case(8): TextDrawBoxColor(LZ2[playerid], F8);
  950.             case(9): TextDrawBoxColor(LZ2[playerid], F9);
  951.             case(0): TextDrawBoxColor(LZ2[playerid], F0);
  952.         }  
  953.         TextDrawShowForPlayer(playerid,LZ2[playerid]);
  954.         format(string,sizeof(string),"%s: %i Einheiten in Einsatz",Loeschzug[2][Name],Loeschzug[2][Einheiten]);
  955.         LZ3[playerid]= TextDrawCreate(250.0, 375.0, string);
  956.         TextDrawUseBox(LZ3[playerid], 1);
  957.         switch (Loeschzug[2][Status])
  958.         {
  959.             case(1): TextDrawBoxColor(LZ3[playerid], F1);
  960.             case(2): TextDrawBoxColor(LZ3[playerid], F2);
  961.             case(3): TextDrawBoxColor(LZ3[playerid], F3);
  962.             case(4): TextDrawBoxColor(LZ3[playerid], F4);
  963.             case(5): TextDrawBoxColor(LZ3[playerid], F5);
  964.             case(6): TextDrawBoxColor(LZ3[playerid], F6);
  965.             case(7): TextDrawBoxColor(LZ3[playerid], F7);
  966.             case(8): TextDrawBoxColor(LZ3[playerid], F8);
  967.             case(9): TextDrawBoxColor(LZ3[playerid], F9);
  968.             case(0): TextDrawBoxColor(LZ3[playerid], F0);
  969.         }  
  970.         TextDrawShowForPlayer(playerid,LZ3[playerid]);
  971.         format(string,sizeof(string),"%s: %i Einheiten in Einsatz",Loeschzug[3][Name],Loeschzug[3][Einheiten]);
  972.         LZ4[playerid]= TextDrawCreate(250.0, 350.0, string);
  973.         TextDrawUseBox(LZ4[playerid], 1);
  974.         switch (Loeschzug[3][Status])
  975.         {
  976.             case(1): TextDrawBoxColor(LZ4[playerid], F1);
  977.             case(2): TextDrawBoxColor(LZ4[playerid], F2);
  978.             case(3): TextDrawBoxColor(LZ4[playerid], F3);
  979.             case(4): TextDrawBoxColor(LZ4[playerid], F4);
  980.             case(5): TextDrawBoxColor(LZ4[playerid], F5);
  981.             case(6): TextDrawBoxColor(LZ4[playerid], F6);
  982.             case(7): TextDrawBoxColor(LZ4[playerid], F7);
  983.             case(8): TextDrawBoxColor(LZ4[playerid], F8);
  984.             case(9): TextDrawBoxColor(LZ4[playerid], F9);
  985.             case(0): TextDrawBoxColor(LZ4[playerid], F0);
  986.         }  
  987.         TextDrawShowForPlayer(playerid,LZ4[playerid]);
  988.         format(string,sizeof(string),"%s: %i Einheiten in Einsatz",Loeschzug[4][Name],Loeschzug[4][Einheiten]);
  989.         LZ5[playerid]= TextDrawCreate(250.0, 325.0, string);
  990.         TextDrawUseBox(LZ5[playerid], 1);
  991.         switch (Loeschzug[4][Status])
  992.         {
  993.             case(1): TextDrawBoxColor(LZ5[playerid], F1);
  994.             case(2): TextDrawBoxColor(LZ5[playerid], F2);
  995.             case(3): TextDrawBoxColor(LZ5[playerid], F3);
  996.             case(4): TextDrawBoxColor(LZ5[playerid], F4);
  997.             case(5): TextDrawBoxColor(LZ5[playerid], F5);
  998.             case(6): TextDrawBoxColor(LZ5[playerid], F6);
  999.             case(7): TextDrawBoxColor(LZ5[playerid], F7);
  1000.             case(8): TextDrawBoxColor(LZ5[playerid], F8);
  1001.             case(9): TextDrawBoxColor(LZ5[playerid], F9);
  1002.             case(0): TextDrawBoxColor(LZ5[playerid], F0);
  1003.         }  
  1004.         TextDrawShowForPlayer(playerid,LZ5[playerid]);
  1005.         format(string,sizeof(string),"%s: %i Einheiten in Einsatz",Loeschzug[5][Name],Loeschzug[5][Einheiten]);
  1006.         LZ6[playerid]= TextDrawCreate(250.0, 300.0, string);
  1007.         TextDrawUseBox(LZ6[playerid], 1);
  1008.         switch (Loeschzug[5][Status])
  1009.         {
  1010.             case(1): TextDrawBoxColor(LZ6[playerid], F1);
  1011.             case(2): TextDrawBoxColor(LZ6[playerid], F2);
  1012.             case(3): TextDrawBoxColor(LZ6[playerid], F3);
  1013.             case(4): TextDrawBoxColor(LZ6[playerid], F4);
  1014.             case(5): TextDrawBoxColor(LZ6[playerid], F5);
  1015.             case(6): TextDrawBoxColor(LZ6[playerid], F6);
  1016.             case(7): TextDrawBoxColor(LZ6[playerid], F7);
  1017.             case(8): TextDrawBoxColor(LZ6[playerid], F8);
  1018.             case(9): TextDrawBoxColor(LZ6[playerid], F9);
  1019.             case(0): TextDrawBoxColor(LZ6[playerid], F0);
  1020.         }  
  1021.         TextDrawShowForPlayer(playerid,LZ6[playerid]);
  1022.         LZtimer[playerid]=SetTimerEx("ueberwachenupdate",updatezeit,false,"i",playerid);
  1023.         return 1;
  1024.     }
  1025.     if(strcmp(cmd, "/fradio", true) == 0 || strcmp(cmd, "/fr", true) == 0)
  1026.     {
  1027.             new string[250];
  1028.             new sendername[250];
  1029.             GetPlayerName(playerid, sendername, sizeof(sendername));
  1030.             new length = strlen(cmdtext);
  1031.             while ((idx < length) && (cmdtext[idx] <= ' '))
  1032.             {
  1033.                 idx++;
  1034.             }
  1035.             new offset = idx;
  1036.             new result[64];
  1037.             while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  1038.             {
  1039.                 result[idx - offset] = cmdtext[idx];
  1040.                 idx++;
  1041.             }
  1042.             result[idx - offset] = EOS;
  1043.             if(!strlen(result))
  1044.             {
  1045.                 SendClientMessage(playerid, Rot, "USAGE: (/fr)adio [radio chat]");
  1046.                 return 1;
  1047.             }
  1048.             new rank1[250];
  1049.             if(SpielerInfo[playerid][feuerwehrrank]==2)
  1050.             {
  1051.                 format(rank1,sizeof(rank1),"Einsatzleiter ");
  1052.             }
  1053.             format(string, sizeof(string), "%s %s: %s, over. **",rank1, sendername, result);
  1054.             FRadio(Rot , string);
  1055.             return 1;
  1056.     }
  1057.     if(strcmp(cmd,"/ueberwachungende", true)==0)
  1058.     {
  1059.         TextDrawHideForPlayer(playerid,LZ1[playerid]);
  1060.         TextDrawHideForPlayer(playerid,LZ2[playerid]);
  1061.         TextDrawHideForPlayer(playerid,LZ3[playerid]);
  1062.         TextDrawHideForPlayer(playerid,LZ4[playerid]);
  1063.         TextDrawHideForPlayer(playerid,LZ5[playerid]);
  1064.         TextDrawHideForPlayer(playerid,LZ6[playerid]);
  1065.         TextDrawDestroy(LZ1[playerid]);
  1066.         TextDrawDestroy(LZ2[playerid]);
  1067.         TextDrawDestroy(LZ3[playerid]);
  1068.         TextDrawDestroy(LZ4[playerid]);
  1069.         TextDrawDestroy(LZ5[playerid]);
  1070.         TextDrawDestroy(LZ6[playerid]);
  1071.         KillTimer(LZtimer[playerid]);
  1072.         return 1;
  1073.     }
  1074.     if(strcmp(cmd, "/fhelp", true) == 0)
  1075.     {
  1076.         SendClientMessage(playerid,Rot,"Feuerwehr Hilfe:");
  1077.         SendClientMessage(playerid,Rot,"/funk /strassensperre /setzeSS /nehmeSS /SSzuruekgeben \n /feuerloescher /fradio /saege");
  1078.         SendClientMessage(playerid,Rot,"/durchsage /durchsage1 /durchsage2 /durchsageende /drehleiter");
  1079.         SendClientMessage(playerid,Rot,"/fupgrade /ueberwachung /ueberwachungende");
  1080.         SendClientMessage(playerid,Rot,"/verbaendeholen /heilen");
  1081.         return 1;
  1082.     }
  1083.     return 0;
  1084. }
  1085.  
  1086. public ueberwachenupdate(playerid)
  1087. {
  1088.     new string[250];
  1089.     TextDrawHideForPlayer(playerid,LZ1[playerid]);
  1090.     TextDrawHideForPlayer(playerid,LZ2[playerid]);
  1091.     TextDrawHideForPlayer(playerid,LZ3[playerid]);
  1092.     TextDrawHideForPlayer(playerid,LZ4[playerid]);
  1093.     TextDrawHideForPlayer(playerid,LZ5[playerid]);
  1094.     TextDrawHideForPlayer(playerid,LZ6[playerid]);
  1095.     TextDrawDestroy(LZ1[playerid]);
  1096.     TextDrawDestroy(LZ2[playerid]);
  1097.     TextDrawDestroy(LZ3[playerid]);
  1098.     TextDrawDestroy(LZ4[playerid]);
  1099.     TextDrawDestroy(LZ5[playerid]);
  1100.     TextDrawDestroy(LZ6[playerid]);
  1101.     format(string,sizeof(string),"%s: %i Einheiten in Einsatz",Loeschzug[0][Name],Loeschzug[0][Einheiten]);
  1102.     LZ1[playerid]= TextDrawCreate(250.0, 425.0, string);
  1103.     TextDrawUseBox(LZ1[playerid], 1);
  1104.     switch (Loeschzug[0][Status])
  1105.     {
  1106.         case(1): TextDrawBoxColor(LZ1[playerid], F1);
  1107.         case(2): TextDrawBoxColor(LZ1[playerid], F2);
  1108.         case(3): TextDrawBoxColor(LZ1[playerid], F3);
  1109.         case(4): TextDrawBoxColor(LZ1[playerid], F4);
  1110.         case(5): TextDrawBoxColor(LZ1[playerid], F5);
  1111.         case(6): TextDrawBoxColor(LZ1[playerid], F6);
  1112.         case(7): TextDrawBoxColor(LZ1[playerid], F7);
  1113.         case(8): TextDrawBoxColor(LZ1[playerid], F8);
  1114.         case(9): TextDrawBoxColor(LZ1[playerid], F9);
  1115.         case(0): TextDrawBoxColor(LZ1[playerid], F0);
  1116.     }  
  1117.     TextDrawShowForPlayer(playerid,LZ1[playerid]);
  1118.     format(string,sizeof(string),"%s: %i Einheiten in Einsatz",Loeschzug[1][Name],Loeschzug[1][Einheiten]);
  1119.     LZ2[playerid]= TextDrawCreate(250.0, 400.0, string);
  1120.     TextDrawUseBox(LZ2[playerid], 1);
  1121.     switch (Loeschzug[1][Status])
  1122.     {
  1123.         case(1): TextDrawBoxColor(LZ2[playerid], F1);
  1124.         case(2): TextDrawBoxColor(LZ2[playerid], F2);
  1125.         case(3): TextDrawBoxColor(LZ2[playerid], F3);
  1126.         case(4): TextDrawBoxColor(LZ2[playerid], F4);
  1127.         case(5): TextDrawBoxColor(LZ2[playerid], F5);
  1128.         case(6): TextDrawBoxColor(LZ2[playerid], F6);
  1129.         case(7): TextDrawBoxColor(LZ2[playerid], F7);
  1130.         case(8): TextDrawBoxColor(LZ2[playerid], F8);
  1131.         case(9): TextDrawBoxColor(LZ2[playerid], F9);
  1132.         case(0): TextDrawBoxColor(LZ2[playerid], F0);
  1133.     }  
  1134.     TextDrawShowForPlayer(playerid,LZ2[playerid]);
  1135.     format(string,sizeof(string),"%s: %i Einheiten in Einsatz",Loeschzug[2][Name],Loeschzug[2][Einheiten]);
  1136.     LZ3[playerid]= TextDrawCreate(250.0, 375.0, string);
  1137.     TextDrawUseBox(LZ3[playerid], 1);
  1138.     switch (Loeschzug[2][Status])
  1139.     {
  1140.         case(1): TextDrawBoxColor(LZ3[playerid], F1);
  1141.         case(2): TextDrawBoxColor(LZ3[playerid], F2);
  1142.         case(3): TextDrawBoxColor(LZ3[playerid], F3);
  1143.         case(4): TextDrawBoxColor(LZ3[playerid], F4);
  1144.         case(5): TextDrawBoxColor(LZ3[playerid], F5);
  1145.         case(6): TextDrawBoxColor(LZ3[playerid], F6);
  1146.         case(7): TextDrawBoxColor(LZ3[playerid], F7);
  1147.         case(8): TextDrawBoxColor(LZ3[playerid], F8);
  1148.         case(9): TextDrawBoxColor(LZ3[playerid], F9);
  1149.         case(0): TextDrawBoxColor(LZ3[playerid], F0);
  1150.     }  
  1151.     TextDrawShowForPlayer(playerid,LZ3[playerid]);
  1152.     format(string,sizeof(string),"%s: %i Einheiten in Einsatz",Loeschzug[3][Name],Loeschzug[3][Einheiten]);
  1153.     LZ4[playerid]= TextDrawCreate(250.0, 350.0, string);
  1154.     TextDrawUseBox(LZ4[playerid], 1);
  1155.     switch (Loeschzug[3][Status])
  1156.     {
  1157.         case(1): TextDrawBoxColor(LZ4[playerid], F1);
  1158.         case(2): TextDrawBoxColor(LZ4[playerid], F2);
  1159.         case(3): TextDrawBoxColor(LZ4[playerid], F3);
  1160.         case(4): TextDrawBoxColor(LZ4[playerid], F4);
  1161.         case(5): TextDrawBoxColor(LZ4[playerid], F5);
  1162.         case(6): TextDrawBoxColor(LZ4[playerid], F6);
  1163.         case(7): TextDrawBoxColor(LZ4[playerid], F7);
  1164.         case(8): TextDrawBoxColor(LZ4[playerid], F8);
  1165.         case(9): TextDrawBoxColor(LZ4[playerid], F9);
  1166.         case(0): TextDrawBoxColor(LZ4[playerid], F0);
  1167.     }  
  1168.     TextDrawShowForPlayer(playerid,LZ4[playerid]);
  1169.     format(string,sizeof(string),"%s: %i Einheiten in Einsatz",Loeschzug[4][Name],Loeschzug[4][Einheiten]);
  1170.     LZ5[playerid]= TextDrawCreate(250.0, 325.0, string);
  1171.     TextDrawUseBox(LZ5[playerid], 1);
  1172.     switch (Loeschzug[4][Status])
  1173.     {
  1174.         case(1): TextDrawBoxColor(LZ5[playerid], F1);
  1175.         case(2): TextDrawBoxColor(LZ5[playerid], F2);
  1176.         case(3): TextDrawBoxColor(LZ5[playerid], F3);
  1177.         case(4): TextDrawBoxColor(LZ5[playerid], F4);
  1178.         case(5): TextDrawBoxColor(LZ5[playerid], F5);
  1179.         case(6): TextDrawBoxColor(LZ5[playerid], F6);
  1180.         case(7): TextDrawBoxColor(LZ5[playerid], F7);
  1181.         case(8): TextDrawBoxColor(LZ5[playerid], F8);
  1182.         case(9): TextDrawBoxColor(LZ5[playerid], F9);
  1183.         case(0): TextDrawBoxColor(LZ5[playerid], F0);
  1184.     }  
  1185.     TextDrawShowForPlayer(playerid,LZ5[playerid]);
  1186.     format(string,sizeof(string),"%s: %i Einheiten in Einsatz",Loeschzug[5][Name],Loeschzug[5][Einheiten]);
  1187.     LZ6[playerid]= TextDrawCreate(250.0, 300.0, string);
  1188.     TextDrawUseBox(LZ6[playerid], 1);
  1189.     switch (Loeschzug[5][Status])
  1190.     {
  1191.         case(1): TextDrawBoxColor(LZ6[playerid], F1);
  1192.         case(2): TextDrawBoxColor(LZ6[playerid], F2);
  1193.         case(3): TextDrawBoxColor(LZ6[playerid], F3);
  1194.         case(4): TextDrawBoxColor(LZ6[playerid], F4);
  1195.         case(5): TextDrawBoxColor(LZ6[playerid], F5);
  1196.         case(6): TextDrawBoxColor(LZ6[playerid], F6);
  1197.         case(7): TextDrawBoxColor(LZ6[playerid], F7);
  1198.         case(8): TextDrawBoxColor(LZ6[playerid], F8);
  1199.         case(9): TextDrawBoxColor(LZ6[playerid], F9);
  1200.         case(0): TextDrawBoxColor(LZ6[playerid], F0);
  1201.     }  
  1202.     TextDrawShowForPlayer(playerid,LZ6[playerid]);
  1203.     LZtimer[playerid]=SetTimerEx("ueberwachenupdate",updatezeit,false,"i",playerid);
  1204. }
  1205.  
  1206.  
  1207. public OnPlayerExitVehicle(playerid, vehicleid)
  1208. {
  1209.     if(GetVehicleModel(vehicleid)==596)
  1210.     {
  1211.         if(durchsagej[playerid]==1)
  1212.         {
  1213.             KillTimer(durchsagetimer[playerid]);
  1214.         }
  1215.     }
  1216.     return 1;
  1217. }
  1218.  
  1219.  
  1220. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1221. {
  1222.     if(dialogid==98)
  1223.     {
  1224.         if(response==0)
  1225.         {
  1226.             SendClientMessage(playerid,Rot,"Du hast das Menu geschlossen!");
  1227.             return 1;
  1228.         }
  1229.         if(response==1)
  1230.         {
  1231.             if(listitem == 0)
  1232.             {
  1233.                 SendClientMessage(playerid,Rot,"Die Feuerwehr ist auf dem Weg, behalten sie dei Ruhe!");
  1234.                 new Float:x, Float:y, Float:z;
  1235.                 GetPlayerPos(playerid,x,y,z);
  1236.                 rufen(1,x,y,z,1);
  1237.             }
  1238.             if(listitem == 1)
  1239.             {
  1240.                 SendClientMessage(playerid,Rot,"Die Feuerwehr ist auf dem Weg, behalten sie dei Ruhe!");
  1241.                 new Float:x, Float:y, Float:z;
  1242.                 GetPlayerPos(playerid,x,y,z);
  1243.                 rufen(1,x,y,z,2);
  1244.             }
  1245.             if(listitem == 2)
  1246.             {
  1247.                 SendClientMessage(playerid,Rot,"Die Feuerwehr ist auf dem Weg, behalten sie dei Ruhe!");
  1248.                 new Float:x, Float:y, Float:z;
  1249.                 GetPlayerPos(playerid,x,y,z);
  1250.                 rufen(1,x,y,z,3);
  1251.             }
  1252.             if(listitem == 3)
  1253.             {
  1254.                 SendClientMessage(playerid,Rot,"Die Feuerwehr ist auf dem Weg, behalten sie dei Ruhe!");
  1255.                 new Float:x, Float:y, Float:z;
  1256.                 GetPlayerPos(playerid,x,y,z);
  1257.                 rufen(2,x,y,z,3);
  1258.                 rufen(1,x,y,z,2);
  1259.             }
  1260.             if(listitem == 4)
  1261.             {
  1262.                 SendClientMessage(playerid,Rot,"Die Feuerwehr ist auf dem Weg, behalten sie dei Ruhe!");
  1263.                 new Float:x, Float:y, Float:z;
  1264.                 GetPlayerPos(playerid,x,y,z);
  1265.                 rufen(1,x,y,z,2);
  1266.             }
  1267.             if(listitem == 5)
  1268.             {
  1269.                 SendClientMessage(playerid,Rot,"Die DLRG ist auf dem Weg, machen sie sich sichtbar!");
  1270.                 new Float:x, Float:y, Float:z;
  1271.                 GetPlayerPos(playerid,x,y,z);
  1272.                 rufen(5,x,y,z,2);
  1273.             }
  1274.         }
  1275.     }
  1276.     if(dialogid==99)
  1277.     {
  1278.         if(response==0)
  1279.         {
  1280.             SendClientMessage(playerid,Rot,"Du hast das Menu geschlossen!");
  1281.             return 1;
  1282.         }
  1283.         if(response==1)
  1284.         {
  1285.             if(listitem == 0)
  1286.             {
  1287.                 new string[250];
  1288.                 format(string,sizeof(string),"%s: Status 5: Sprechwunsch: Nachallarmierung Feuerwehr",Loeschzug[SpielerInfo[playerid][feuerwehrscore]][Name]);
  1289.                 FRadio(Rot,string);
  1290.                 new Float:x,Float:y,Float:z;
  1291.                 GetPlayerPos(playerid,x,y,z);
  1292.                 rufen(1,x,y,z,5);
  1293.             }
  1294.             if(listitem == 1)
  1295.             {
  1296.                 new string[250];
  1297.                 format(string,sizeof(string),"%s: Status 5: Sprechwunsch: Nachallarmierung DLRG",Loeschzug[SpielerInfo[playerid][feuerwehrscore]][Name]);
  1298.                 FRadio(Rot,string);
  1299.                 new Float:x,Float:y,Float:z;
  1300.                 GetPlayerPos(playerid,x,y,z);
  1301.                 rufen(5,x,y,z,3);
  1302.             }
  1303.             if(listitem == 2)
  1304.             {
  1305.                 new string[250];
  1306.                 format(string,sizeof(string),"%s: Status 5: Sprechwunsch: Nachallarmierung DRK LS",Loeschzug[SpielerInfo[playerid][feuerwehrscore]][Name]);
  1307.                 FRadio(Rot,string);
  1308.                 new Float:x,Float:y,Float:z;
  1309.                 GetPlayerPos(playerid,x,y,z);
  1310.                 rufen(4,x,y,z,2);
  1311.                 FRadio(Rot,"Große Anzahl an verletzten!!");
  1312.             }
  1313.             if(listitem == 3)
  1314.             {
  1315.                 new string[250];
  1316.                 format(string,sizeof(string),"%s: Status 5: Sprechwunsch: Nachallarmierung Hubschrauber",Loeschzug[SpielerInfo[playerid][feuerwehrscore]][Name]);
  1317.                 FRadio(Rot,string);
  1318.             }
  1319.             if(listitem == 4)
  1320.             {
  1321.                 new string[250];
  1322.                 format(string,sizeof(string),"%s: Status 5: Sprechwunsch: Nachallarmierung Straßensicherung",Loeschzug[SpielerInfo[playerid][feuerwehrscore]][Name]);
  1323.                 FRadio(Rot,string);
  1324.                 new Float:x,Float:y,Float:z;
  1325.                 GetPlayerPos(playerid,x,y,z);
  1326.                 rufen(1,x,y,z,3);
  1327.             }
  1328.             if(listitem == 5)
  1329.             {
  1330.                 new string[250];
  1331.                 format(string,sizeof(string),"%s: Status 5: Sprechwunsch: Nachallarmierung Löschzug",Loeschzug[SpielerInfo[playerid][feuerwehrscore]][Name]);
  1332.                 FRadio(Rot,string);
  1333.                 new Float:x,Float:y,Float:z;
  1334.                 GetPlayerPos(playerid,x,y,z);
  1335.                 rufen(1,x,y,z,5);
  1336.             }
  1337.         }
  1338.     }
  1339.     return 0;
  1340. }
  1341.  
  1342. forward SetPlayerPosFindZ2(playerid, Float:x, Float:y, Float:z);
  1343.  
  1344. public SetPlayerPosFindZ1(playerid, Float:x, Float:y, Float:z)
  1345. {
  1346.     SendClientMessage(playerid,Rot,"Du fährst mit der Drehleiter (10 sek.)");
  1347.     SetTimerEx("SetPlayerPosFindZ2",10000,false,"ifff",playerid,x,y,z);
  1348.     return 1;
  1349. }
  1350.  
  1351. public SetPlayerPosFindZ2(playerid,Float:x,Float:y,Float:z)
  1352. {
  1353.     SetPlayerPosFindZ(playerid,x,y,z);
  1354.     TogglePlayerControllable(playerid,1);
  1355.     return 1;
  1356. }
  1357.  
  1358. public rufen(lz,Float:x,Float:y,Float:z,art)
  1359. {
  1360.     if(Loeschzug[lz-1][Status]==1 || Loeschzug[lz-1][Status]==2)
  1361.     {
  1362.         new string[250];
  1363.         if(art==1)
  1364.         {
  1365.             format(string,sizeof(string),"Einsatz zur Brandbekämpfung!");
  1366.         }
  1367.         if(art==2)
  1368.         {
  1369.             format(string,sizeof(string),"Einsatz zur Brandbekämpfung, Menschenleben in Gefahr!");
  1370.         }
  1371.         if(art==3)
  1372.         {
  1373.             format(string,sizeof(string),"Einsatz zur Technischenhilfeleisungen");
  1374.         }
  1375.         if(art==4)
  1376.         {
  1377.             format(string,sizeof(string),"Einsatz als Reservertruppe, bitte Rufbereitschaft herstellen!");
  1378.         }
  1379.         if(art==5)
  1380.         {
  1381.             format(string,sizeof(string),"Hiflleistungen zur Brandbekämpfung");
  1382.         }
  1383.         if(art==6)
  1384.         {
  1385.             format(string,sizeof(string),"KTS Arlam, bitte alle Wachen besetzen und Rufbereitschaft herstellen!!");
  1386.         }
  1387.         new string1[250];
  1388.         format(string1,sizeof(string1),"Einsatz für %s",Loeschzug[lz][Name]);
  1389.         FRadio(Rot,string1);
  1390.         FRadio(Rot,string);
  1391.         for(new i = -1; i<MAX_PLAYERS;i++)
  1392.         {
  1393.             if(IsPlayerConnected(i))
  1394.             {
  1395.                 if(SpielerInfo[i][feuerwehrscore] == lz)
  1396.                 {
  1397.                     SetPlayerMapIcon(i,EinsatzC[i],x,y,z,0,Rot,MAPICON_GLOBAL_CHECKPOINT);
  1398.                 }
  1399.             }
  1400.         }
  1401.     }
  1402.     else
  1403.     {
  1404.         rufen(lz+1,x,y,z,art);
  1405.     }
  1406.     return 1;
  1407. }
  1408.  
  1409. stock FRadio(Farbe,string[])
  1410. {
  1411.     for(new i = -1; i<MAX_PLAYERS;i++)
  1412.     {
  1413.         if(IsPlayerConnected(i))
  1414.         {
  1415.             if(SpielerInfo[i][feuerwehrmann] == 1)
  1416.             {
  1417.                 SendClientMessage(i, Farbe, string);
  1418.             }
  1419.         }
  1420.     }
  1421.     return 1;
  1422. }
  1423.  
  1424. public Feuererzeugen()
  1425. {
  1426.     new Zufall;
  1427.     Zufall = random(FeuerPositionen);
  1428.     AddFire(FeuerSpawns[Zufall][0],FeuerSpawns[Zufall][1],FeuerSpawns[Zufall][2],1000);
  1429.     EinsatzInfo[OrtX]=FeuerSpawns[Zufall][0];
  1430.     EinsatzInfo[OrtY]=FeuerSpawns[Zufall][1];
  1431.     EinsatzInfo[OrtZ]=FeuerSpawns[Zufall][2];
  1432.     EinsatzInfo[Verfuegbar]=1;
  1433.     rufen(0,FeuerSpawns[Zufall][0],FeuerSpawns[Zufall][1],FeuerSpawns[Zufall][2],1);
  1434.     return 1;
  1435. }
  1436.  
  1437. public durchsage(playerid)
  1438. {
  1439.     new Float:x,Float:y,Float:z;
  1440.     GetPlayerPos(playerid,x,y,z);
  1441.     for(new i = 0; i<MAX_PLAYERS; i++)
  1442.     {
  1443.         if(IsPlayerInRangeOfPoint(i,50.0,x,y,z))
  1444.         {
  1445.             SendClientMessage(i,Rot,"Hier spricht die Feuerwehr:\nBitte schließen sie Türen und Fenster!\nBegeben sie sich nicht ins Frei!");
  1446.         }
  1447.     }
  1448.     return 1;
  1449. }
  1450.  
  1451. public durchsage1(playerid)
  1452. {
  1453.     new Float:x,Float:y,Float:z;
  1454.     GetPlayerPos(playerid,x,y,z);
  1455.     for(new i = 0; i<MAX_PLAYERS; i++)
  1456.     {
  1457.         if(IsPlayerInRangeOfPoint(i,50.0,x,y,z))
  1458.         {
  1459.             SendClientMessage(i,Rot,"Hier spricht die Feuerwehr!\nBitte verlassen sie dieses Viertel ruhig und geordnet!");
  1460.         }
  1461.     }
  1462.     return 1;
  1463. }
  1464.  
  1465. public durchsage2(playerid)
  1466. {
  1467.     new Float:x,Float:y,Float:z;
  1468.     GetPlayerPos(playerid,x,y,z);
  1469.     for(new i = 0; i<MAX_PLAYERS; i++)
  1470.     {
  1471.         if(IsPlayerInRangeOfPoint(i,50.0,x,y,z))
  1472.         {
  1473.             SendClientMessage(i,Rot,"Hier spricht die Feuerwehr!\nBitte machen sie Platz für die Feuerwehr!!");
  1474.         }
  1475.     }
  1476.     return 1;
  1477. }
  1478.  
  1479.  
  1480. stock SpielerName(playerid)
  1481. {
  1482. new name[MAX_PLAYER_NAME];
  1483. GetPlayerName(playerid,name,sizeof(name));
  1484. return name;
  1485. }
  1486.  
  1487. strtok(const string[], &index)
  1488. {
  1489.     new length = strlen(string);
  1490.     while ((index < length) && (string[index] <= ' '))
  1491.     {
  1492.         index++;
  1493.     }
  1494.  
  1495.     new offset = index;
  1496.     new result[20];
  1497.     while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  1498.     {
  1499.         result[index - offset] = string[index];
  1500.         index++;
  1501.     }
  1502.     result[index - offset] = EOS;
  1503.     return result;
  1504. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement