Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2011
435
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 67.00 KB | None | 0 0
  1. //==============================================//
  2. //Dieses Script ist von Mirko97 erstellt wurden//
  3. //Rechte um das Script zu verändern hat: Jeder//
  4. //===========================================//
  5.  
  6.  
  7.  
  8.  
  9. #include <a_samp>
  10. #include <dini>
  11. #include <ocmd>
  12. #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
  13. #pragma tabsize 0
  14. #pragma unused strtok
  15. #pragma unused sscanf
  16.  
  17.  
  18. forward Servernachricht();
  19. forward Wetter();
  20. forward SetWetter();
  21. forward ClearChatbox(playerid, lines);
  22. forward PolizeiFahrzeug(vehicleid);
  23.  
  24. //==== Wetter ==== //
  25.  
  26. new Weather[3];
  27. new WetterRandomLS[] = { 1,2,3,15 };
  28. new WetterRandomSF[] = { 1,5,6,16 };
  29. new WetterRandomLV[] = { 1,2,3,4,5,18 };
  30.  
  31. //=================//
  32.  
  33. //==== TUT =======//
  34.  
  35. //new Menu:Geschlecht;
  36. //new TutTime[MAX_PLAYERS];
  37. #define DIALOG_SEX 12
  38. #define DIALOG_TUT 13
  39.  
  40. //===============//
  41.  
  42.  
  43. //======= LOCAL ======= //
  44.  
  45.  
  46. new realchat = 1;
  47.  
  48. //============//
  49.  
  50. //======Fraktionen=======//
  51.  
  52. #define MAX_FRACS 2
  53. new Fracs[MAX_FRACS][20] = {
  54. "1",//LSPD
  55. "0"//Zivilist
  56. };
  57.  
  58. //=======FRAK CARS ==========//
  59.  
  60. new PolizeiFahrzeuge[18];
  61.  
  62. //====================//
  63.  
  64.  
  65. //==========STATS==========//
  66.  
  67. #define DIALOG_STATS 11
  68.  
  69. //=========================//
  70.  
  71. //==============Krankenhaus-System==========//
  72.  
  73. new TotenKopf[MAX_PLAYERS];
  74. new pIstTot[MAX_PLAYERS];
  75. forward TOTTimer();
  76.  
  77. //========================================//
  78.  
  79. //===========FRAKTIONEN===========//
  80.  
  81. //new lspd;
  82. //new zivi;
  83.  
  84. //==============================//
  85.  
  86. //==============PICKUPS================//
  87.  
  88. //sh
  89. new shenter;
  90. new shexit;
  91. //lspd
  92. //new lspdenter;
  93.  
  94.  
  95. //bsn
  96. //new bsnenter;
  97.  
  98. //zip
  99. new zipenter;
  100. new zipexit;
  101. new zipwechsel;
  102.  
  103.  
  104. //Farb Defines
  105.  
  106. #define COLOR_RED 0xFF0000FF
  107. #define COLOR_YELLOW 0xEBFF00FF
  108. #define COLOR_WHITE 0xFEFEFEFF
  109. #define COLOR_GREEN 0x00FF14FF
  110. #define COLOR_DGREEN 0x006300FF
  111. #define COLOR_DRED 0x4B0000FF
  112. #define COLOR_FADE1 0xE6E6E6E6
  113. #define COLOR_FADE2 0xC8C8C8C8
  114. #define COLOR_FADE3 0xAAAAAAAA
  115. #define COLOR_FADE4 0x8C8C8C8C
  116. #define COLOR_FADE5 0x6E6E6E6E
  117. #define COLOR_GREY 0xAAAAAAAA
  118. #define COLOR_BLUE 0x0037FFFF
  119. #define COLOR_GRAD1 0xB4B5B7FF
  120. #define COLOR_GRAD2 0xBFC0C2FF
  121. #define COLOR_GRAD3 0xCBCCCEFF
  122. #define COLOR_GRAD4 0xD8D8D8FF
  123. #define COLOR_GRAD5 0xE3E3E3FF
  124. #define COLOR_GRAD6 0xF0F0F0FF
  125.  
  126.  
  127. //Kleidungswechsel
  128.  
  129. #define DIALOG_KWECHSEL 10
  130.  
  131. //Register/Login
  132.  
  133. enum spieler_daten
  134. {
  135. Admin,
  136. Level,
  137. wanted,
  138. skin,
  139. eingeloggt,
  140. paydaytime,
  141. Geld,
  142. Geschlecht,
  143. Fraktion
  144. }
  145. new Spieler[MAX_PLAYERS][spieler_daten];
  146.  
  147. #define DIALOG_LOGIN 2
  148. #define DIALOG_REG 3
  149.  
  150.  
  151.  
  152. //========Krankenhaus-System=======//
  153. enum pInfo
  154.     {
  155.     pTot,
  156.     Float:pTx,
  157.     Float:pTy,
  158.     Float:pTz
  159.     }
  160.     new PlayerInfo[MAX_PLAYERS][pInfo];
  161.    
  162. //===================================//
  163.    
  164.    
  165.    
  166. //Navi
  167.  
  168. #define navimenu 1
  169. #define guidemenu 9
  170.  
  171. main()
  172. {
  173.     print(" ");
  174.     print(" ");
  175.     print(" ");
  176.     print(" ");
  177.     print(" ");
  178.     print(" ");
  179.     print(" ");
  180.     print(" ");
  181.     print(" ");
  182.     print(" ");
  183.     print(" ");
  184.     print(" ");
  185.     print(" ");
  186.     print(" ");
  187.     print(" ");
  188.     print(" ");
  189.     print(" ");
  190.     print(" ");
  191.     print(" ");
  192.     print(" ");
  193.     print(" ");
  194.     print("|-------------------------------------------|");
  195.     print("Dies ist eine Gamemode von Mirko97.");
  196.     print("Die Gamemode ist in der Testphase, und wird noch sehr stark erweitert!");
  197.     print("ToDo List:");
  198.     print("Arbeits-System: [ ] | Fraktionen: [ ] | Anfangs-Tutorial: [ ] | Register/Login System: [X] ... mehr kommt noch");
  199.     print("|-------------------------------------------|");
  200. }
  201.  
  202.  
  203.  
  204. public OnGameModeInit()
  205. {
  206.  
  207.     AddPlayerClass(73,1475.3842,-1764.7043,18.7958,1.5667,0,0,0,0,0,0); // SHSpawn
  208.  
  209.  
  210.     //==============Krankenhaus-System==========//
  211.     SetTimer("TOTTimer",20000,1);
  212.    
  213.    
  214.     //===========MAPICONS=========//
  215.    
  216.  
  217.     //============CARS===============//
  218.    
  219.     PolizeiFahrzeuge[0] = AddStaticVehicleEx(497,1563.1877,-1697.8016,28.5718,89.7662,0,1,-1); // LSPD Heli
  220.     PolizeiFahrzeuge[1] = AddStaticVehicleEx(601,1545.0868,-1662.9243,5.6105,89.5806,1,103,-1); // LSPD SWAT
  221.     PolizeiFahrzeuge[2] = AddStaticVehicleEx(601,1545.8368,-1667.6920,5.6120,269.7399,1,103,-1); // LSPD SWAT
  222.     PolizeiFahrzeuge[3] = AddStaticVehicleEx(599,1545.5760,-1659.0538,6.0788,90.0653,1,103,-1); // LSPD Ranger
  223.     PolizeiFahrzeuge[4] = AddStaticVehicleEx(427,1526.6105,-1645.4796,6.0225,180.2911,1,103,-1); // LSPD SWAT Wagen
  224.     PolizeiFahrzeuge[5] = AddStaticVehicleEx(427,1534.9927,-1645.2112,6.0225,181.8307,1,103,-1); // LSPD SWAT Wagen
  225.     PolizeiFahrzeuge[6] = AddStaticVehicleEx(596,1545.8925,-1672.0631,5.6115,266.9928,1,103,-1); // LSPD Streife
  226.     PolizeiFahrzeuge[7] = AddStaticVehicleEx(596,1545.2498,-1676.2194,5.6110,90.5304,1,103,-1); // LSPD Streife
  227.     PolizeiFahrzeuge[8] = AddStaticVehicleEx(596,1545.1753,-1680.1086,5.6116,91.4516,1,103,-1); // LSPD Streife
  228.     PolizeiFahrzeuge[9] = AddStaticVehicleEx(596,1528.5360,-1687.9996,5.6106,270.1189,1,103,-1); // LSPD Streife
  229.     PolizeiFahrzeuge[10] = AddStaticVehicleEx(596,1528.6757,-1683.8376,5.6118,271.0575,1,103,-1); // LSPD Streife
  230.     PolizeiFahrzeuge[11] = AddStaticVehicleEx(596,1570.2203,-1710.5056,5.6112,179.9747,1,103,-1); // LSPD Streife
  231.     PolizeiFahrzeuge[12] = AddStaticVehicleEx(596,1574.4706,-1710.4862,5.6115,179.8576,1,103,-1); // LSPD Streife
  232.     PolizeiFahrzeuge[13] = AddStaticVehicleEx(596,1578.3740,-1710.6976,5.6117,178.8336,1,103,-1); // LSPD Streife
  233.     PolizeiFahrzeuge[14] = AddStaticVehicleEx(523,1583.5641,-1710.7074,5.4607,357.5177,1,1,-1); // LSPD Bike
  234.     PolizeiFahrzeuge[15] = AddStaticVehicleEx(523,1587.5754,-1710.7006,5.4565,0.0413,1,1,-1); // LSPD Bike
  235.     PolizeiFahrzeuge[16] = AddStaticVehicleEx(523,1591.6624,-1710.6603,5.4599,0.1885,1,1,-1); // LSPD Bike
  236.     PolizeiFahrzeuge[17] = AddStaticVehicleEx(523,1595.5022,-1710.6985,5.4607,359.9748,1,1,-1); // LSPD Bike
  237.  
  238.    
  239.     //====================================//
  240.    
  241.    
  242.     //======== Wetter ========================//
  243.    
  244.     Wetter();
  245.    
  246.     SetTimer("Wetter",900000, 1);
  247.     SetTimer("SetWetter",1000, 1);
  248.    
  249.     //=========================================//
  250.  
  251.     //==========ZIP===========================//
  252.    
  253.    
  254.     //======================================//
  255.  
  256.  
  257.  
  258.     //==================PICKUPS=============//
  259.    
  260.     shenter= CreatePickup(1239,1,1481.1086,-1770.7427,18.7958);//sh
  261.     shexit= CreatePickup(1239,1,390.2787,173.8044,1008.3828);//sh
  262.     zipenter= CreatePickup(1559,1,1457.1194,-1138.5354,24.0019);//zip
  263.     zipexit= CreatePickup(1559,1,161.3015,-97.0596,1001.8047);//zip
  264.     zipwechsel= CreatePickup(1275,1,161.3723,-83.4066,1001.8047);//zip
  265.     CreatePickup(1239,1,1475.6575,-1763.6359,18.7958); //Guide Menu
  266.  
  267.    
  268.     //================3D-Textlabels==============//
  269.    
  270.     Create3DTextLabel("Touristen Guide\n /guide",COLOR_RED,1475.6575,-1763.6359,18.7958,10,0);
  271.  
  272.    
  273.    
  274.     //Objekte//
  275.    
  276.    
  277.     //Stadthalle//
  278. /*CreateObject(1649,1492.19030762,-1751.24121094,16.11105537,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (1)
  279. CreateObject(1649,1492.18957520,-1751.26916504,19.36106682,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (5)
  280. CreateObject(1649,1492.18884277,-1751.26977539,22.61106682,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (6)
  281. CreateObject(1649,1492.16381836,-1751.26904297,25.86106682,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (7)
  282. CreateObject(1649,1486.64392090,-1751.25500488,16.11105537,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (8)
  283. CreateObject(1649,1486.64294434,-1751.27990723,19.33606720,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (9)
  284. CreateObject(1649,1486.64965820,-1751.26464844,22.63606644,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (10)
  285. CreateObject(1649,1486.60009766,-1751.27124023,25.61106682,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (11)
  286. CreateObject(1649,1470.20190430,-1751.31921387,16.08605576,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (12)
  287. CreateObject(1649,1470.20324707,-1751.34326172,19.31104851,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (14)
  288. CreateObject(1649,1470.20312500,-1751.34277344,22.56104851,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (15)
  289. CreateObject(1649,1470.20312500,-1751.34277344,25.81104851,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (16)
  290. CreateObject(1649,1475.67883301,-1751.30529785,16.08605576,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (17)
  291. CreateObject(1649,1475.67871094,-1751.30468750,19.33605576,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (18)
  292. CreateObject(1649,1475.67871094,-1751.30468750,22.58605576,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (19)
  293. CreateObject(1649,1475.67871094,-1751.30468750,25.86100578,0.00000000,0.00000000,0.00000000); //object(wglasssmash) (20)*/
  294.     CreateObject(1257,1487.53967285,-1741.34545898,13.82606697,0.00000000,0.00000000,270.00000000); //object(bustopm) (1)
  295.     CreateObject(1257,1482.81359863,-1741.39709473,13.82606697,0.00000000,0.00000000,270.00000000); //object(bustopm) (2)
  296.     CreateObject(3578,1488.56921387,-1732.34350586,11.71085262,0.00000000,0.00000000,91.25000000); //object(dockbarr1_la) (1)
  297.     CreateObject(3578,1477.34472656,-1732.28674316,11.71085262,0.00000000,0.00000000,90.74963379); //object(dockbarr1_la) (2)
  298.     CreateObject(640,1480.25097656,-1732.27600098,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (2)
  299.     CreateObject(640,1485.57983398,-1732.27587891,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (3)
  300.     CreateObject(618,1488.02148438,-1732.82836914,11.63282394,0.00000000,0.00000000,353.75000000); //object(veg_treea3) (1)
  301.     CreateObject(618,1478.48974609,-1732.81335449,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (2)
  302.     CreateObject(640,1491.45544434,-1732.24450684,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (4)
  303.     CreateObject(640,1496.70874023,-1732.27258301,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (5)
  304.     CreateObject(640,1501.96020508,-1732.27734375,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (6)
  305.     CreateObject(640,1507.18664551,-1732.28344727,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (7)
  306.     CreateObject(640,1512.38989258,-1732.28942871,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (8)
  307.     CreateObject(640,1474.37402344,-1732.28674316,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (9)
  308.     CreateObject(640,1469.14746094,-1732.29492188,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (10)
  309.     CreateObject(640,1463.81103516,-1732.29345703,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (11)
  310.     CreateObject(640,1458.53247070,-1732.28735352,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (12)
  311.     CreateObject(640,1453.33093262,-1732.28173828,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (13)
  312.     CreateObject(640,1447.97619629,-1732.27917480,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (14)
  313.     CreateObject(640,1442.72546387,-1732.32128906,13.07984638,0.00000000,0.00000000,270.00000000); //object(kb_planter_bush2) (15)
  314.     CreateObject(618,1499.52050781,-1732.83300781,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (4)
  315.     CreateObject(618,1509.82385254,-1732.81848145,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (5)
  316.     CreateObject(618,1504.62219238,-1732.82189941,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (6)
  317.     CreateObject(618,1494.27258301,-1732.70422363,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (7)
  318.     CreateObject(618,1471.91455078,-1732.82910156,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (8)
  319.     CreateObject(618,1466.49157715,-1732.82495117,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (9)
  320.     CreateObject(3578,1515.40051270,-1732.04309082,11.71085262,0.00000000,0.00000000,90.49694824); //object(dockbarr1_la) (3)
  321.     CreateObject(618,1461.26550293,-1732.82641602,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (11)
  322.     CreateObject(618,1455.98962402,-1732.80371094,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (12)
  323.     CreateObject(618,1450.73925781,-1732.80627441,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (13)
  324.     CreateObject(618,1445.46447754,-1732.80834961,11.63282394,0.00000000,0.00000000,353.74877930); //object(veg_treea3) (14)
  325.     CreateObject(3578,1439.82946777,-1732.28723145,11.71085262,0.00000000,0.00000000,90.74707031); //object(dockbarr1_la) (4)
  326.  
  327.  
  328.  
  329.     //Cars
  330.  
  331.     //Newbie Roller / SH Roller
  332.  
  333.     SetVehicleNumberPlate(CreateVehicle(462,1467.85852051,-1741.39099121,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
  334.     SetVehicleNumberPlate(CreateVehicle(462,1468.68847656,-1741.34179688,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
  335.     SetVehicleNumberPlate(CreateVehicle(462,1469.43811035,-1741.36450195,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
  336.     SetVehicleNumberPlate(CreateVehicle(462,1470.18713379,-1741.38696289,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
  337.     SetVehicleNumberPlate(CreateVehicle(462,1470.93615723,-1741.40942383,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
  338.     SetVehicleNumberPlate(CreateVehicle(462,1471.58618164,-1741.42822266,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
  339.     SetVehicleNumberPlate(CreateVehicle(462,1472.23657227,-1741.44677734,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
  340.     SetVehicleNumberPlate(CreateVehicle(462,1472.98596191,-1741.46899414,13.21709442,0.00000000,1,1,320),"{CC001C}Newbie"); //Faggio
  341.  
  342.     //Server-Nachricht
  343.     SetTimer("Servernachricht",1800000,1);
  344.  
  345.     UsePlayerPedAnims();
  346.     DisableInteriorEnterExits();
  347.     SetGameModeText("German Reallife Test");
  348.     //AddPlayerClass(11,1486.3182,-1748.4572,15.4453,1.5433,0,0,0,0,0,0); // SH Spawn
  349.     //AddPlayerClass(55,1486.3182,-1748.4572,15.4453,1.5433,0,0,0,0,0,0); // SH Spawn
  350.     //AddPlayerClass(91,1486.3182,-1748.4572,15.4453,1.5433,0,0,0,0,0,0); // SH Spawn
  351.  
  352.  
  353.  
  354.     return 1;
  355. }
  356.  
  357. public OnGameModeExit()
  358. {
  359.     return 1;
  360. }
  361.  
  362. public OnPlayerRequestClass(playerid, classid)
  363. {
  364.     return 1;
  365. }
  366.  
  367. public OnPlayerConnect(playerid)
  368. {
  369.  
  370.     //MapIcons//
  371.    
  372.     SetPlayerMapIcon(playerid,41,1481.0009,-1770.3896,18.7958,38,COLOR_YELLOW);//Stadthalle
  373.     SetPlayerMapIcon(playerid, 1, 1544.4790,-1673.6595,13.5585, 30, COLOR_YELLOW); // LSPD
  374.     SetPlayerMapIcon(playerid, 2, 1480.9323,-1767.7324,18.7958, 38, COLOR_YELLOW); // Stadthalle
  375.    
  376.     //=======//
  377.  
  378.  
  379.     //========Krankenhaus-System========//
  380.  
  381.     PlayerInfo[playerid][pTot] = 0;
  382.     PlayerInfo[playerid][pTx] = 0;
  383.     PlayerInfo[playerid][pTy] = 0;
  384.     PlayerInfo[playerid][pTz] = 0;
  385.     pIstTot[playerid] = 0;
  386.    
  387.     //================================//
  388.  
  389.     // Clear Text beim Online kommen //
  390.    
  391.     SendClientMessage(playerid,COLOR_DGREEN,"");
  392.     SendClientMessage(playerid,COLOR_DGREEN,"");
  393.     SendClientMessage(playerid,COLOR_DGREEN,"");
  394.     SendClientMessage(playerid,COLOR_DGREEN,"");
  395.     SendClientMessage(playerid,COLOR_DGREEN,"");
  396.     SendClientMessage(playerid,COLOR_DGREEN,"");
  397.     SendClientMessage(playerid,COLOR_DGREEN,"");
  398.     SendClientMessage(playerid,COLOR_DGREEN,"");
  399.     SendClientMessage(playerid,COLOR_DGREEN,"");
  400.     SendClientMessage(playerid,COLOR_DGREEN,"");
  401.     SendClientMessage(playerid,COLOR_DGREEN,"");
  402.     SendClientMessage(playerid,COLOR_DGREEN,"");
  403.     SendClientMessage(playerid,COLOR_DGREEN,"");
  404.     SendClientMessage(playerid,COLOR_DGREEN,"");
  405.     SendClientMessage(playerid,COLOR_DGREEN,"");
  406.    
  407.    
  408.     // =========================== //
  409.  
  410.  
  411.     new pname[MAX_PLAYERS],accFormat[128];
  412.     GetPlayerName(playerid,pname,sizeof pname);
  413.     format(accFormat,sizeof accFormat,"Accounts/%s.datei",pname);
  414.     if(fexist(accFormat))
  415.     {
  416.         ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte gebe dein Passwort ein","Login","Abbrechen");
  417.         SendClientMessage(playerid,COLOR_DGREEN,"|___ Willkommen ___|");
  418.         SendClientMessage(playerid,COLOR_WHITE," Dein Account wurde gefunden!");
  419.         }
  420.         else
  421.         {
  422.         ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte gebe dein gewĂ¼nschtes Passwort ein","Registrieren","Abbrechen");
  423.         SendClientMessage(playerid,COLOR_DGREEN,"|___ Willkommen ___|");
  424.         SendClientMessage(playerid,COLOR_WHITE," Dein Account wurde nicht gefunden!");
  425.     }
  426.  
  427.  
  428.     //LoginNachricht
  429.    
  430.     new pName[MAX_PLAYER_NAME];
  431.     new string[48];
  432.     GetPlayerName(playerid, pName, sizeof(pName));
  433.     format(string, sizeof(string), "%s hat den Server Betreten.", pName);
  434.     SendClientMessageToAll(0xAAAAAAAA, string);
  435.  
  436.  
  437.     return 1;
  438. }
  439.  
  440. public OnPlayerDisconnect(playerid, reason)
  441. {
  442.  
  443.     //=======Krankenhaus-System======//
  444.    
  445.     DestroyPickup(TotenKopf[playerid]);
  446.    
  447.     //================================//
  448.  
  449.  
  450.     new pname[MAX_PLAYERS],accFormat[128];
  451.     GetPlayerName(playerid,pname,sizeof pname);
  452.     format(accFormat,sizeof accFormat,"Accounts/%s.datei",pname);
  453.     if(fexist(accFormat) && Spieler[playerid][eingeloggt])
  454.     {
  455.         dini_IntSet(accFormat,"Admin",Spieler[playerid][Admin]);
  456.         dini_IntSet(accFormat,"Geschlecht",Spieler[playerid][Geschlecht]);
  457.         dini_IntSet(accFormat,"paydaytime",Spieler[playerid][paydaytime]);
  458.         dini_IntSet(accFormat,"wanted",Spieler[playerid][wanted]);
  459.         dini_IntSet(accFormat,"skin",GetPlayerSkin(playerid));
  460.         dini_IntSet(accFormat,"Geld",GetPlayerMoney(playerid));
  461.         dini_IntSet(accFormat,"Level",GetPlayerScore(playerid));
  462.         dini_IntSet(accFormat,"Fraktion",Spieler[playerid][Fraktion]);
  463.     }
  464.     Spieler[playerid][eingeloggt] = 0;
  465.     Spieler[playerid][wanted] = 0;
  466.  
  467.  
  468.     //Haus System
  469.    
  470.     //inHaus[playerid] = -1;
  471.    
  472.    
  473.     //Logout Nachricht
  474.    
  475.     new pName[MAX_PLAYER_NAME];
  476.     new string[56];
  477.     GetPlayerName(playerid, pName, sizeof(pName));
  478.    
  479.     switch(reason)
  480.     {
  481.         case 0: format(string, sizeof(string),"%s hat den Server verlassen. (Error)", pName);
  482.         case 1: format(string, sizeof(string),"%s hat den Server verlassen. (Normal)", pName);
  483.         case 2: format(string, sizeof(string),"%s hat den Server verlassen. (Kick/Ban)", pName);
  484.     }
  485.     SendClientMessageToAll(0xAAAAAAAA, string);
  486.    
  487.     return 1;
  488.  
  489.    
  490. }
  491.  
  492. public OnPlayerSpawn(playerid)
  493. {
  494.  
  495.     //==========Spawn-Nachricht========//
  496.  
  497.     new PlayerName[24], string[128];
  498.     GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  499.     format(string, sizeof(string), "~b~Willkommen~n~~w~%s", PlayerName);
  500.     GameTextForPlayer(playerid, string,1000,1);
  501.  
  502.     //=================================//
  503.    
  504.     if(Spieler[playerid][Fraktion] == 0)
  505.     {
  506.         SetPlayerColor(playerid, COLOR_WHITE);
  507.     }
  508.     if(Spieler[playerid][Fraktion] == 1)
  509.     {
  510.         SetPlayerColor(playerid, COLOR_BLUE);
  511.     }
  512.    
  513.  
  514.  
  515.     //=========Krankenhaus-System========//
  516.     if(PlayerInfo[playerid][pTot] == 1)
  517.     {
  518.         SendClientMessage(playerid,COLOR_DGREEN," ");
  519.         SendClientMessage(playerid,COLOR_DGREEN," ");
  520.         SendClientMessage(playerid,COLOR_DGREEN," ");
  521.         SendClientMessage(playerid,COLOR_DGREEN," ");
  522.         SendClientMessage(playerid,COLOR_DGREEN," ");
  523.         SendClientMessage(playerid,COLOR_DGREEN," ");
  524.         SendClientMessage(playerid,COLOR_DGREEN," ");
  525.         SendClientMessage(playerid,COLOR_DGREEN," ");
  526.         SendClientMessage(playerid,COLOR_DGREEN," ");
  527.         SendClientMessage(playerid,COLOR_DGREEN," ");
  528.         SendClientMessage(playerid,COLOR_DGREEN," ");
  529.         SendClientMessage(playerid,COLOR_DGREEN," ");
  530.         SendClientMessage(playerid,COLOR_DRED,"Du bist schwer verletzt ins Krankenhaus gebracht wurden!");
  531.         SendClientMessage(playerid,COLOR_DRED,"Deine Behandlung kostet dich $200.");
  532.         SendClientMessage(playerid,COLOR_DRED,"Du liegst fĂ¼r 20 Sekunden im Krankenhaus!");
  533.         GameTextForPlayer(playerid,"~w~-----------~n~~g~Krankenhaus~n~~r~200$~n~~w~-----------",10000,3);
  534.         ResetPlayerWeapons(playerid);
  535.         TogglePlayerControllable(playerid, 0);
  536.         GivePlayerMoney(playerid,-200);
  537.         ResetPlayerWeapons(playerid);
  538.         SetPlayerPos(playerid,1149.4829,-1344.2615,13.2547);
  539.         SetPlayerCameraPos(playerid,1215.9624,-1323.9651,13.5669);
  540.         SetPlayerCameraLookAt(playerid,1172.1309,-1323.5834,31.4652);
  541.         SetPlayerInterior(playerid, 0);
  542.         return 1;
  543.     }
  544.  
  545.    
  546.    
  547.     //====================================//
  548.  
  549.     return 1;
  550. }
  551.  
  552. public OnPlayerDeath(playerid, killerid, reason)
  553. {
  554.  
  555.     //==========Krankenhaus-System========//
  556.    
  557.     PlayerInfo[playerid][pTot] = 1;
  558.     new Float:pX,Float:pY,Float:pZ;
  559.     GetPlayerPos(playerid, pX, pY, pZ);
  560.     TotenKopf[playerid] = CreatePickup(1254,1, pX, pY, pZ);
  561.     PlayerInfo[playerid][pTx] = pX;
  562.     PlayerInfo[playerid][pTy] = pY;
  563.     PlayerInfo[playerid][pTz] = pZ;
  564.    
  565.     //===================================//
  566.  
  567.     return 1;
  568. }
  569.  
  570. public OnVehicleSpawn(vehicleid)
  571. {
  572.     return 1;
  573. }
  574.  
  575. public OnVehicleDeath(vehicleid, killerid)
  576. {
  577.     return 1;
  578. }
  579.  
  580. public OnPlayerText(playerid, text[])
  581. {
  582.  
  583.     if(realchat == 1)
  584.     {
  585.     new sendername[MAX_PLAYER_NAME], string[180];
  586.     GetPlayerName(playerid, sendername, sizeof(sendername));
  587.     format(string, sizeof(string), "%s sagt: %s", sendername, text);
  588.     ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  589.     return 0;
  590.     }
  591.    
  592.     return 1;
  593. }
  594.  
  595. public OnPlayerCommandText(playerid, cmdtext[])
  596. {
  597.  
  598.  
  599. dcmd(setstat,7,cmdtext); // in den Puplic OnPlayerCommandText
  600.  
  601. //========PAYCOMMAND=========//
  602.  
  603. /*if(strcmp(strget(cmdtext, 0), "/pay", true) == 0)
  604.     {
  605.                 new pname[128];
  606.                 new name[128];
  607.         new targetid = strval(strget(cmdtext, 1));
  608.         new amount = strval(strget(cmdtext, 2));
  609.         GetPlayerName(playerid, pname, sizeof(pname));
  610.         GetPlayerName(targetid, name, sizeof(name));
  611.         if(!strlen(strget(cmdtext, 1)) || strval(strget(cmdtext, 2))) { SendClientMessage(playerid, COLOR_GREY, "Benutzung: /pay [Playerid/PartOfName] [Money]"); return 1; }
  612.         if(amount > GetPlayerMoney(playerid)) { SendClientMessage(playerid, COLOR_GREY, "So viel Geld hast du nicht bei dir!"); return 1; }
  613.         if(IsPlayerConnected(targetid))
  614.         {
  615.             if(targetid != playerid)
  616.             {
  617.                 GivePlayerMoney(playerid, -amount);
  618.                 GivePlayerMoney(targetid, amount);
  619.                 format(str1, sizeof(str1), " Du hast %s $%d gegeben", name, amount);
  620.                 SendClientMessage(playerid, COLOR_BLUE, str1);
  621.                 format(str1, sizeof(str1), " %s hat dir $%d gegeben", pname, amount);
  622.                 SendClientMessage(targetid, COLOR_BLUE, str1);
  623.                 return 1;
  624.             }
  625.             else { SendClientMessage(playerid, COLOR_GREY, "Du kannst dir nicht selber Geld geben!"); return 1; }
  626.         }
  627.         else { SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist nicht Online!"); return 1; }
  628.     }*/
  629.    
  630.     /*if(strcmp(cmd, "/pay", true) == 0)
  631.     {
  632.         if(IsPlayerConnected(playerid))
  633.         {
  634.             new tmp[256]
  635.             new cmd[256]
  636.             new idx;
  637.             tmp = strtok(cmdtext, idx);
  638.             if(!strlen(tmp))
  639.             {
  640.                 SendClientMessage(playerid, COLOR_GRAD1, "NUTZUNG: /pay [playerid/PartOfName] [amount]");
  641.                 return 1;
  642.             }
  643.             //giveplayerid = strval(tmp);
  644.             giveplayerid = ReturnUser(tmp);
  645.             tmp = strtok(cmdtext, idx);
  646.             if(!strlen(tmp))
  647.             {
  648.                 SendClientMessage(playerid, COLOR_GRAD1, "NUTZUNG: /pay [playerid/PartOfName] [amount]");
  649.                 return 1;
  650.             }
  651.             moneys = strval(tmp);
  652.             if(moneys > 1000 && PlayerInfo[playerid][pLevel] < 1)
  653.             {
  654.                 SendClientMessage(playerid, COLOR_GRAD1, "Du musst mindestens Level 3 sein, um Ă¼ber $1000 abgeben zu können.");
  655.                 return 1;
  656.             }
  657.             if(moneys < 1 || moneys > 99999)
  658.             {
  659.                 SendClientMessage(playerid, COLOR_GRAD1, "Der Betrag muss zwischen $1 und $90000 sein!");
  660.                 return 1;
  661.             }
  662.             if (IsPlayerConnected(giveplayerid))
  663.             {
  664.                 if(giveplayerid != INVALID_PLAYER_ID)
  665.                 {
  666.                     if(PlayerInfo[giveplayerid][pLocal] == 106)
  667.                     {
  668.                         SendClientMessage(playerid, COLOR_GRAD1, "Der Befehl ist in dieser Lage nicht erlaubt.");
  669.                         return 1;
  670.                     }
  671.                     if (ProxDetectorS(5.0, playerid, giveplayerid))
  672.                     {
  673.                         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  674.                         GetPlayerName(playerid, sendername, sizeof(sendername));
  675.                         playermoney = GetPlayerMoney(playerid);
  676.                         if (moneys > 0 && playermoney >= moneys)
  677.                         {
  678.                             ConsumingMoney[giveplayerid] = 1;
  679.                             GivePlayerMoney(playerid, (0 - moneys));
  680.                             GivePlayerMoney(giveplayerid, moneys);
  681.                             format(string, sizeof(string), "   Du hast %s(player: %d), $%d gegeben.", giveplayer,giveplayerid, moneys);
  682.                             PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  683.                             SendClientMessage(playerid, COLOR_GRAD1, string);
  684.                             format(string, sizeof(string), "   Du hast $%d von %s(player: %d) bekommen.", moneys, sendername, playerid);
  685.                             SendClientMessage(giveplayerid, COLOR_GRAD1, string);
  686.                             format(string, sizeof(string), "%s hat $%d dem Spieler %s gegeben.", sendername, moneys, giveplayer);
  687.                             PayLog(string);
  688.                             if(moneys >= 1000000)
  689.                             {
  690.                                 ABroadCast(COLOR_YELLOW,string,1);
  691.                             }
  692.                             PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
  693.                             format(string, sizeof(string), "* %s nimmt Geld aus seiner Tasche und gibt es %s.", sendername ,giveplayer);
  694.                             ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  695.                         }
  696.                         else
  697.                         {
  698.                             SendClientMessage(playerid, COLOR_GRAD1, "   UngĂ¼ltiger Betrag.");
  699.                         }
  700.                     }
  701.                     else
  702.                     {
  703.                         SendClientMessage(playerid, COLOR_GRAD1, "   Du musst näher an dem Spieler sein!");
  704.                     }
  705.                 }//invalid id
  706.             }
  707.             else
  708.             {
  709.                 format(string, sizeof(string), "   %d ist kein aktiver Spieler.", giveplayerid);
  710.                 SendClientMessage(playerid, COLOR_GRAD1, string);
  711.             }
  712.         }
  713.         return 1;
  714.     }*/
  715.  
  716.  
  717. //===========================//
  718.  
  719.     //=======MAKELEADER========//
  720.    
  721.  
  722.    
  723.     //======================//
  724.  
  725.  
  726.     //============Teleports=========//
  727.    
  728.  
  729.     //==========ADMIN-Befehle========//
  730.    
  731.     if(strcmp("/ah",cmdtext, true, 10) == 0)
  732.     {
  733.         if(Spieler[playerid][Admin] >=1)
  734.         {
  735.             SendClientMessage(playerid,COLOR_YELLOW,"|-------|Admin-Befehle|--------|");
  736.             SendClientMessage(playerid,COLOR_WHITE,"/gotols - Teleportiert dich nach Los Santos");
  737.             SendClientMessage(playerid,COLOR_WHITE,"/givegun [playerid] [gunid] [ammo] - Gibt dir Waffen");
  738.             SendClientMessage(playerid,COLOR_WHITE,"123");
  739.             SendClientMessage(playerid,COLOR_WHITE,"Hier werden Befehle aufgelistet!");
  740.             SendClientMessage(playerid,COLOR_WHITE,"Das GTA-Great Team!");
  741.         }
  742.         else SendClientMessage(playerid,COLOR_WHITE,"Du bist kein Administrator!");
  743.         return 1;
  744.     }
  745.    
  746.     //============TV===================//
  747.    
  748.  
  749.    
  750.     //================================//
  751.  
  752.  
  753.     //=========OOC==============//
  754.    
  755.     if(strcmp("/o",cmdtext,true,10) == 0)
  756.     {
  757.     new sendername[MAX_PLAYER_NAME], string[180];
  758.     GetPlayerName(playerid, sendername, sizeof(sendername));
  759.     format(string, sizeof(string), "(( %s: %s ))", sendername, cmdtext);
  760.     return 0;
  761.     }
  762.     /*if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
  763.     {
  764.         if(IsPlayerConnected(playerid))
  765.         {
  766.             if(PlayerInfo[playerid][pTot] == 1)
  767.             {
  768.                 SendClientMessage(playerid,COLOR_WHITE,"Tote können nicht sprechen!");
  769.                 return 0;
  770.             }
  771.             GetPlayerName(playerid, sendername, sizeof(sendername));
  772.             new length = strlen(cmdtext);
  773.             while ((idx < length) && (cmdtext, idx] <= ' '))
  774.             {
  775.                 idx++;
  776.             }
  777.             new offset = idx;
  778.             new result[64];
  779.             while ((idx < length) && ((idx - offset) < (sizeof(result) -1)))
  780.             {
  781.                 result[idx - offset] = cmdtext[idx];
  782.                 idx++;
  783.             }
  784.             result[idx - offset] = EOS;
  785.             PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  786.            
  787.             printf("%s", string);
  788.             }
  789.             return 1;
  790.         }*/
  791.    
  792.     //==========================//
  793.  
  794.    
  795.     //============ADMIN-TELEPORTS============//
  796.     if(strcmp("/gotols",cmdtext, true, 10) == 0)
  797.     {
  798.         if(Spieler[playerid][Admin] >=1)
  799.         {
  800.         SetPlayerPos(playerid,1475.0231,-1749.5789,15.4453);
  801.         SendClientMessage(playerid,COLOR_DGREEN,"Erfolgreich nach LS teleportiert!");
  802.         }
  803.         else SendClientMessage(playerid,COLOR_WHITE,"Du bist kein Administrator!");
  804.         return 1;
  805.     }
  806.    
  807.     /*if(strcmp("/gotosf",cmdtext, true, 10) == 0)
  808.     {
  809.         if(Spieler[playerid][Admin] >=1)
  810.         {
  811.         SetPlayerPos(playerid,x,y,z);
  812.         SendClientMessage(playerid,COLOR_DGREEN,"Erfolgreich nach SF teleportiert!");
  813.         }
  814.         else SendClientMessage(playerid,COLOR_WHITE,"Du bist kein Administrator!");
  815.         return 1;
  816.     }*/
  817.    
  818.     //=====================================//
  819.    
  820.     //============ADMINON==================//
  821.     if(strcmp("/adminon",cmdtext, true, 10) == 0)
  822.     {
  823.         if(Spieler[playerid][Admin] >=1)
  824.         {
  825.             new pName[MAX_PLAYER_NAME];
  826.             new string[72];
  827.             GetPlayerName(playerid, pName, sizeof(pName));
  828.             format(string, sizeof(string), "%s hat sich als Admin angemeldet! Er darf nicht attackiert werden!", pName);
  829.             SendClientMessageToAll(COLOR_RED, string);
  830.             SetPlayerHealth(playerid,9999999);
  831.         }
  832.         else SendClientMessage(playerid,COLOR_WHITE,"Du bist kein Administrator!");
  833.         return 1;
  834.     }
  835.     //=====================================//
  836.    
  837.    
  838.     //================ADMINOFF===========//
  839.     if(strcmp("/adminoff",cmdtext, true, 10) == 0)
  840.     {
  841.         if(Spieler[playerid][Admin] >=1)
  842.         {
  843.             new pName[MAX_PLAYER_NAME];
  844.             new string[72];
  845.             GetPlayerName(playerid, pName, sizeof(pName));
  846.             format(string, sizeof(string), "%s hat sich als Admin abgemeldet! Er darf wieder attackiert werden!", pName);
  847.             SendClientMessageToAll(COLOR_RED, string);
  848.             SetPlayerHealth(playerid, 100);
  849.         }
  850.         else SendClientMessage(playerid,COLOR_WHITE,"Du bist kein Administrator!");
  851.         return 1;
  852.     }
  853.     //========================================//
  854.  
  855.     //============GIVEGUN=============//
  856.    
  857.     if(!strcmp(strget(cmdtext, 0), "/givegun"))
  858.     {
  859.         if(Spieler[playerid][Admin] >= 2)
  860.         {
  861.         new spieleridwaffen = strval(strget(cmdtext, 1));
  862.         new waffe = strval(strget(cmdtext, 2));
  863.         new munni = strval(strget(cmdtext, 3));
  864.         GivePlayerWeapon(spieleridwaffen, waffe, munni);
  865.         return 1;
  866.         }
  867.         else SendClientMessage(playerid,COLOR_WHITE,"Du bist kein Administrator!");
  868.         return 1;
  869.         {
  870.     }
  871.        
  872. }
  873.  
  874.  
  875.  
  876.        
  877.     //==============================//
  878.    
  879.     //=============SETPLAYERHEALTH==========//
  880.    
  881.    
  882.    
  883.    
  884.     //=======================================//
  885.  
  886.  
  887.  
  888.     /*//============SETSTAT=====================//
  889.     if(strcmp("/setstat", cmdtext, true, 10) == 0)
  890.     {
  891.         if(IsPlayerConnected(playerid))
  892.         {
  893.             tmp = strtok(cmdtext, idx);
  894.             if(!strlen(tmp))
  895.             {
  896.                 SendClientMessage(playerid, COLOR_WHITE, "Benutze: /setstat [playerid] [statcode] [Betrag]");
  897.                 SendClientMessage(playerid, COLOR_WHITE, "|1 = Level | 2 = Admin Level | 3 = Geld");
  898.                 return 1;
  899.             }
  900.             giveplayerid = ReturnUser(tmp);
  901.             if(IsPlayerConnected(giveplayerid))
  902.             {
  903.                 if(giveplayerid != INVALID_PLAYER_ID)
  904.                 {
  905.                     tmp = strtok(cmdtext, idx);
  906.                     if(!strlen(tmp))
  907.                     {
  908.                         SendClientMessage(playerid, COLOR_WHITE, "Benutze: /setstat [playerid] [statcode] [Betrag]");
  909.                         SendClientMessage(playerid, COLOR_WHITE, "|1 = Level | 2 = Admin Level | 3 = Geld");
  910.                         return 1;
  911.                     }
  912.                     new stat;
  913.                     stat = strval(tmp);
  914.                     tmp = strtok(cmdtext, idx);
  915.                     if(!strlen(tmp))
  916.                     {
  917.                         SendClientMessage(playerid, COLOR_WHITE, "Benutze: /setstat [playerid] [statcode] [Betrag]");
  918.                         SendClientMessage(playerid, COLOR_WHITE, "|1 = Level | 2 = Admin Level | 3 = Geld");
  919.                         return 1;
  920.                     }
  921.                     new amount;
  922.                     amount = strval(tmp)
  923.                     if(Spieler[playerid][Admin] >= 1);
  924.                     {
  925.                         switch (stat)
  926.                         {
  927.                             case 1:
  928.                             {
  929.                                 Spieler[giveplayerid][Level] = amount;
  930.                                 format(string, sizeof(string), " Der Spieler wurde auf Level %d gesetzt", amount);
  931.                                 //SendClientMessage(playerid,COLOR_RED,"Das Level wurde neu gesetzt");
  932.                             }
  933.                             case 2:
  934.                             {
  935.                                 Spieler[giveplayerid][Admin] = amount;
  936.                                 format(string, sizeof(string), " Der Spieler wurde auf Admin Level %d gesetzt", amount);
  937.                                 //SendClientMessage(playerid,COLOR_RED,"Das Admin-Level wurde neu gesetzt");
  938.                             }
  939.                             case 3:
  940.                             {
  941.                                 Spieler[giveplayerid][Geld] = amount;
  942.                                 format(string, sizeof(string), " Das Geld des Spielers wurde auf %d gesetzt", amount);
  943.                                 //SendClientMessage(playerid,COLOR_RED,"Das Geld wurde neu gesetzt");
  944.                             }
  945.                             default:
  946.                             {
  947.                                 format(string, sizeof(string), "FEHLER: UngĂ¼ltiger Stat-Code", amount);
  948.                                 //SendClientMessage(playerid,COLOR_WHITE,"FEHLER: UngĂ¼ltiger Stat-Code");
  949.                             }
  950.                         }
  951.                         SendClientMessage(playerid, COLOR_BLUE, string);
  952.                     }
  953.                     else
  954.                     {
  955.                         SendClientMessage(playerid, COLOR_WHITE, " Du bist kein Administrator!");
  956.                     }
  957.                 }
  958.             }
  959.         }
  960.         return 1;
  961.     }*/
  962. //=====================================//
  963.    
  964.    
  965.    
  966.     //=============================//
  967.  
  968.  
  969.  
  970.     //============STATS===============//
  971.     if(strcmp("/stats", cmdtext, true, 10) == 0)
  972.     {
  973.         new name[MAX_PLAYER_NAME], string[256];
  974.         GetPlayerName(playerid, name, sizeof(name));
  975.         format(string,sizeof(string),"Name: %s\nLevel: %d\nGeld: %s",name,GetPlayerScore(playerid),GetPlayerMoney(playerid));
  976.         SendClientMessage(playerid,COLOR_WHITE);
  977.         return 1;
  978.     }
  979.    
  980.     //================================//
  981.    
  982.     //==================================//
  983.    
  984.     //==========TouristenHilfe-SH===============//
  985.     if(strcmp("/guide", cmdtext, true, 10) == 0)
  986.     {
  987.         if(IsPlayerInRangeOfPoint(playerid,2.0,1475.6575,-1763.6359,18.7958))
  988.         {
  989.             SendClientMessage(playerid,COLOR_DGREEN,"Das ist der Touristen-Guide!");
  990.             SendClientMessage(playerid,COLOR_DGREEN,"Hier sind alle wichtigen Orte aufgelistet!");
  991.             SendClientMessage(playerid,COLOR_DGREEN,"Wenn du mehr Hilfe brauchst und die Befehle wissen willst");
  992.             SendClientMessage(playerid,COLOR_DGREEN,"Dann benutze /help oder wende dich an einen Admin!");
  993.             ShowPlayerDialog(playerid,guidemenu,DIALOG_STYLE_LIST,"Wichtige Orte","Stadthalle\nBank","Anzeigen","Abbrechen");
  994.             return 1;
  995.         }
  996.         else SendClientMessage(playerid,COLOR_WHITE,"Kein Guide in der Nähe!");
  997.         return 1;
  998.     }
  999.  
  1000.    
  1001.    
  1002.    
  1003.     //============================================//
  1004.    
  1005.    
  1006.    
  1007.    
  1008.     if(strcmp("/gps", cmdtext, true, 10) == 0)
  1009.     {
  1010.         ShowPlayerDialog(playerid,navimenu,DIALOG_STYLE_LIST,"GPS-System","Stadthalle\nBank","Anzeigen","Abbrechen");
  1011.         return 1;
  1012.     }
  1013.    
  1014.     if(strcmp("/help", cmdtext, true, 10) == 0)
  1015.     {
  1016.         SendClientMessage(playerid,COLOR_YELLOW,"|-------|Server-Befehle|-------|");
  1017.         SendClientMessage(playerid,COLOR_WHITE,"/gps - Ruft das Navigations Menu auf");
  1018.         SendClientMessage(playerid,COLOR_WHITE,"/gpsaus - Löscht einen Marker auf der Karte");
  1019.         SendClientMessage(playerid,COLOR_WHITE,"/gotols - Teleportiert dich nach Los Santos");
  1020.         SendClientMessage(playerid,COLOR_WHITE,"/rules - Zählt alle bekannten Regeln auf");
  1021.         SendClientMessage(playerid,COLOR_WHITE,"/guide - Geht nur vor der Stadthalle - Wichtige Orte");
  1022.         SendClientMessage(playerid,COLOR_RED,"Mehr Befehle sind in Arbeit!!");
  1023.         SendClientMessage(playerid,COLOR_RED,"Euer GTA-Great Team");
  1024.         return 1;
  1025.     }
  1026.    
  1027.     if(strcmp("/gpsaus", cmdtext, true, 10) == 0)
  1028.     {
  1029.         DisablePlayerCheckpoint(playerid);
  1030.         SendClientMessage(playerid,COLOR_DGREEN,"GPS Erfolgreich ausgeschaltet");
  1031.         return 1;
  1032.     }
  1033.    
  1034.     if(strcmp("/rules", cmdtext, true, 10) == 0)
  1035.     {
  1036.         SendClientMessage(playerid,COLOR_YELLOW,"|-------|Die Server-Regeln|-------|");
  1037.         SendClientMessage(playerid,COLOR_WHITE,"Cheaten & Bug-Usen ist strengstens verboten!!");
  1038.         SendClientMessage(playerid,COLOR_WHITE,"Wer dabei erwischt wird, kriegt einen Permanenten Bann!");
  1039.         SendClientMessage(playerid,COLOR_WHITE,"Es werden keine Zivilisten Grundlos getötet!");
  1040.         SendClientMessage(playerid,COLOR_WHITE,"Das bekämpfen unter Gangs und Mafien ist erlaubt!");
  1041.         SendClientMessage(playerid,COLOR_WHITE,"Das Grundlose fesseln der Spieler ist ebenfalls verboten");
  1042.         SendClientMessage(playerid,COLOR_WHITE,"Und wird mit 30 Minuten Prison bestraft!");
  1043.         return 1;
  1044.     }
  1045.    
  1046.     if(strcmp("/kill", cmdtext, true, 10) == 0)
  1047.     {
  1048.         SetPlayerHealth(playerid, 0);
  1049.         return 1;
  1050.     }
  1051.  
  1052.  
  1053.    
  1054.     if(strcmp("/serverinfo", cmdtext, true, 10) == 0)
  1055.     {
  1056.         SendClientMessage(playerid, COLOR_YELLOW, "===================|SERVER_INFO|===================");
  1057.         SendClientMessage(playerid, COLOR_WHITE, "SERVER BESITZER: Mirko97");
  1058.         SendClientMessage(playerid, COLOR_WHITE, "SCRIPTER: Mirko97");
  1059.         SendClientMessage(playerid, COLOR_WHITE, "SCRIPT VERSION: 0.1 Closed-Beta");//sversion
  1060.         SendClientMessage(playerid, COLOR_WHITE, "FORUM: www.gta-great.forumprofi.de");
  1061.         SendClientMessage(playerid, COLOR_YELLOW, "===================================================");
  1062.         return 1;
  1063.     }
  1064.    
  1065.     //=============ZIP-System===========//
  1066.     if(strcmp("/clothes", cmdtext, true, 10) == 0)
  1067.     {
  1068.         if(IsPlayerInRangeOfPoint(playerid,2.0,161.3723,-83.4066,1001.8047))
  1069.         {
  1070.             SendClientMessage(playerid,COLOR_WHITE,"Wähle bitte eine Kleidungsart aus!");
  1071.             ShowPlayerDialog(playerid,DIALOG_KWECHSEL,DIALOG_STYLE_LIST,"ZIP - Kleidung kaufen","Billige Kleidung\nBillige Kleidung 2\nBillige Kleidung 3\nBillige Kleidung 4\nTeure Kleidung\nTeure Kleidung 2\nTeure Kleidung 3\nTeure Kleidung 4","Kaufen","Abbrechen");
  1072.         }
  1073.         else SendClientMessage(playerid,COLOR_DRED,"Du bist in keinem Kleidungsgeschäft!");
  1074.         return 1;
  1075.     }
  1076.  
  1077.        
  1078.  
  1079.    
  1080.    
  1081.     //===================================//
  1082.    
  1083.     if(strcmp("/exit", cmdtext, true, 10) == 0)
  1084.     {
  1085.         if(IsPlayerInAnyVehicle(playerid))
  1086.         {
  1087.             UnFreezePlayer(playerid);
  1088.             RemovePlayerFromVehicle(playerid);
  1089.             return 1;
  1090.         }
  1091.     }
  1092.  
  1093.     return 0;
  1094. }
  1095.  
  1096. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1097. {
  1098.     if(PolizeiFahrzeug(vehicleid) && !ispassenger)
  1099.     {
  1100.         if(Spieler[playerid][Fraktion] == 0)
  1101.         {
  1102.             SendClientMessage(playerid,COLOR_FADE2,"Du hast keine SchlĂ¼ssel fĂ¼r das Fahrzeug!");
  1103.             FreezePlayer(playerid);
  1104.             UnFreezePlayer(playerid);
  1105.         }
  1106.         if(Spieler[playerid][Fraktion] == 1)
  1107.         {
  1108.             SendClientMessage(playerid,COLOR_FADE2,"Du hast den richtigen SchlĂ¼ssel eingesteckt!");
  1109.         }
  1110.     }
  1111.     return 1;
  1112. }
  1113.  
  1114. public OnPlayerExitVehicle(playerid, vehicleid)
  1115. {
  1116.     return 1;
  1117. }
  1118.  
  1119. public OnPlayerStateChange(playerid, newstate, oldstate)
  1120. {
  1121.     return 1;
  1122. }
  1123.  
  1124. public OnPlayerEnterCheckpoint(playerid)
  1125. {
  1126.     DisablePlayerCheckpoint(playerid);
  1127.  
  1128.     return 1;
  1129. }
  1130.  
  1131. public OnPlayerLeaveCheckpoint(playerid)
  1132. {
  1133.     return 1;
  1134. }
  1135.  
  1136. public OnPlayerEnterRaceCheckpoint(playerid)
  1137. {
  1138.     return 1;
  1139. }
  1140.  
  1141. public OnPlayerLeaveRaceCheckpoint(playerid)
  1142. {
  1143.     return 1;
  1144. }
  1145.  
  1146. public OnRconCommand(cmd[])
  1147. {
  1148.     return 1;
  1149. }
  1150.  
  1151. public OnPlayerRequestSpawn(playerid)
  1152. {
  1153.     return 1;
  1154. }
  1155.  
  1156. public OnObjectMoved(objectid)
  1157. {
  1158.     return 1;
  1159. }
  1160.  
  1161. public OnPlayerObjectMoved(playerid, objectid)
  1162. {
  1163.     return 1;
  1164. }
  1165.  
  1166. public OnPlayerPickUpPickup(playerid, pickupid)
  1167. {
  1168.     //==========PICKUPS=========//
  1169.    
  1170.     if(pickupid==shenter)
  1171.     {
  1172.         SetPlayerPos(playerid,383.9335,173.9228,1008.3828);
  1173.         SetPlayerInterior(playerid,3);
  1174.         GameTextForPlayer(playerid,"~w~----------~n~~w~Stadthalle~n~~w~----------",3000,5);
  1175.     }
  1176.  
  1177.     if(pickupid==shexit)
  1178.     {
  1179.         SetPlayerPos(playerid,1480.9241,-1766.4032,18.7958);
  1180.         SetPlayerInterior(playerid,0);
  1181.         GameTextForPlayer(playerid,"~w~----------~n~~w~Los Santos~n~~w~----------",3000,5);
  1182.     }
  1183.     if(pickupid==zipenter)
  1184.     {
  1185.         SetPlayerPos(playerid,161.391006,-93.159156,1001.804687);
  1186.         SetPlayerInterior(playerid,18);
  1187.         GameTextForPlayer(playerid,"~w~----------~n~~w~ZIP~n~~w~----------",3000,5);
  1188.         SendClientMessage(playerid,COLOR_WHITE,"Willkommen im Kleidungsgeschäft ZIP.");
  1189.     }
  1190.     if(pickupid==zipexit)
  1191.     {
  1192.         SetPlayerPos(playerid,1459.3125,-1141.5485,24.0700);
  1193.         SetPlayerInterior(playerid,0);
  1194.         GameTextForPlayer(playerid,"~w~----------~n~~w~Los Santos~n~~w~----------",3000,5);
  1195.     }
  1196.     if(pickupid==zipwechsel)
  1197.     {
  1198.         if(IsPlayerInRangeOfPoint(playerid,2.0,161.3723,-83.4066,1001.8047))
  1199.         {
  1200.         GameTextForPlayer(playerid,"~w~----------~n~~w~/clothes~n~~w~----------",3000,5);
  1201.         }
  1202.         else SendClientMessage(playerid,COLOR_DRED,"Du bist in keinem Kleidungsgeschäft!");
  1203.         return 1;
  1204.     }
  1205.     return 1;
  1206. }
  1207.  
  1208. public OnVehicleMod(playerid, vehicleid, componentid)
  1209. {
  1210.     return 1;
  1211. }
  1212.  
  1213. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  1214. {
  1215.     return 1;
  1216. }
  1217.  
  1218. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  1219. {
  1220.     return 1;
  1221. }
  1222.  
  1223. public OnPlayerSelectedMenuRow(playerid, row)
  1224. {
  1225.     return 1;
  1226. }
  1227.  
  1228. public OnPlayerExitedMenu(playerid)
  1229. {
  1230.     return 1;
  1231. }
  1232.  
  1233. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  1234. {
  1235.     return 1;
  1236. }
  1237.  
  1238. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1239. {
  1240.     return 1;
  1241. }
  1242.  
  1243. public OnRconLoginAttempt(ip[], password[], success)
  1244. {
  1245.     return 1;
  1246. }
  1247.  
  1248. public OnPlayerUpdate(playerid)
  1249. {
  1250.     return 1;
  1251. }
  1252.  
  1253. public OnPlayerStreamIn(playerid, forplayerid)
  1254. {
  1255.     return 1;
  1256. }
  1257.  
  1258. public OnPlayerStreamOut(playerid, forplayerid)
  1259. {
  1260.     return 1;
  1261. }
  1262.  
  1263. public OnVehicleStreamIn(vehicleid, forplayerid)
  1264. {
  1265.     return 1;
  1266. }
  1267.  
  1268. public OnVehicleStreamOut(vehicleid, forplayerid)
  1269. {
  1270.     return 1;
  1271. }
  1272.  
  1273. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1274. {
  1275.    
  1276.     //Register/Login
  1277.    
  1278.     new pname[MAX_PLAYERS],accFormat[128];
  1279.     GetPlayerName(playerid,pname,sizeof pname);
  1280.     format(accFormat,sizeof accFormat,"Accounts/%s.datei",pname);
  1281.     if(response)
  1282.     {
  1283.         switch(dialogid)
  1284.         {
  1285.             case DIALOG_LOGIN:
  1286.             {
  1287.                 if(!strlen(inputtext))
  1288.                 {
  1289.                     ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte gebe dein Passwort ein","Login","Abbrechen");
  1290.                     return SendClientMessage(playerid,COLOR_RED,"Kein Passwort eingegeben!");
  1291.  
  1292.                 }
  1293.                 if(strcmp(inputtext,dini_Get(accFormat,"Passwort")) == 0)
  1294.                 {
  1295.                     Spieler[playerid][Admin] = dini_Int(accFormat,"Admin");
  1296.                     Spieler[playerid][paydaytime] = dini_Int(accFormat,"paydaytime");
  1297.                     Spieler[playerid][wanted] = dini_Int(accFormat,"wanted");
  1298.                     Spieler[playerid][Fraktion] = dini_Int(accFormat,"Fraktion");
  1299.                     Spieler[playerid][skin] = dini_Int(accFormat,"skin");
  1300.                     Spieler[playerid][Geschlecht] = dini_Int(accFormat,"Geschlecht");
  1301.                     GivePlayerMoney(playerid,dini_Int(accFormat,"Geld"));
  1302.                     SetPlayerScore(playerid,dini_Int(accFormat,"Level"));
  1303.                     Spieler[playerid][eingeloggt] = 1;
  1304.                     SendClientMessage(playerid,COLOR_DGREEN,"Erfolgreich eingeloggt!");
  1305.                     SpawnPlayer(playerid);
  1306.                  }
  1307.                  else
  1308.                  {
  1309.                     ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte gebe dein Passwort ein","Login","Abbrechen");
  1310.                     GameTextForPlayer(playerid,"~r~Falsches Passwort~w~!!",3000,1);
  1311.  
  1312.                  
  1313.                  }
  1314.             }
  1315.             case DIALOG_REG:
  1316.             {
  1317.                 if(!strlen(inputtext))
  1318.                 {
  1319.                     ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte gebe dein gewĂ¼nschtes Passwort ein","Registrieren","Abbrechen");
  1320.                     return SendClientMessage(playerid,COLOR_RED,"Das Passwort ist zu kurz!");
  1321.                 }
  1322.                 dini_Create(accFormat);
  1323.                 dini_Set(accFormat,"Passwort",inputtext);
  1324.                 Spieler[playerid][eingeloggt] = 1;
  1325.                 SendClientMessage(playerid,COLOR_RED,"Account erfolgreich erstellt!");
  1326.                 GameTextForPlayer(playerid,"~b~Automatisch~n~~w~eingeloggt!",3000,1);
  1327.                 SpawnPlayer(playerid);
  1328.                 //====Register-Einstellungen====//
  1329.                 GivePlayerMoney(playerid,10000);
  1330.                 SetPlayerScore(playerid,1);
  1331.                 dini_IntSet(accFormat, "Admin", 0);
  1332.                 dini_IntSet(accFormat, "Geld", 10000);
  1333.                 dini_IntSet(accFormat, "Level", 1);
  1334.                 dini_IntSet(accFormat, "wanted", 0);
  1335.                 dini_IntSet(accFormat, "paydaytime", 0);
  1336.                 dini_IntSet(accFormat, "Fraktion", 0);
  1337.                 //===============================//
  1338.                 ShowPlayerDialog(playerid,DIALOG_SEX,DIALOG_STYLE_MSGBOX,"Geschlecht","Bitte wähle dein Geschlecht aus!","Männlich","Weiblich");
  1339.                 //ShowPlayerDialog(playerid,DIALOG_TUT,DIALOG_STYLE_MSGBOX,"Das Tutorial","Dies ist ein Reallife Server!\nBitte verhalte dich hier wie im echten Leben!\nWenn du gegen eine Regel verstĂ¶ĂŸt, und es jemand sieht\nKann er es melden!\nDie Regeln kannst du auf\nwww.gta-great.forumprofi.de\nnachlesen!\nAuf dem Server herrscht Rechtsfahr-Gebot!\nAn der Stadthalle wird kein DM betrieben!\nVielen Dank fĂ¼r die Aufmerksamkeit\nDas GTA-Great Team wĂ¼nscht euch viel SpaĂŸ!","SCHLIEĂŸEN","");
  1340.                 SpawnPlayer(playerid);
  1341.                 //=========TUTORIAL==============//
  1342.                 /*if(TutTime[playerid] >= 1)
  1343.                 {
  1344.                     TutTime[playerid] += 1;
  1345.                     if(TutTime[playerid] == 6)
  1346.                     {
  1347.                         ClearChatbox(playerid, 10);
  1348.                     }
  1349.                     if(TutTime[playerid] == 8)
  1350.                     {
  1351.                         SetPlayerPos(playerid,1466.2625,-1672.3363,14.0469);
  1352.                         SetPlayerCameraPos(playerid, 1477.1622,-1675.8163,14.0469);
  1353.                         SetPlayerCameraLookAt(playerid,1480.7998,-1764.6787,18.7958);
  1354.                         SetPlayerInterior(playerid, 0);
  1355.                         SetPlayerVirtualWorld(playerid, 0);
  1356.                        
  1357.                         SendClientMessage(playerid, COLOR_YELLOW, "|----------|GTA-Great|----------|");
  1358.                         SendClientMessage(playerid, COLOR_WHITE, "Das ist der GTA-Great Server!");
  1359.                         SendClientMessage(playerid, COLOR_WHITE, "Hier wird das echte Leben nachgespielt!");
  1360.                         SendClientMessage(playerid, COLOR_WHITE, "Bitte halte dich an die Regeln. /rules");
  1361.                         SendClientMessage(playerid, COLOR_WHITE, "Auf dem Server herrscht Rechtsfahr-Gebot!");
  1362.                         SendClientMessage(playerid, COLOR_WHITE, "Dir wird jetzt Schritt fĂ¼r Schritt erklärt");
  1363.                         SendClientMessage(playerid, COLOR_WHITE, "Wo was ist.");
  1364.                         }
  1365.                         else if(TutTime[playerid] == 20)
  1366.                         {
  1367.                             ClearChatbox(playerid, 10);
  1368.                             SetPlayerPos(playerid, 1466.2625,-1672.3363,14.0469); //Stadthalle
  1369.                             SetPlayerCameraPos(playerid, 1477.1622,-1675.8163,14.0469);
  1370.                             SetPlayerCameraLookAt(playerid, 1480.7998,-1764.6787,18.7958);
  1371.                             SetPlayerInterior(playerid, 0);
  1372.                             SendClientMessage(playerid, COLOR_YELLOW, "|----------|Die Stadthalle|----------|");
  1373.                             SendClientMessage(playerid, COLOR_WHITE, "Hier in der Stadthalle kannst du dir");
  1374.                             SendClientMessage(playerid, COLOR_WHITE, "Deinen Personalausweis beantragen und");
  1375.                             SendClientMessage(playerid, COLOR_WHITE, "Deinen Job abholen!");
  1376.                             SendClientMessage(playerid, COLOR_WHITE, "Zugleich ist es der Noob-Spawn");
  1377.                             SendClientMessage(playerid, COLOR_WHITE, "Das DM vor der Stadthalle ist verboten!");
  1378.                         }
  1379.                         else if(TutTime[playerid] == 20)
  1380.                         {
  1381.                             ClearChatbox(playerid, 10);
  1382.                             SetPlayerPos(playerid, 1466.2625,-1672.3363,14.0469); //LSPD
  1383.                             SetPlayerCameraPos(playerid, 1511.6055,-1675.3424,14.0469);
  1384.                             SetPlayerCameraLookAt(playerid, 1554.1162,-1675.8849,16.1953);
  1385.                             SetPlayerInterior(playerid, 0);
  1386.                             SendClientMessage(playerid, COLOR_YELLOW,"|----------|Die Polizei|----------|");
  1387.                             SendClientMessage(playerid, COLOR_WHITE,"Dies ist die Polizei von Los Santos!");
  1388.                             SendClientMessage(playerid, COLOR_WHITE,"Die Polizei sorgt dafĂ¼r, dass die Verbrecher");
  1389.                             SendClientMessage(playerid, COLOR_WHITE,"In das Gefängnis gelangen, und sorgen ebenfalls");
  1390.                             SendClientMessage(playerid, COLOR_WHITE,"DafĂ¼r, dass die StraĂŸe sauber bleibt und falls gedealt");
  1391.                             SendClientMessage(playerid, COLOR_WHITE,"Wird, trifft die Polizei auch sofort vor Ort ein!");
  1392.                         }
  1393.                         else if(TutTime[playerid] == 60)
  1394.                         {
  1395.                             ClearChatbox(playerid, 10);
  1396.                             SetPlayerPos(playerid,1468.3828,-1181.8523,23.8213);
  1397.                             SetPlayerCameraPos(playerid,1476.2017,-1168.5448,24.1063);
  1398.                             SetPlayerCameraLookAt(playerid,1458.6361,-1140.4772,24.0658);
  1399.                             SetPlayerInterior(playerid, 0);
  1400.                             SendClientMessage(playerid, COLOR_YELLOW, "|----------|ZIP|----------|");
  1401.                             SendClientMessage(playerid, COLOR_WHITE, "Das ZIP ist ein Kleidungsgeschäft");
  1402.                             SendClientMessage(playerid, COLOR_WHITE, "Es ist in der Nähe der Bank in Los Santos");
  1403.                             SendClientMessage(playerid, COLOR_WHITE, "Aufzufinden! Dort kannst du dir neue Kleidung kaufen!");
  1404.                         }
  1405.                         else if(TutTime[playerid] == 80)
  1406.                         {
  1407.                             ClearChatbox(playerid, 10);
  1408.                             SetPlayerPos(playerid, 1492.0797,-1059.7053,25.9922);
  1409.                             SetPlayerCameraPos(playerid, 1492.3223,-1047.1898,25.9922);
  1410.                             SetPlayerCameraLookAt(playerid, 1461.9125,-1012.6401,26.8438);
  1411.                             SetPlayerInterior(playerid, 0);
  1412.                             SendClientMessage(playerid, COLOR_YELLOW, "|----------|Die Bank|----------|");
  1413.                             SendClientMessage(playerid, COLOR_WHITE, "Dies ist die Bank in Los Santos!");
  1414.                             SendClientMessage(playerid, COLOR_WHITE, "Hier kannst du Geld Ă¼berweisen");
  1415.                             SendClientMessage(playerid, COLOR_WHITE, "Abheben oder anlegen!");
  1416.                             SendClientMessage(playerid, COLOR_WHITE, "Die Bank kannst du auĂŸerdem auch ausrauben!");
  1417.                         }
  1418.                         else if(TutTime[playerid] == 100)
  1419.                         {
  1420.                             ClearChatbox(playerid, 10);
  1421.                             SetPlayerPos(playerid, 1466.2625,-1672.3363,14.0469); //Stadthalle
  1422.                             SetPlayerCameraPos(playerid, 1477.1622,-1675.8163,14.0469);
  1423.                             SetPlayerCameraLookAt(playerid, 1480.7998,-1764.6787,18.7958);
  1424.                             SetPlayerInterior(playerid, 0);
  1425.                             SendClientMessage(playerid, COLOR_YELLOW, "|----------|Das Ende|----------|");
  1426.                             SendClientMessage(playerid, COLOR_WHITE, "Dies ist das Ende des Tutorials!");
  1427.                             SendClientMessage(playerid, COLOR_WHITE, "Wichtige Tipps & Infos findest du unter");
  1428.                             SendClientMessage(playerid, COLOR_WHITE, "www.gta-great.forumprofi.de");
  1429.                             SendClientMessage(playerid, COLOR_WHITE, "Wenn du Hilfe brauchst, schreibe einen Report");
  1430.                             SendClientMessage(playerid, COLOR_WHITE, "Per /report. Oder frag jemanden im OOC Chat /o");
  1431.                         }
  1432.                 //===============================//
  1433.                
  1434.                     }*/
  1435.                 }
  1436.             }
  1437.         }
  1438.         else
  1439.         {
  1440.             switch(dialogid)
  1441.             {
  1442.                 case DIALOG_LOGIN:ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte gebe dein Passwort ein","Login","Abbrechen");
  1443.                 case DIALOG_REG:ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte gebe dein gewĂ¼nschtes Passwort ein","Registrieren","Abbrechen");
  1444.             }
  1445.         }
  1446.            
  1447.        
  1448.     //Navi
  1449.     if(dialogid==navimenu)
  1450.     {
  1451.     if(response)
  1452.         {
  1453.         if(listitem==0) //Stadthalle
  1454.             {
  1455.                 SetPlayerCheckpoint(playerid,1481.6975,-1735.3652,13.3828,3.0);
  1456.             }
  1457.         if(listitem==1) //Bank
  1458.             {
  1459.                 SetPlayerCheckpoint(playerid,1462.5588,-1030.8309,23.6563,3.0);
  1460.             }
  1461.         }
  1462.     }
  1463.    
  1464.     if(dialogid==guidemenu)
  1465.     {
  1466.     if(response)
  1467.         {
  1468.         if(listitem==0) //Stadthalle
  1469.         {
  1470.             SetPlayerCheckpoint(playerid,1481.6975,-1735.3652,13.3828,3.0);
  1471.         }
  1472.         if(listitem==1) //Bank
  1473.         {
  1474.             SetPlayerCheckpoint(playerid,1462.5588,-1030.8309,23.6563,3.0);
  1475.         }
  1476.     }
  1477. }
  1478.  
  1479.     if(dialogid==DIALOG_SEX)
  1480.     {
  1481.         if(response==1)
  1482.         {
  1483.             SendClientMessage(playerid,COLOR_WHITE,"Du bist also Männlich!");
  1484.             SetPlayerSkin(playerid,19);
  1485.             dini_IntSet(accFormat, "Geschlecht", 1);
  1486.         }
  1487.         if(response==0)
  1488.         {
  1489.             SendClientMessage(playerid,COLOR_WHITE,"Du bist also Weiblich!");
  1490.             SetPlayerSkin(playerid, 12);
  1491.             dini_IntSet(accFormat, "Geschlecht", 0);
  1492.         }
  1493.     }
  1494.  
  1495.     if(dialogid==zipwechsel)
  1496.     {
  1497.     if(response)
  1498.         {
  1499.         if(listitem == 0) //Billige Kleidung 1 Mann
  1500.         {
  1501.             SetPlayerSkin(playerid,7);
  1502.         }
  1503.         if(listitem == 1) //Billige Kleidung 2 Mann
  1504.         {
  1505.             SetPlayerSkin(playerid,22);
  1506.         }
  1507.         if(listitem == 2) //Billige Kleidung 3 Frau
  1508.         {
  1509.             SetPlayerSkin(playerid,13);
  1510.         }
  1511.         if(listitem == 3) //Billige Kleidung 4 Frau
  1512.         {
  1513.             SetPlayerSkin(playerid,11);
  1514.         }
  1515.         if(listitem == 4) //Teure Kleidung 1 Mann
  1516.         {
  1517.             SetPlayerSkin(playerid,98);
  1518.         }
  1519.         if(listitem == 5) //Teure Kleidung 2 Mann
  1520.         {
  1521.             SetPlayerSkin(playerid,46);
  1522.         }
  1523.         if(listitem == 6) //Teure Kleidung 3 Frau
  1524.         {
  1525.             SetPlayerSkin(playerid,55);
  1526.         }
  1527.         if(listitem == 7) // Teure Kleidung 4 Frau
  1528.         {
  1529.             SetPlayerSkin(playerid,12);
  1530.         }
  1531.     }
  1532. }
  1533.  
  1534.  
  1535.     return 1;
  1536. }
  1537.  
  1538. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  1539. {
  1540.     return 1;
  1541. }
  1542.  
  1543. public Servernachricht()
  1544. {
  1545.     new rand = random(2);
  1546.     switch(rand)
  1547.     {
  1548.         case 0:
  1549.         {
  1550.             SendClientMessageToAll(COLOR_YELLOW,"|-------|Server-Nachricht|-------|");
  1551.             SendClientMessageToAll(COLOR_WHITE,"Auf diesem Server wird nicht gehackt!!");
  1552.             SendClientMessageToAll(COLOR_WHITE,"Wenn ein Hacker erwischt wird, gibt es einen Permanenten Bann!");
  1553.             SendClientMessageToAll(COLOR_WHITE,"Also lest euch bitte die Regeln durch. /rules");
  1554.             SendClientMessageToAll(COLOR_WHITE,"Euer GTA-Great Team");
  1555.             SendClientMessageToAll(COLOR_YELLOW,"|--------------------------------|");
  1556.         }
  1557.         case 1:
  1558.         {
  1559.             SendClientMessageToAll(COLOR_YELLOW,"|-------|Server-Nachricht|-------|");
  1560.             SendClientMessageToAll(COLOR_WHITE,"Wenn du eine Frage an einen Admin hast, dann benutze /report");
  1561.             SendClientMessageToAll(COLOR_WHITE,"Oder besuche unser Forum unter");
  1562.             SendClientMessageToAll(COLOR_WHITE,"www.forum-adresse.de");
  1563.             SendClientMessageToAll(COLOR_WHITE,"Wir haben auch einen TeamSpeak Server.");
  1564.             SendClientMessageToAll(COLOR_WHITE,"teamspeakip:port");
  1565.             SendClientMessageToAll(COLOR_YELLOW,"|--------------------------------|");
  1566.         }
  1567.         case 2:
  1568.         {
  1569.             SendClientMessageToAll(COLOR_YELLOW,"|-------|Server-Nachricht|-------|");
  1570.             SendClientMessageToAll(COLOR_WHITE,"Dies ist ein Reallife Server, Sinnloses DM ist verboten!");
  1571.             SendClientMessageToAll(COLOR_WHITE,"Wenn du auf DM aus bist, kannst du auf einen DM Server gehen!");
  1572.             SendClientMessageToAll(COLOR_WHITE,"Wenn du jemanden siehst, der Sinnloses DM begeht, dann melde es einem Admin!");
  1573.             SendClientMessageToAll(COLOR_YELLOW,"|--------------------------------|");
  1574.         }
  1575.     }
  1576.     return 1;
  1577. }
  1578.  
  1579. public SetPlayerSpawn(playerid)
  1580. {
  1581.         if(IsPlayerConnected(playerid))
  1582.         {
  1583.             if(PlayerInfo[playerid][pTot] == 1)
  1584.             {
  1585.                 SendClientMessage(playerid,COLOR_DRED,"Du bist schwer verletzt ins Krankenhaus gebracht wurden!");
  1586.                 SendClientMessage(playerid,COLOR_DRED,"Du hast $200 verloren");
  1587.                 GameTextForPlayer(playerid,"-----------~n~~g~Krankenhaus~n~~r~200$\n-----------",4000,3);
  1588.                 TogglePlayerControllable(playerid, 0);
  1589.                 GivePlayerMoney(playerid,-200);
  1590.                 ResetPlayerWeapons(playerid);
  1591.                 SetPlayerPos(playerid,1149.4829,-1344.2615,13.2547);
  1592.                 SetPlayerCameraPos(playerid,1149.4829,-1344.2615,13.2547);
  1593.                 SetPlayerCameraLookAt(playerid,1172.1309,-1323.5834,31.4652);
  1594.                 SetPlayerInterior(playerid, 0);
  1595.                 return 1;
  1596.             }
  1597.         }
  1598.  
  1599.         return 1;
  1600. }
  1601.  
  1602. public TOTTimer()
  1603. {
  1604.     for(new i=0; i<MAX_PLAYERS; i++)
  1605.     {
  1606.         if(IsPlayerConnected(i))
  1607.         {
  1608.             if(PlayerInfo[i][pTot] == 1)
  1609.             {
  1610.                 pIstTot[i] += 1;
  1611.             }
  1612.             if(PlayerInfo[i][pTot] == 1 && pIstTot[i] == 2)//die 8 ändern in die anzahl der minuten die ihr im KH sein wollt
  1613.             {
  1614.                 PlayerInfo[i][pTot] = 0;
  1615.                 pIstTot[i] = 0;
  1616.                 SetPlayerVirtualWorld(i,0);
  1617.                 SetPlayerSpawn(i);
  1618.                 SpawnPlayer(i);
  1619.                 SendClientMessage(i, COLOR_DRED, "Du bist aus dem Krankenhaus entlassen!");
  1620.                 DestroyPickup(TotenKopf[i]);
  1621.             }
  1622.         }
  1623.     }
  1624. }
  1625.  
  1626.  
  1627. //-----------------strget---------------
  1628. stock strget(strx[], pos, search = ' ') {
  1629.     new arg, ret[128], idxx;
  1630.     for (new i = 0; i < strlen(strx); i++) {
  1631.         if(strx[i] == search || i == strlen(strx) || strx[i + 1] == 10) {
  1632.             arg++;
  1633.             if (arg == pos + 1){
  1634.                 ret[i-idxx] = EOS;
  1635.                 return ret;
  1636.             } else if (arg == pos)
  1637.                 idxx= i+1;
  1638.         }
  1639.         else if (arg == pos)
  1640.                 ret[i - idxx] = strx[i];
  1641.     }
  1642.     return ret;
  1643. }
  1644.  
  1645. //------------------strtok------------
  1646.  
  1647. stock strtok(const string[], &index,seperator=' ') {
  1648.     new length = strlen(string);
  1649.     new offset = index;
  1650.     new result[255];
  1651.     while ((index < length) && (string[index] != seperator) && ((index - offset) < (sizeof(result) - 1)))
  1652.     {
  1653.         result[index - offset] = string[index];
  1654.         index++;
  1655.     }
  1656.  
  1657.     result[index - offset] = EOS;
  1658.     if ((index < length) && (string[index] == seperator))
  1659.     {
  1660.         index++;
  1661.     }
  1662.     return result;
  1663. }
  1664.  
  1665. /*stock ProxDetector(Float:radi, playerid, string[],color)
  1666. {
  1667.     new Float:x,Float:y,Float:z;
  1668.     GetPlayerPos(playerid,x,y,z);
  1669.     for(new player;player<MAX_PLAYERS;player++)
  1670.     {
  1671.         if(!IsPlayerConnected(playerid))continue;
  1672.         if(IsPlayerInRangeOfPoint(playerid,radi,x,y,z))SendClientMessage(player,color,string);
  1673.     }
  1674. }*/
  1675.  
  1676. public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  1677. {
  1678.         new Float:posx, Float:posy, Float:posz;
  1679.         new Float:oldposx, Float:oldposy, Float:oldposz;
  1680.         new Float:tempposx, Float:tempposy, Float:tempposz;
  1681.         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  1682.         for(new i = 0; i < MAX_PLAYERS; i++)
  1683.         {
  1684.             if(IsPlayerConnected(i))
  1685.             {
  1686.                     GetPlayerPos(i, posx, posy, posz);
  1687.                     tempposx = (oldposx -posx);
  1688.                     tempposy = (oldposy -posy);
  1689.                     tempposz = (oldposz -posz);
  1690.                     if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  1691.                     {
  1692.                         SendClientMessage(i, col1, string);
  1693.                     }
  1694.                     else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  1695.                     {
  1696.                         SendClientMessage(i, col2, string);
  1697.                     }
  1698.                     else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  1699.                     {
  1700.                         SendClientMessage(i, col3, string);
  1701.                     }
  1702.                     else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  1703.                     {
  1704.                         SendClientMessage(i, col4, string);
  1705.                     }
  1706.                     else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  1707.                     {
  1708.                         SendClientMessage(i, col5, string);
  1709.                     }
  1710.             }
  1711.         }
  1712.         return 1;
  1713. }
  1714.  
  1715. ReturnUser(string[])
  1716. {
  1717.   new IsNumerical=1;
  1718.   new tmpstring[MAX_PLAYER_NAME];
  1719.   for(new cell; cell < strlen(string); cell++) if((string[cell]<='0') || (string[cell]>='9'))IsNumerical=0;
  1720.   if(IsNumerical)return strval(string);
  1721.   else
  1722.   {
  1723.     for(new players; players < MAX_PLAYERS; players++)
  1724.     {
  1725.       GetPlayerName(players,tmpstring,sizeof(tmpstring));
  1726.       if(strfind(tmpstring,string,true)>-1)return players;
  1727.     }
  1728.   }
  1729.   return INVALID_PLAYER_ID;
  1730. }
  1731.  
  1732. public Wetter()
  1733. {
  1734.     //Wetter 0 = LS, Wetter 1 = SF, Wetter 2 = LV
  1735.     Weather[0] = WetterRandomLS[random(sizeof(WetterRandomLS))];
  1736.     Weather[1] = WetterRandomSF[random(sizeof(WetterRandomSF))];
  1737.     Weather[2] = WetterRandomLV[random(sizeof(WetterRandomLV))];
  1738. }
  1739.  
  1740.  
  1741. public SetWetter()
  1742. {
  1743.     new Float:xx, Float:yy, Float:zz;
  1744.     for(new i=0; i< GetMaxPlayers(); i++)
  1745.     {
  1746.         if(IsPlayerConnected(i))
  1747.         {
  1748.             GetPlayerPos(i, xx, yy, zz);
  1749.             if((xx > -992.5172 && xx < 4000.0000) && (yy < 528.0000 && yy > -4000.0000)) //Los Santos
  1750.             {
  1751.                 SetPlayerWeather(i, Weather[0]);
  1752.                 //Los Santos
  1753.             }
  1754.             if((xx > -4000.0000 && xx< -992.5172) && (yy < 4000.0000 && yy > -4000.0000)) //San Fierro
  1755.             {
  1756.                 SetPlayerWeather(i, Weather[1]);
  1757.                 //San Fierro
  1758.             }
  1759.             if((xx > -992.5172 && xx< 4000.0000) && (yy < 4000.0000 && yy > 528.0000)) //Las Venturas
  1760.             {
  1761.                 SetPlayerWeather(i, Weather[2]);
  1762.                 //Las Venturas
  1763.             }
  1764.         }
  1765.     }
  1766.     return 1;
  1767. }
  1768.  
  1769. dcmd_setstat(playerid, params[])
  1770. {
  1771.     if(Spieler[playerid][Admin] < 3) return SendClientMessage(playerid,COLOR_GREY,"Du bist kein Admin!");
  1772.     new pID,stat,amount;
  1773.     if(sscanf(params,"uii",pID,stat,amount))
  1774.     {
  1775.     SendClientMessage(playerid, COLOR_WHITE, "Benutze: /setstat [playerid] [statcode] [Betrag]");
  1776.     SendClientMessage(playerid, COLOR_WHITE, "|1 = Level | 2 = Admin Level | 3 = Geld");
  1777.     return 1;
  1778.     }
  1779.     new name[30],ziel[30],string[128];
  1780.     GetPlayerName(playerid, name, sizeof name);
  1781.     GetPlayerName(pID, ziel, sizeof ziel);
  1782.     if(!IsPlayerConnected(pID) || pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Diesen Spieler gibt es nicht!");
  1783.     switch(stat)
  1784.     {
  1785.         case 1:
  1786.         {
  1787.              Spieler[pID][Level] = amount;
  1788.              format(string, sizeof(string), "Der Spieler wurde auf Level %d gesetzt", amount);
  1789.              SendClientMessage(playerid, COLOR_GREY, string);
  1790.         }
  1791.         case 2:
  1792.         {
  1793.             Spieler[pID][Admin] = amount;
  1794.             format(string, sizeof(string), " Der Spieler wurde auf Admin Level %d gesetzt", amount);
  1795.             SendClientMessage(playerid, COLOR_GREY, string);
  1796.         }
  1797.         case 3:
  1798.         {
  1799.             Spieler[pID][Geld] = amount;
  1800.             format(string, sizeof(string), " Das Geld des Spielers wurde auf %d gesetzt", amount);
  1801.             SendClientMessage(playerid, COLOR_GREY, string);
  1802.         }
  1803.         default:
  1804.         {
  1805.             SendClientMessage(playerid,COLOR_GREY,"FEHLER: UngĂ¼ltiger Statcode!");
  1806.         }
  1807.     }
  1808.     return 1;
  1809. }
  1810.  
  1811.  
  1812. /*----------------------------------------------------------------------------*-
  1813. Function:
  1814.     sscanf
  1815. Params:
  1816.     string[] - String to extract parameters from.
  1817.     format[] - Parameter types to get.
  1818.     {Float,_}:... - Data return variables.
  1819. Return:
  1820.     0 - Successful, not 0 - fail.
  1821. Notes:
  1822.     A fail is either insufficient variables to store the data or insufficient
  1823.     data for the format string - excess data is disgarded.
  1824.  
  1825.     A string in the middle of the input data is extracted as a single word, a
  1826.     string at the end of the data collects all remaining text.
  1827.  
  1828.     The format codes are:
  1829.  
  1830.     c - A character.
  1831.     d, i - An integer.
  1832.     h, x - A hex number (e.g. a colour).
  1833.     f - A float.
  1834.     s - A string.
  1835.     z - An optional string.
  1836.     pX - An additional delimiter where X is another character.
  1837.     '' - Encloses a litteral string to locate.
  1838.     u - User, takes a name, part of a name or an id and returns the id if they're connected.
  1839.  
  1840.     Now has IsNumeric integrated into the code.
  1841.  
  1842.     Added additional delimiters in the form of all whitespace and an
  1843.     optioanlly specified one in the format string.
  1844. -*----------------------------------------------------------------------------*/
  1845.  
  1846. stock sscanf(string[], format[], {Float,_}:...)
  1847. {
  1848.     #if defined isnull
  1849.         if (isnull(string))
  1850.     #else
  1851.         if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
  1852.     #endif
  1853.         {
  1854.             return format[0];
  1855.         }
  1856.     #pragma tabsize 4
  1857.     new
  1858.         formatPos = 0,
  1859.         stringPos = 0,
  1860.         paramPos = 2,
  1861.         paramCount = numargs(),
  1862.         delim = ' ';
  1863.     while (string[stringPos] && string[stringPos] <= ' ')
  1864.     {
  1865.         stringPos++;
  1866.     }
  1867.     while (paramPos < paramCount && string[stringPos])
  1868.     {
  1869.         switch (format[formatPos++])
  1870.         {
  1871.             case '\0':
  1872.             {
  1873.                 return 0;
  1874.             }
  1875.             case 'i', 'd':
  1876.             {
  1877.                 new
  1878.                     neg = 1,
  1879.                     num = 0,
  1880.                     ch = string[stringPos];
  1881.                 if (ch == '-')
  1882.                 {
  1883.                     neg = -1;
  1884.                     ch = string[++stringPos];
  1885.                 }
  1886.                 do
  1887.                 {
  1888.                     stringPos++;
  1889.                     if ('0' <= ch <= '9')
  1890.                     {
  1891.                         num = (num * 10) + (ch - '0');
  1892.                     }
  1893.                     else
  1894.                     {
  1895.                         return -1;
  1896.                     }
  1897.                 }
  1898.                 while ((ch = string[stringPos]) > ' ' && ch != delim);
  1899.                 setarg(paramPos, 0, num * neg);
  1900.             }
  1901.             case 'h', 'x':
  1902.             {
  1903.                 new
  1904.                     num = 0,
  1905.                     ch = string[stringPos];
  1906.                 do
  1907.                 {
  1908.                     stringPos++;
  1909.                     switch (ch)
  1910.                     {
  1911.                         case 'x', 'X':
  1912.                         {
  1913.                             num = 0;
  1914.                             continue;
  1915.                         }
  1916.                         case '0' .. '9':
  1917.                         {
  1918.                             num = (num << 4) | (ch - '0');
  1919.                         }
  1920.                         case 'a' .. 'f':
  1921.                         {
  1922.                             num = (num << 4) | (ch - ('a' - 10));
  1923.                         }
  1924.                         case 'A' .. 'F':
  1925.                         {
  1926.                             num = (num << 4) | (ch - ('A' - 10));
  1927.                         }
  1928.                         default:
  1929.                         {
  1930.                             return -1;
  1931.                         }
  1932.                     }
  1933.                 }
  1934.                 while ((ch = string[stringPos]) > ' ' && ch != delim);
  1935.                 setarg(paramPos, 0, num);
  1936.             }
  1937.             case 'c':
  1938.             {
  1939.                 setarg(paramPos, 0, string[stringPos++]);
  1940.             }
  1941.             case 'f':
  1942.             {
  1943.  
  1944.                 new changestr[16], changepos = 0, strpos = stringPos;
  1945.                 while(changepos < 16 && string[strpos] && string[strpos] != delim)
  1946.                 {
  1947.                     changestr[changepos++] = string[strpos++];
  1948.                     }
  1949.                 changestr[changepos] = '\0';
  1950.                 setarg(paramPos,0,_:floatstr(changestr));
  1951.             }
  1952.             case 'p':
  1953.             {
  1954.                 delim = format[formatPos++];
  1955.                 continue;
  1956.             }
  1957.             case '\'':
  1958.             {
  1959.                 new
  1960.                     end = formatPos - 1,
  1961.                     ch;
  1962.                 while ((ch = format[++end]) && ch != '\'') {}
  1963.                 if (!ch)
  1964.                 {
  1965.                     return -1;
  1966.                 }
  1967.                 format[end] = '\0';
  1968.                 if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
  1969.                 {
  1970.                     if (format[end + 1])
  1971.                     {
  1972.                         return -1;
  1973.                     }
  1974.                     return 0;
  1975.                 }
  1976.                 format[end] = '\'';
  1977.                 stringPos = ch + (end - formatPos);
  1978.                 formatPos = end + 1;
  1979.             }
  1980.             case 'u':
  1981.             {
  1982.                 new
  1983.                     end = stringPos - 1,
  1984.                     id = 0,
  1985.                     bool:num = true,
  1986.                     ch;
  1987.                 while ((ch = string[++end]) && ch != delim)
  1988.                 {
  1989.                     if (num)
  1990.                     {
  1991.                         if ('0' <= ch <= '9')
  1992.                         {
  1993.                             id = (id * 10) + (ch - '0');
  1994.                         }
  1995.                         else
  1996.                         {
  1997.                             num = false;
  1998.                         }
  1999.                     }
  2000.                 }
  2001.                 if (num && IsPlayerConnected(id))
  2002.                 {
  2003.                     setarg(paramPos, 0, id);
  2004.                 }
  2005.                 else
  2006.                 {
  2007.                     #if !defined foreach
  2008.                         #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
  2009.                         #define __SSCANF_FOREACH__
  2010.                     #endif
  2011.                     string[end] = '\0';
  2012.                     num = false;
  2013.                     new
  2014.                         name[MAX_PLAYER_NAME];
  2015.                     id = end - stringPos;
  2016.                     foreach (Player, playerid)
  2017.                     {
  2018.                         GetPlayerName(playerid, name, sizeof (name));
  2019.                         if (!strcmp(name, string[stringPos], true, id))
  2020.                         {
  2021.                             setarg(paramPos, 0, playerid);
  2022.                             num = true;
  2023.                             break;
  2024.                         }
  2025.                     }
  2026.                     if (!num)
  2027.                     {
  2028.                         setarg(paramPos, 0, INVALID_PLAYER_ID);
  2029.                     }
  2030.                     string[end] = ch;
  2031.                     #if defined __SSCANF_FOREACH__
  2032.                         #undef foreach
  2033.                         #undef __SSCANF_FOREACH__
  2034.                     #endif
  2035.                 }
  2036.                 stringPos = end;
  2037.             }
  2038.             case 's', 'z':
  2039.             {
  2040.                 new
  2041.                     i = 0,
  2042.                     ch;
  2043.                 if (format[formatPos])
  2044.                 {
  2045.                     while ((ch = string[stringPos++]) && ch != delim)
  2046.                     {
  2047.                         setarg(paramPos, i++, ch);
  2048.                     }
  2049.                     if (!i)
  2050.                     {
  2051.                         return -1;
  2052.                     }
  2053.                 }
  2054.                 else
  2055.                 {
  2056.                     while ((ch = string[stringPos++]))
  2057.                     {
  2058.                         setarg(paramPos, i++, ch);
  2059.                     }
  2060.                 }
  2061.                 stringPos--;
  2062.                 setarg(paramPos, i, '\0');
  2063.             }
  2064.             default:
  2065.             {
  2066.                 continue;
  2067.             }
  2068.         }
  2069.         while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
  2070.         {
  2071.             stringPos++;
  2072.         }
  2073.         while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
  2074.         {
  2075.             stringPos++;
  2076.         }
  2077.         paramPos++;
  2078.     }
  2079.     do
  2080.     {
  2081.         if ((delim = format[formatPos++]) > ' ')
  2082.         {
  2083.             if (delim == '\'')
  2084.             {
  2085.                 while ((delim = format[formatPos++]) && delim != '\'') {}
  2086.             }
  2087.             else if (delim != 'z')
  2088.             {
  2089.                 return delim;
  2090.             }
  2091.         }
  2092.     }
  2093.     while (delim > ' ');
  2094.     return 0;
  2095. }
  2096.  
  2097. public ClearChatbox(playerid, lines)
  2098. {
  2099. if (IsPlayerConnected(playerid))
  2100. {
  2101.     for (new i=0; i<MAX_PLAYERS; i++)
  2102.     {
  2103.         SendClientMessage(playerid, COLOR_FADE1, " ");
  2104.     }
  2105. }
  2106. return 1;
  2107. }
  2108.  
  2109. public PolizeiFahrzeug(vehicleid)
  2110. {
  2111. for (new i = 0; i < sizeof(PolizeiFahrzeuge); i++)
  2112. {
  2113. if(vehicleid== PolizeiFahrzeuge[i])
  2114. {
  2115. return 1;
  2116. }
  2117. }
  2118. return 0;
  2119. }
  2120.  
  2121. stock UnFreezePlayer(playerid)
  2122. {
  2123.     TogglePlayerControllable(playerid, 1);
  2124. }
  2125. stock FreezePlayer(playerid)
  2126. {
  2127.     TogglePlayerControllable(playerid, 0);
  2128. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement