Guest User

Untitled

a guest
Jul 28th, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 157.22 KB | None | 0 0
  1. stock StopShow()
  2. {
  3.     foreach(Player, i)
  4.     {
  5.         if(GetPVarInt(i, "InDerShow") == 1)
  6.         {
  7.             SetPlayerPos(i,1210.5896,3.5140,1000.9219);
  8.             SetPlayerFacingAngle(i,171.8069);
  9.             SetPlayerHealth(i,100.0);
  10.             ClearChat(i);
  11.             SendClientMessage(i,COLOR_YELLOW,"Nach der Vorführung fühlst du dich sehr erholt du strahlst vor Glück.");
  12.             SendClientMessage(i,COLOR_YELLOW,"Deine Lebensenergie ist wieder auf 100 angestiegen.");
  13.             RefreshPlayerNachShow(i); //Zeile 22458
  14.             PrivateStatus = 0;
  15.         }
  16.     }
  17. }
  18.  
  19. stock InitPlayerConnection(playerid)
  20. {
  21.     ResetPlayerVariables(playerid);
  22.     IsLogged[playerid] = 0;
  23.     new file[128], string[460];
  24.     format(file,sizeof(file),"Spieler/%s.txt",GetName(playerid));
  25.    
  26.     if(!fexist(file))
  27.     {
  28.         ClearChat(playerid);
  29.         ShowPlayerDialog(playerid, DIALOG_WELCOME1, DIALOG_STYLE_MSGBOX, "Authentifizierung", "{FFFFFF}Herzlich Willkommen auf dem {FFD700}Dark-Trigardon Reloaded Reallife Server.{FFFFFF}\num auf diesem Server spielen zu können benötigst du einen Account.\nMöchtest du einen erstellen?", "Ja","");
  30.     }
  31.     if(fexist(file))
  32.     {
  33.         format(file,sizeof(file),"Spieler/%s.txt",GetName(playerid));
  34.         INI_ParseFile(file, "LoadUser", false, true, playerid, true, false );
  35.         ClearChat(playerid);
  36.         format(string, sizeof(string),"{FFFFFF}Willkommen zurück {FFD700}%s{FFFFFF},\n\nBitte gebe dein Passwort ein um dich zu authentifizieren.",GetName(playerid));
  37.         ShowPlayerDialog(playerid,1, DIALOG_STYLE_INPUT,"Authentifizierung",string, "Login", "");
  38.         SendClientMessage(playerid, COLOR_WHITE, "Dein Account wurde gefunden. Bitte gebe dein Passwort ein um dich anzumelden.");
  39.         SendClientMessage(playerid, COLOR_WHITE, "");
  40.         }
  41.         return 1;
  42. }
  43.  
  44. /*stock SavePlayerAccount(playerid)
  45. {
  46.     if(IsPlayerNPC(playerid)) return 1;
  47.     if(GetPVarInt(playerid, "Authentication") == 1)
  48.     {
  49.         format(Query, sizeof(Query), "UPDATE `accounts` SET `AdminLevel` = %d, `Money` = %d, `Score` = %d, `Skin` = %d,`Wetter` = %d,`Warns` = %d, `Cars` = %d WHERE `Username` = '%s'", pStats[playerid][pAdminLevel], GetPlayerEuros(playerid), GetPlayerScore(playerid), GetPlayerSkin(playerid),pStats[playerid][pWetter],pStats[playerid][pWarns],pStats[playerid][pCars], GetEscName(playerid));
  50.         mysql_query(Query);
  51.  
  52.         GetPlayerHealth(playerid, pStats[playerid][pHealth]);
  53.         GetPlayerArmour(playerid, pStats[playerid][pArmour]);
  54.         GetPlayerPos(playerid, pStats[playerid][pPosX], pStats[playerid][pPosY], pStats[playerid][pPosZ]);
  55.         format(Query, sizeof(Query), "UPDATE `accounts` SET `Health` = %f, `Armour` = %f, `PositionX` = %f, `PositionY` = %f, `PositionZ` = %f,`Tutorial` = %d, `tnews` = '%d', `Handy` = '%d',`Guthaben` = '%d',`Vertrag` = '%d',`GPS` = '%d',`Akku` = '%d',`RingTone` = '%d',`Premium` = '%d',`Number` = %i,`TelefonBuch` = '%d',`PremiumTage` = '%d',`Helm` = '%d',`Haus` = '%d',`Karte` = '%d',`pKonto` = '%d',`Spunkte` = '%d',`SPunkteb` = '%d',`Pin` = '%d',`mob` = '%d',`Sap` = '%d' WHERE `Username` = '%s'"
  56.         ,pStats[playerid][pHealth], pStats[playerid][pArmour], pStats[playerid][pPosX], pStats[playerid][pPosY], pStats[playerid][pPosZ],pStats[playerid][pTutorial],pStats[playerid][ptnews],pStats[playerid][pHandy],pStats[playerid][pGuthaben],pStats[playerid][pVertrag],pStats[playerid][pGPS],pStats[playerid][pAkku],pStats[playerid][pRingTone],pStats[playerid][pPremium],pStats[playerid][pnumber],pStats[playerid][pTelefonBuch],pStats[playerid][pPremiumTage],
  57.         pStats[playerid][pHelm],pStats[playerid][pHaus],pStats[playerid][pKarte],pStats[playerid][pKonto],pStats[playerid][pSpunkte],pStats[playerid][pSpunkteb],pStats[playerid][pPin],pStats[playerid][pMob],pStats[playerid][pSap],pStats[playerid][pCars], GetEscName(playerid));
  58.         mysql_query(Query);
  59.  
  60.         GetPlayerIp(playerid, pStats[playerid][pIPAddress], 17);
  61.         format(Query, sizeof(Query), "UPDATE `accounts` SET `IP Address` = '%s', `Kills` = %d, `Deaths` = %d, `Logins` = %d, `Personalausweis` = %d, `Member` = %d, `Age` = %d,`Sex` = %d,`Job` = %d,`Supportsperre` = %d,`Arbeitslosengeld` = %d,`Level` = %d,`Quest` = %d,`Leader` = %d,`Rank` = %d,`Wanted` = %d,`Jailed` = %d,`JailTime` = %d,`CarLic` = %d,`Pdeaths` = %d,`Pkills` = %d,`Ppunkte` = %d,`Ppwaffe` = %d,`NewsSkill` = %d,`PM Status` = %d WHERE `Username` = '%s'",
  62.         pStats[playerid][pIPAddress], pStats[playerid][pKills], pStats[playerid][pDeaths], pStats[playerid][pLogins],pStats[playerid][pPersonalausweis],pStats[playerid][pMember],pStats[playerid][pAge],pStats[playerid][pSex],pStats[playerid][pJob],pStats[playerid][pSupportsperre],pStats[playerid][pArbeitslosengeld],pStats[playerid][pLevel],
  63.         pStats[playerid][pQuest],pStats[playerid][pLeader],pStats[playerid][pRank],pStats[playerid][pWanted],pStats[playerid][pJailed],pStats[playerid][pJailTime],pStats[playerid][pCarLic],pStats[playerid][pPdeaths],pStats[playerid][pPkills],pStats[playerid][pPpunkte],pStats[playerid][pPwaffe],pStats[playerid][pNewsSkill],
  64.         pStats[playerid][pPMStatus], GetEscName(playerid));
  65.  
  66.         mysql_query(Query);
  67.  
  68.     }
  69.     else print("[MySQL ERROR] SavePlayerAccount() was called, but to a non-connected ID.");
  70.     return 1;
  71. }*/
  72.  
  73. /*stock LoadAccountVariables(playerid)
  74. {
  75.     if(IsPlayerNPC(playerid)) return 1;
  76.     new EscapedName[MAX_PLAYER_NAME];
  77.     if(GetPVarInt(playerid, "Authentication") == 1)
  78.     {
  79.         mysql_real_escape_string(GetName(playerid), EscapedName);
  80.         format(Query, sizeof(Query), "SELECT * FROM `accounts` WHERE `Username` = '%s'", EscapedName);
  81.         mysql_query(Query);
  82.         mysql_store_result();
  83.  
  84.         mysql_fetch_row_format(Query, "|");
  85.         sscanf(Query, "e<p<|>s[24]s[129]s[64]s[129]s[17]ddddfffffdddddddddddddddddddddddddddddddddddddddddddddddds[128]s[128]s[128]>", pStats[playerid]);
  86.     }
  87.     else print("[MySQL ERROR] LoadAccountVariables() was called, but to a non-connected ID.");
  88.     mysql_free_result();
  89. }
  90.  
  91. stock GetFromAccount(username[], obtaining[], holdingvar[])
  92. {
  93.     format(Query, sizeof(Query), "SELECT `%s` FROM `accounts` WHERE `Username` = '%s'", obtaining, username);
  94.     mysql_query(Query);
  95.     mysql_store_result();
  96.  
  97.     if(mysql_fetch_row(holdingvar) == 1)
  98.     {
  99.         mysql_free_result();
  100.     }
  101.     return 1;
  102. }*/
  103.  
  104. // --------------------------------------------------------------------- //
  105.  
  106. stock LoadVehiclesFromDatabase()
  107. {
  108.     new Str[67], dModel, Float:VX, Float:VY, Float:VZ, Float:VA,FraktionsID,ScheinID,Farbe1, Farbe2 ,vTotal;
  109.     mysql_query("SELECT * FROM `vehicles`");
  110.     mysql_store_result();
  111.     vTotal = mysql_num_rows();
  112.     if(vTotal > 0)
  113.     {
  114.         while(mysql_fetch_row(Str))
  115.         {
  116.             sscanf(Str, "p<|>iffffiiii", dModel, VX, VY, VZ, VA,FraktionsID,ScheinID,Farbe1, Farbe2);
  117.             CreateServerVehicle(0,dModel,VX,VY,VZ,VA,Farbe1,Farbe2,FraktionsID,ScheinID);
  118.         }
  119.     }
  120.     mysql_free_result();
  121.     printf("** Es wurden %i Fahrzeuge erfolgreich aus der Datenbank geladen **", vTotal);
  122.     return 1;
  123. }
  124.  
  125. stock SaveVehiclesToDatabase(Float:VX, Float:VY, Float:VZ, Float:VA, dModel, FraktionsID , ScheinID, Farbe1, Farbe2)
  126. {
  127.  
  128.     format(Query, sizeof(Query), "INSERT INTO `vehicles` (VehicleModel, VehicleX, VehicleY, VehicleZ, VehicleAngle, FraktionsID, ScheinID, Farbe1, Farbe2) VALUES(%d, %f, %f, %f, %f,%d,%d,%d,%d)",
  129.     dModel, VX, VY, VZ, VA,FraktionsID,ScheinID,Farbe1,Farbe2);
  130.  
  131.     mysql_query(Query);
  132.     mysql_free_result();
  133.     return 1;
  134. }
  135.  
  136. stock SaveBlitzerToDatabase(Float:VX, Float:VY, Float:VZ, Float:VA,Range,Speed)
  137. {
  138.  
  139.     format(Query, sizeof(Query), "INSERT INTO `Blitzer` (BlitzerX, BlitzerY, BlitzerZ, BlitzerA, BlitzerRange, BlitzerSpeed) VALUES(%f, %f, %f, %f,%d,%d)",
  140.     VX, VY, VZ, VA,Range,Speed);
  141.  
  142.     mysql_query(Query);
  143.     mysql_free_result();
  144.     return 1;
  145. }
  146.  
  147. stock LoadBlitzerFromDatabase()
  148. {
  149.     new Strr[67], Float:BX, Float:BY, Float:BZ, Fload:BA,Range,Speed,ATMS;
  150.     mysql_query("SELECT * FROM `blitzer`");
  151.     mysql_store_result();
  152.     ATMS = mysql_num_rows();
  153.     if(ATMS > 0)
  154.     {
  155.         while(mysql_fetch_row(Strr))
  156.         {
  157.             sscanf(Strr, "p<|>ffffii", BX, BY, BZ,BA,Range,Speed); //Zeile 22602
  158.             CreateSpeedCam(BX,BY,BZ,BA,Range,Speed,0); //Zeile 22603
  159.             }
  160.     }
  161.     mysql_free_result();
  162.     printf("** Es wurden %i Blitzer erfolgreich aus der Datenbank geladen **", ATMS);
  163.     return 1;
  164. }
  165.  
  166. stock SaveATMToDatabase(Float:VX, Float:VY, Float:VZ)
  167. {
  168.     new Query[200];
  169.  
  170.     format(Query, sizeof(Query), "INSERT INTO `ATM` (ATMX, ATMY, ATMZ) VALUES(%f, %f, %f)",
  171.     VX, VY, VZ);
  172.  
  173.     mysql_query(Query);
  174.     mysql_free_result();
  175.     return 1;
  176. }
  177.  
  178. stock LoadATMFromDatabase()
  179. {
  180.     new Str[67], Float:ATMX, Float:ATMY, Float:ATMZ, ATMS;
  181.     mysql_query("SELECT * FROM `atm`");
  182.     mysql_store_result();
  183.     ATMS = mysql_num_rows();
  184.     if(ATMS > 0)
  185.     {
  186.         while(mysql_fetch_row(Str))
  187.         {
  188.             sscanf(Str, "p<|>fff", ATMX, ATMY, ATMZ);
  189.             AddATM(2942,ATMX,ATMY,ATMZ-0.36,0.0000,0.0000,270.0000, -1, -1, -1, 120);
  190.             CreateDynamicObject(2942,ATMX,ATMY,ATMZ-0.36,0.0000,0.0000,270.0000, -1, -1, -1, 120);
  191.         }
  192.     }
  193.     mysql_free_result();
  194.     printf("** Es wurden %i ATM Automaten erfolgreich aus der Datenbank geladen **", ATMS);
  195.     return 1;
  196. }
  197.  
  198. stock LoadTicketsFromDatabase(playerid)
  199. {
  200.     new Str[67], Ersteller, IP, inputtext, tickets;
  201.     mysql_query("SELECT * FROM `tickets`");
  202.     mysql_store_result();
  203.     tickets = mysql_num_rows();
  204.     if(tickets > 0)
  205.     {
  206.         while(mysql_fetch_row(Str))
  207.         {
  208.             sscanf(Str, "e<u< | >s[34]s[12]s[17]s[124]>", Ersteller, Datum, IP,inputtext);//22653
  209.             new string[200];
  210.             //format(string,sizeof(string),"Ersteller: %s | Datum: %s | IP: %s | Nachricht: %s.",Ersteller,Datum,IP,inputtext);
  211.             format(string,sizeof(string),"%s %s %s %s",Ersteller,Datum,IP,inputtext);//Zeile 22656
  212.             SendClientMessage(playerid,COLOR_YELLOW,string);
  213.             SendClientMessage(playerid,COLOR_WHITE,"---------------------------------------------------------");
  214.         }
  215.     }
  216.     mysql_free_result();
  217.     printf("** Es wurden %i Support Tickets aus der Datenbank geladen **", tickets);
  218.     return 1;
  219. }
  220.  
  221. stock LoadMapIconFromDatabase()
  222. {
  223.     new Str[67], MType, Float:MX, Float:MY, Float:MZ, MColor, Icons;
  224.     mysql_query("SELECT * FROM `mapicons`");
  225.     mysql_store_result();
  226.     Icons = mysql_num_rows();
  227.     if(Icons > 0)
  228.     {
  229.         while(mysql_fetch_row(Str))
  230.         {
  231.             sscanf(Str, "p<|>fffii", MX, MY, MZ, MType, MColor);
  232.             CreateDynamicMapIcon(MX, MY, MZ, MType, MColor, -1, -1, -1, MAPICONDISTANCE);
  233.         }
  234.     }
  235.     mysql_free_result();
  236.     printf("** Es wurden %i Mapicons erfolgreich aus der Datenbank geladen **", Icons);
  237.     return 1;
  238. }
  239.  
  240. stock SaveMapIconToDatabase(Float:MX, Float:MY, Float:MZ, MType, MColor)
  241. {
  242.  
  243.     format(Query, sizeof(Query), "INSERT INTO `mapicons` (MapIconX, MapIconY, MapIconZ, MapIconType, MapIconColor) VALUES(%f, %f, %f, %d, %d)",
  244.     MX, MY, MZ, MType, MColor);
  245.  
  246.     mysql_query(Query);
  247.     mysql_free_result();
  248.     return 1;
  249. }
  250.  
  251. stock AddATM(Float:nnnx,Float:nnny,Float:nnnz,Float:nnnrx,Float:nnnry,Float:nnnrz)
  252. {
  253.     atm[atmcounter][atpx] = nnnx;
  254.     atm[atmcounter][atpy] = nnny;
  255.     atm[atmcounter][atpz] = nnnz;
  256.     CreateDynamicObject(2942,nnnx,nnny,nnnz,nnnrx,nnnry,nnnrz, -1, -1, -1, 120);
  257.     atmcounter++;
  258.     return 1;
  259. }
  260.  
  261. stock SaveStaatskasse()
  262. {
  263.  
  264.     format(Query, sizeof(Query), "UPDATE `configurations` (Staatskasse) VALUES(%d)",
  265.     Staatskasse);
  266.  
  267.     mysql_query(Query);
  268.     mysql_free_result();
  269.     return 1;
  270. }
  271.  
  272. stock LoadStaatskasse()
  273. {
  274.     new Str[67];
  275.     mysql_query("SELECT `Staatskasse` FROM `configurations`");
  276.     mysql_store_result();
  277.         while(mysql_fetch_row(Str))
  278.         {
  279.             sscanf(Str, "i", Staatskasse);
  280.         }
  281.     mysql_free_result();
  282.     printf("** Die Staatskasse wurde erfolgreich aus der Datenbank geladen **");
  283.     return 1;
  284. }
  285.  
  286.  
  287. // --------------------------------------------------------------------- //
  288.  
  289. GetVehicleModelIDFromName(vname[])
  290. {
  291.     for(new i = 0; i < 211; i++)
  292.     {
  293.         if(strfind(VehicleNames[i], vname, true) != -1)
  294.             return i + 400;
  295.     }
  296.     return -1;
  297. }
  298.  
  299. stock GetEscName(playerid)
  300. {
  301.     new EscapedName[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
  302.     if(IsPlayerConnected(playerid))
  303.     {
  304.         GetPlayerName(playerid, name, sizeof(name));
  305.         mysql_real_escape_string(name, EscapedName);
  306.     }
  307.     else EscapedName = "Unknown";
  308.     return EscapedName;
  309. }
  310.  
  311. stock GetName(playerid)
  312. {
  313.     new name[MAX_PLAYER_NAME];
  314.     if(IsPlayerConnected(playerid)) GetPlayerName(playerid, name, sizeof(name));
  315.     else name = "Unbekannt";
  316.     return name;
  317. }
  318.  
  319. stock GetNameA(playerid)
  320. {
  321.     new name[MAX_PLAYER_NAME];
  322.     GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  323.     return name;
  324. }
  325.  
  326. forward SendAdminMessage(color, string[], requireduty);
  327. public SendAdminMessage(color, string[], requireduty)
  328. {
  329.     foreach(Player, i)
  330.     {
  331.         if(pStats[i][pAdminLevel] >= 1)
  332.         {
  333.             if(GetPVarInt(i, "Authentication") == 1)
  334.             {
  335.                 if(requireduty == 1)
  336.                 {
  337.                     if(GetPVarInt(i, "AdminDuty") == 1) SendClientMessage(i, color, string);
  338.                     else return 0;
  339.                 }
  340.                 else if(requireduty == 0)
  341.                 {
  342.                     SendClientMessage(i, color, string);
  343.                 }
  344.             }
  345.         }
  346.     }
  347.     return 1;
  348. }
  349.  
  350. forward SendJobMessage(job,color, string[]);
  351. public SendJobMessage(job, color, string[])
  352. {
  353.     foreach(Player, i)
  354.     {
  355.         if(GetPVarInt(i, "Authentication") == 1)
  356.         {
  357.             if(pStats[i][pJob] == job)
  358.             {
  359.                 SendClientMessage(i, color, string);
  360.             }
  361.         }
  362.     }
  363. }
  364.  
  365. forward NearByMessage(playerid, color, string[]);
  366. public NearByMessage(playerid, color, string[])
  367. {
  368.     new Float: PlayerX, Float: PlayerY, Float: PlayerZ;
  369.     foreach(Player, i)
  370.     {
  371.         if(GetPVarInt(i, "Authentication") == 1)
  372.         {
  373.             GetPlayerPos(playerid, PlayerX, PlayerY, PlayerZ);
  374.             if(PlayerToPoint(i, 12, PlayerX, PlayerY, PlayerZ))
  375.             {
  376.                 if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i) && GetPlayerInterior(playerid) == GetPlayerInterior(i))
  377.                 {
  378.                     SendClientMessage(i, color, string);
  379.                 }
  380.             }
  381.         }
  382.     }
  383.     return 1;
  384. }
  385.  
  386. stock GetNameEx(playerid) // This is VERY useful for RP server types. It's a function, like "GetName()", but removes the "_" from their name! :)
  387. {
  388.     new str[24], String[128];
  389.     GetPlayerName(playerid, String, 24);
  390.     strmid(str, String, 0, strlen(String), 24);
  391.     for(new i = 0; i < MAX_PLAYER_NAME; i++)
  392.     {
  393.         if (str[i] == '_') str[i] = ' ';
  394.     }
  395.     return str;
  396. }
  397.  
  398. forward ClearTextSpam(playerid);
  399. public ClearTextSpam(playerid)
  400. {
  401.     SetPVarInt(playerid, "TextSpam", 0);
  402. }
  403.  
  404. forward EndMute(playerid);
  405. public EndMute(playerid)
  406. {
  407.     if(PlayerMuted[playerid] == 1)
  408.     {
  409.     PlayerMuted[playerid] = 0;
  410.     SendClientMessage(playerid,COLOR_WHITE,"Du wurdest wieder entmutet, bitte lasse das Chat spammen jetzt sein!");
  411.     }
  412. }
  413.  
  414. forward ClearCommandSpam(playerid);
  415. public ClearCommandSpam(playerid)
  416. {
  417.     SetPVarInt(playerid, "CommandSpam", 0);
  418. }
  419.  
  420. //Allgemeiner Timer2
  421. forward Timer2();
  422. public Timer2()
  423. {
  424.         foreach(Player, i)
  425. {
  426.     //James
  427.     new color = random(25);
  428.         new colors[25] = {
  429.         0xFF0000FF, 0xFF2C00FF, 0xFF5000FF, 0xFF8700FF, 0xFFA700FF,
  430.         0xFFDC00FF, 0xFFFB00FF, 0xC4FF00FF, 0x7BFF00FF, 0x00FF00FF,
  431.         0x00FF1EFF, 0x00FF3BFF, 0x00FF7CFF, 0x00FFAEFF, 0x00FFD5FF,
  432.         0x00FFFFFF, 0x00CCFFFF, 0x00ACFFFF, 0x0083FFFF, 0x0054FFFF,
  433.         0x0000FFFF, 0x2C00FFFF, 0x5F00FFFF, 0x9B00FFFF, 0xCB00FFFF
  434.     };
  435.  
  436.     new str[5][170] = {
  437.     {"James : Herzlich Willkommen auf dem Gaming-Lounge Reallife Server."},
  438.     {"James : Solltest du Probleme haben benutze /support."},
  439.     {"James : Besuch doch mal bitte unsere Homepage auf nemesus.de."},
  440.     {"James : Du möchtest eine Servereinführung dann benutze /einweisung."},
  441.     {"James : Halte dich bitte an die /regeln."}
  442.     };
  443.         new npcname[MAX_PLAYER_NAME];
  444.         GetPlayerName(i, npcname, sizeof(npcname));
  445.      if(!strcmp(npcname, "James", true))
  446.     {
  447.         SetPlayerChatBubble(i,str[random(5)],colors[color],35.0,8000);
  448.         ApplyAnimation(i, "ON_LOOKERS","wave_loop", 4.0, 1, 1, 1, 1, 0, 1);
  449.     }
  450.         if(!strcmp(npcname, "Steffen", true))
  451.     {
  452.         SetPlayerChatBubble(i,"Hier gehts zur Fahrschule. Heute 20% auf alles!",0xFF0000FF,35.0,8000);
  453.         ApplyAnimation(i, "ON_LOOKERS","wave_loop", 4.0, 1, 1, 1, 1, 0, 1);
  454.     }
  455.         if(!strcmp(npcname, "Lilly", true))
  456.         {
  457.         ApplyAnimation(i, "DANCING","DAN_Down_A", 4.0, 1, 1, 1, 1, 0, 1);
  458.         }
  459.         if(!strcmp(npcname, "Beatrix", true))
  460.         {
  461.         ApplyAnimation(i, "DANCING","dance_loop", 4.0, 1, 1, 1, 1, 0, 1);
  462.         }
  463.     if(!strcmp(npcname, "DJ_Paddy", true))
  464.             {
  465.                 SetPlayerChatBubble(i,"PARTY!",0xFF0000FF,35.0,8000);
  466.                 new anm = random(7);
  467.                 switch(anm)
  468.                 {
  469.                     case 0:ApplyAnimation(i, "SCRATCHING","scdldlp", 4.0, 1, 1, 1, 1, 0, 1);
  470.                     case 1:ApplyAnimation(i, "SCRATCHING","scdlulp", 4.0, 1, 1, 1, 1, 0, 1);
  471.                     case 2:ApplyAnimation(i, "SCRATCHING","scdrdlp", 4.0, 1, 1, 1, 1, 0, 1);
  472.                     case 3:ApplyAnimation(i, "SCRATCHING","scdrulp", 4.0, 1, 1, 1, 1, 0, 1);
  473.                     /*case 4:ApplyAnimation(i, "SCRATCHING","sclng_l", 4.0, 1, 1, 1, 1, 0, 1);
  474.                     case 5:ApplyAnimation(i, "SCRATCHING","sclng_r", 4.0, 1, 1, 1, 1, 0, 1);
  475.                     case 6:ApplyAnimation(i, "SCRATCHING","scmid_l", 4.0, 1, 1, 1, 1, 0, 1);
  476.                     case 7:ApplyAnimation(i, "SCRATCHING","scmid_r", 4.0, 1, 1, 1, 1, 0, 1);*/
  477.                     case 4:ApplyAnimation(i,"RIOT", "RIOT_CHANT",4.1,1,1,1,1,0,1);
  478.                     case 5:ApplyAnimation(i, "DANCING","dnce_M_b", 4.0, 1, 1, 1, 1, 0, 1);
  479.                     case 6:ApplyAnimation(i, "SCRATCHING","sclng_l", 4.0, 1, 1, 1, 1, 0, 1);
  480.                 }
  481.                 }
  482. }
  483. }
  484.  
  485. forward Timer3();
  486. public Timer3()
  487. {
  488.         foreach(Player, i)
  489. {
  490.  if (GetPVarInt(i, "Authentication") == 1)
  491.  {
  492.     //Taxi
  493.                 if(TaxiCallTime[i] > 0)
  494.             {
  495.                 if(TaxiAccepted[i] < 999)
  496.                 {
  497.                     if(IsPlayerConnected(TaxiAccepted[i]))
  498.                     {
  499.                         new Float:Xx,Float:Yy,Float:Zz;
  500.                         GetPlayerPos(TaxiAccepted[i], Xx, Yy, Zz);
  501.                         SetPlayerCheckpoint(i, Xx, Yy, Zz, 5);
  502.                     }
  503.                 }
  504.             }
  505.             //Wetter System
  506.             new Float:xx, Float:yy, Float:zz;
  507.             GetPlayerPos(i, xx, yy, zz);
  508.                 if((xx > -992.5172 && xx < 4000.0000) && (yy < 528.0000 && yy > -4000.0000 && PlayerPaintballing[i] < 1 && pStats[i][pWetter] == 1)) //Los Santos
  509.             {
  510.                 SetPlayerWeather(i, Weather[0]);
  511.                 //Los Santos
  512.             }
  513.             if((xx > -4000.0000 && xx< -992.5172) && (yy < 4000.0000 && yy > -4000.0000 && PlayerPaintballing[i] < 1 && pStats[i][pWetter] == 1)) //San Fierro
  514.             {
  515.                 SetPlayerWeather(i, Weather[1]);
  516.                 //San Fierro
  517.             }
  518.             if((xx > -992.5172 && xx< 4000.0000) && (yy < 4000.0000 && yy > 528.0000 && PlayerPaintballing[i] < 1 && pStats[i][pWetter] == 1)) //Las Venturas
  519.             {
  520.                 SetPlayerWeather(i, Weather[2]);
  521.                 //Las Venturas
  522.             }
  523.                     if(IsPlayerInAnyVehicle(i))
  524.                 {
  525.  
  526.                     SetSpeed(i); // Um die Geschnwindigkeit zu ermitteln!
  527.                     SetHealth(i); // Um den Zustand zu ermitteln!
  528.                     SetPunkte(i); // Um den Punkte in SA zu ermitteln!
  529.                     SetT(i); // Um den Tüv zu ermitteln!
  530.                 }
  531.     if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  532.     {
  533.         for(new ii = 0; ii < sizeof(SpikeInfo); ii++)
  534.         {
  535. //22980     if(PlayerToPoint(ii, 3.0, SpikeInfo[ii][sX], SpikeInfo[ii][sY], SpikeInfo[ii][sZ]))
  536.             {
  537.                 if(SpikeInfo[ii][sCreated] == 1)
  538.                 {
  539.                     new panels, doors, lightsss, tires;
  540.                     new carid = GetPlayerVehicleID(i);
  541.                     GetVehicleDamageStatus(carid, panels, doors, lightsss, tires);
  542.                     tires = encode_tires(1, 1, 1, 1);
  543.                     UpdateVehicleDamageStatus(carid, panels, doors, lightsss, tires);
  544.                     return 0;
  545.                 }
  546.             }
  547.         }
  548.     }
  549.     if(PaintballPlayers >= 2 && PaintballRound != 1 && StartingPaintballRound != 1)
  550.     {
  551.     StartingPaintballRound = 1;
  552.     SetTimer("PreparePaintball", 15101, 0);
  553.     }
  554.     if(StartingPaintballRound == 1 && AnnouncedPaintballRound == 0)
  555.     {
  556.     AnnouncedPaintballRound = 1;
  557.     if(PlayerPaintballing[i] != 0)
  558.     {
  559.     SendClientMessage(i, COLOR_YELLOW2, "Das Paintball Spiel startet in kürze . . .");
  560.     }
  561.     }
  562.     new Float:pX,Float:pY,Float:pZ;
  563.     GetPlayerPos(i, pX, pY, pZ);
  564.     if(PlayerToPoint(70, i,2496.5850,2859.1453,10.3927))
  565.     {//Admin radius
  566.         if (pStats[i][pAdminLevel] >= 1)
  567.         {
  568.         }
  569.         else
  570.         {
  571.             SetPlayerHealth(i,1.0);
  572.             PushPlayer(i, pX+5, pY+10);
  573.             GameTextForPlayer(i, "~r~Du bist kein ~w~Administrator!", 3000, 1);
  574.         }
  575.         }
  576.     if(PlayerToPoint(70, i,2573.0884,2616.6218,10.3886))
  577.     {//Admin radius2
  578.         if (pStats[i][pAdminLevel] >= 1)
  579.         {
  580.         }
  581.         else
  582.         {
  583.             SetPlayerHealth(i,0.0);
  584.             PushPlayer(i, pX+5, pY+10);
  585.             GameTextForPlayer(i, "~r~Du bist kein ~w~Administrator!", 3000, 1);
  586.         }
  587.         }
  588.     if(PlayerToPoint(70, i,2495.5486,2771.0313,10.9571))
  589.     {//Admin radius2
  590.         if (pStats[i][pAdminLevel] >= 1)
  591.         {
  592.         }
  593.         else
  594.         {
  595.             SetPlayerHealth(i,0.0);
  596.             PushPlayer(i, pX+5, pY+10);
  597.             GameTextForPlayer(i, "~r~Du bist kein ~w~Administrator!", 3000, 1);
  598.         }
  599.         }
  600.     if(PlayerToPoint(70, i,2750.4521,2706.1936,10.3865))
  601.     {//Admin radius3
  602.         if (pStats[i][pAdminLevel] >= 1)
  603.         {
  604.         }
  605.         else
  606.         {
  607.             SetPlayerHealth(i,1.0);
  608.             PushPlayer(i, pX+5, pY+10);
  609.             GameTextForPlayer(i, "~r~Du bist kein ~w~Administrator!", 3000, 1);
  610.         }
  611.         }
  612.     if(PlayerToPoint(70, i,2705.4180,2858.7109,10.3856))
  613.     {//Admin radius4
  614.         if (pStats[i][pAdminLevel] >= 1)
  615.         {
  616.         }
  617.         else
  618.         {
  619.             SetPlayerHealth(i,1.0);
  620.             PushPlayer(i, pX+5, pY+10);
  621.             GameTextForPlayer(i, "~r~Du bist kein ~w~Administrator!", 3000, 1);
  622.         }
  623.         }
  624.     //Premium Island
  625.     if(PlayerToPoint(21, i,943.1389,-1997.0626,13.1101))
  626.     {//Premium radius
  627.         if (pStats[i][pPremium] > 0)
  628.         {
  629.         }
  630.         else
  631.         {
  632.             SetPlayerPos(i,1037.1064,-2018.4884,13.1491);
  633.             SetPlayerFacingAngle(i,80.6178);
  634.             GameTextForPlayer(i, "~r~Du hast keinen ~w~Premium Account!", 4000, 1);
  635.         }
  636.         }
  637.     if(PlayerToPoint(21, i,903.8989,-1992.2764,13.1101))
  638.     {//Premium radius
  639.         if (pStats[i][pPremium] > 0)
  640.         {
  641.         }
  642.         else
  643.         {
  644.             SetPlayerPos(i,1037.1064,-2018.4884,13.1491);
  645.             SetPlayerFacingAngle(i,80.6178);
  646.             GameTextForPlayer(i, "~r~Du hast keinen ~w~Premium Account!", 4000, 1);
  647.         }
  648.         }
  649.     if(PlayerToPoint(21, i,892.6368,-2073.3718,13.1266))
  650.     {//Premium radius
  651.         if (pStats[i][pPremium] > 0)
  652.         {
  653.         }
  654.         else
  655.         {
  656.             SetPlayerPos(i,1037.1064,-2018.4884,13.1491);
  657.             SetPlayerFacingAngle(i,80.6178);
  658.             GameTextForPlayer(i, "~r~Du hast keinen ~w~Premium Account!", 4000, 1);
  659.         }
  660.         }
  661.     if(PlayerToPoint(21, i,933.2914,-2074.5181,13.2366))
  662.     {//Premium radius
  663.         if (pStats[i][pPremium] > 0)
  664.         {
  665.         }
  666.         else
  667.         {
  668.             SetPlayerPos(i,1037.1064,-2018.4884,13.1491);
  669.             SetPlayerFacingAngle(i,80.6178);
  670.             GameTextForPlayer(i, "~r~Du hast keinen ~w~Premium Account!", 4000, 1);
  671.         }
  672.         }
  673.     //AntiCheat
  674.     if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK && (!noacheat))
  675.     {
  676.         if(pStats[i][pAdminLevel] > 0)
  677.         {
  678.             new string[128];
  679.             if(pStats[i][pAdminLevel] > 0)
  680.             {
  681.                     SetPlayerSpecialAction(i,SPECIAL_ACTION_NONE);
  682.                     format(string, sizeof(string), "Warnung: %s(%d) ist im Verdacht sich ein Jetpack zu cheaten!", GetName(i), i);
  683.                     SendAdminMessage(COLOR_LIGHTRED, string, 0);
  684.                 }
  685.                 else
  686.                 {
  687.                     format(string, sizeof(string), "** Anti-Cheat: %s wurde vom Server gebannt. Grund: Jetpack Cheat", GetName(i));
  688.                     SendMessageToAll(COLOR_LIGHTRED, string);
  689.                     SetPlayerSpecialAction(i,SPECIAL_ACTION_NONE);
  690.                     TogglePlayerControllable(i, false);
  691.                     BanEx(i, "Jetpack Cheat");
  692.                     Kick(i);
  693.                 }
  694.             }
  695.     }
  696.         else if(GetPlayerMoney(i) > 0 && (!noacheat))
  697.     {
  698.         new string[128];
  699.         if(pStats[i][pAdminLevel] > 0)
  700.         {
  701.                 format(string, sizeof(string), "Warnung: %s(%d) ist im Verdacht Geld zu cheaten! (Summe: %d)", GetName(i), i, GetPlayerMoney(i));
  702.                 SendAdminMessage(COLOR_LIGHTRED, string, 0);
  703.  
  704.                 new const old_money = GetPlayerEuros(i);
  705.                 ResetPlayerEuro(i), GivePlayerEuro(i, old_money);
  706.                 ResetPlayerMoney(i);
  707.             }
  708.             else
  709.             {
  710.                 format(string, sizeof(string), "** Anti-Cheat: %s wurde vom Server gebannt. Grund: Geld Cheat | Summe: %d", GetName(i),GetPlayerMoney(i));
  711.                 SendMessageToAll(COLOR_LIGHTRED, string);
  712.  
  713.                 new const old_money = GetPlayerEuros(i);
  714.                 ResetPlayerEuro(i), GivePlayerEuro(i, old_money);
  715.                 ResetPlayerMoney(i);
  716.                 TogglePlayerControllable(i, false);
  717.  
  718.                 BanEx(i, "Geld Cheat");
  719.                 Kick(i);
  720.             }
  721.     }
  722. /*  else if(pStats[i][pAdminLevel] < 1)
  723.     {
  724.         if(GetPlayerPing(i) > MAX_PING)
  725.         {
  726.             new string[128];
  727.             format(string, sizeof(string), "** Anti-Cheat: %s wurde vom Server gekickt. Grund: High-Ping (Maximum: %d | Ping: %d)", GetName(i), i, MAX_PING, GetPlayerPing(i));
  728.             SendMessageToAll(COLOR_LIGHTRED, string);
  729.             SendClientMessage(i,COLOR_WHITE,"Du wurdest wegen zu hohem Ping vom Server gekickt, bitte fixxe dein Ping und komm wieder.");
  730.             TogglePlayerControllable(i, false);
  731.             Kick(i);
  732.         }
  733.     }*/
  734.  
  735.     //Jailtimer
  736.      if (GetPVarInt(i, "Authentication") == 1)
  737.  {
  738.     if(pStats[i][pJailed] != 0)
  739.     {
  740.         if(pStats[i][pJailTime] > 0)
  741.         {
  742.         pStats[i][pJailTime]--;
  743.         }
  744.             if(pStats[i][pJailTime] <= 0)
  745.             {
  746.                 pStats[i][pJailTime] = 0;
  747.                     if(pStats[i][pJailed] == 1)
  748.                     {
  749.                         SetPlayerInterior(i, 0);
  750.                         SetPlayerPos(i,1769.4534,-1544.6775,9.7230);
  751.                         SetPlayerFacingAngle(i,30.4891);
  752.                     }
  753.                     new string[140];
  754.                     pStats[i][pJailed] = 0;
  755.                     pStats[i][pJailTime] = 0;
  756.                     SendClientMessage(i, COLOR_YELLOW2,"Du hast deine Haftstrafe abgesessen!");
  757.                     format(string, sizeof(string), "~g~Freiheit");
  758.                     DeletePVar(i, "JailDM");
  759.                     SetPlayerInterior(i, 0);
  760.                     SetPlayerPos(i, 1800.7522,-1576.5751,14.0625);
  761.                     SetPlayerFacingAngle(i,0625.285);
  762.                     GameTextForPlayer(i, string, 5000, 1);
  763.                     SetPlayerWorldBounds(i, 20000.0000,-20000.0000, 20000.0000, -20000.0000);
  764.                 }
  765.             }
  766.         }
  767.     }
  768. }
  769.     return 1;
  770. }
  771.        
  772. forward Timer4();
  773. public Timer4()
  774. {
  775. //CNN Abrechnung pro Member
  776. new geld = cnn*200;
  777. CnnKasse +=geld;
  778. foreach(Player, i)
  779. {
  780. if (GetPVarInt(i, "Authentication") == 1)
  781. {
  782.     //Wettersystem
  783.     Weather[0] = WetterRandomLS[random(sizeof(WetterRandomLS))];
  784.     Weather[1] = WetterRandomSF[random(sizeof(WetterRandomSF))];
  785.     Weather[2] = WetterRandomLV[random(sizeof(WetterRandomLV))];
  786. }
  787. //Premium System
  788. if(pStats[i][pPremium] == 1 && pStats[i][pPremiumTage] > 2)
  789. {
  790. pStats[i][pPremiumTage] --;
  791. }
  792. if(pStats[i][pPremium] == 1 && pStats[i][pPremiumTage] == 1)
  793. {
  794. pStats[i][pPremiumTage] --;
  795. pStats[i][pPremium] = 0;
  796. SendClientMessage(i,COLOR_WHITE,"Dein Premium Account ist abgelaufen!");
  797. }
  798. //Handy System
  799. if(pStats[i][pHandy] == 1 && pStats[i][pAkku] > 0)
  800. {
  801. pStats[i][pAkku]--;
  802. }
  803. }
  804. }
  805. forward Timer1(playerid);
  806. public Timer1(playerid)
  807. {
  808.         //Uhr
  809.         new string[174],year,month,day,hours,minutes,seconds;
  810.         getdate(year, month, day), gettime(hours, minutes, seconds);
  811.         format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
  812.         TextDrawSetString(Datum, string);
  813.         format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
  814.         TextDrawSetString(Uhrzeit, string);
  815. }
  816.  
  817. stock Float:GetVehicleSpeed(vehicleid,UseMPH = 0)
  818. {
  819.     new Float:speed_x,Float:speed_y,Float:speed_z,Float:temp_speed;
  820.     GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
  821.     if(UseMPH == 0)
  822.     {
  823.         temp_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*136.666667;
  824.     } else {
  825.         temp_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*85.4166672;
  826.     }
  827.     floatround(temp_speed,floatround_round);return temp_speed;
  828. }
  829.  
  830. //Blitzer Timer
  831. forward Blitzer();
  832. public Blitzer()
  833. {
  834.     foreach(Player, a)
  835.     {
  836.         new car = GetPlayerVehicleID(a);
  837.         if(!IsPlayerConnected(a)) continue;
  838.         if(!IsPlayerInAnyVehicle(a)) continue;
  839.         if(!IsACopCar(car) && !IsAPlane(car) && !IsABoat(car) && !IsAFahrrad(car) && !IsAZug(car))
  840.         {
  841.         if(GetPVarInt(a,"PlayerHasBeenFlashed") == 1)
  842.         {
  843.             continue;
  844.         } else if (GetPVarInt(a,"PlayerHasBeenFlashed") == 2)
  845.         {
  846.             DeletePVar(a,"PlayerHasBeenFlashed");
  847.             continue;
  848.         }
  849.         for(new b = 0;b<currentid +1;b++)
  850.         {
  851.             if(SpeedCameras[b][_active] == false) continue;
  852.             if(IsPlayerInRangeOfPoint(a,SpeedCameras[b][_range],SpeedCameras[b][_x],SpeedCameras[b][_y],SpeedCameras[b][_z]))
  853.             {
  854.                 new speed = floatround(GetVehicleSpeed(GetPlayerVehicleID(a),SpeedCameras[b][_usemph]));
  855.                 new limit = SpeedCameras[b][_limit];
  856.                 if(speed > limit)
  857.                 {
  858.                     TextDrawShowForPlayer(a,flash);
  859.                     SetPVarInt(a,"PlayerHasBeenFlashed",1);
  860.                     SetTimerEx("RemoveFlash",CAMERA_FLASH_TIME,false,"i",a);
  861.                     if(GetPlayerState(a) == PLAYER_STATE_DRIVER)
  862.             {
  863.                     if(SpeedCameras[b][_usemph] == 0)
  864.                     {
  865.                         SendClientMessageEx(a,COLOR_LIGHTRED,"sisis","Du fährst zu schnell! du wurdest geblitzt ",speed," KM/H, erlaubt gewesen wären: ",limit, " KM/H.");
  866.                         SendClientMessageEx(a,COLOR_LIGHTRED,"sis","Du musst eine Strafe von $",speed+35," bezahlen.");
  867.                         SendClientMessage(a,COLOR_LIGHTRED,"Außerdem hast du einen Punkt in San Andreas dazubekommen!");
  868.                     } else {
  869.                         SendClientMessageEx(a,0xFF1E00FF,"sisis","Du fährst zu schnell! du wurdest geblitzt",speed,"MP/H wären erlaubt gewesen zu fahren",limit, "MP/H.");
  870.                         SendClientMessageEx(a,0xFF1E00FF,"sis","Du musst eine Strafe von $",speed+35,"bezahlen.");
  871.                     }
  872.                     GivePlayerEuro(a, - speed+15);
  873.                     Staatskasse+=speed+35;
  874.                     pStats[a][pSap] +=1;
  875.             }
  876.                 }
  877. }
  878.         }
  879.         }
  880. }
  881. }
  882.  
  883.  
  884. //Autosystem
  885. forward CreateServerVehicle(interior,modelid,Float:xxX,Float:y,Float:zzZ,Float:R,color1,color2,jobid,license);
  886. public CreateServerVehicle(interior,modelid,Float:xxX,Float:y,Float:zzZ,Float:R,color1,color2,jobid,license)
  887. {
  888.     new v;
  889.     v = CreateVehicle(modelid,Float:xxX,Float:y,Float:zzZ,Float:R,color1,color2,120000000);
  890.     spawncar_job[v] = jobid;
  891.     spawncar_license[v] = license;
  892.     spawncar_interior[v] = interior;
  893.     if(jobid == 94 &&!IsAMotorad(v))
  894.     {
  895.     SetVehicleNumberPlate(v,"Taxi");
  896.     }
  897.     if(jobid == 95 &&!IsAMotorad(v))
  898.     {
  899.     SetVehicleNumberPlate(v,"Autohaus");
  900.     }
  901.     if(jobid == 97 &&!IsAMotorad(v))
  902.     {
  903.     SetVehicleNumberPlate(v,"Fahrschule");
  904.     }
  905.     if(jobid == 99 &&!IsAMotorad(v))
  906.     {
  907.     SetVehicleNumberPlate(v,"Admin");
  908.     }
  909.     if(jobid == 1 &&!IsAMotorad(v))
  910.     {
  911.     SetVehicleNumberPlate(v,"LSPD");
  912.     }
  913.     if(jobid == 6 &&!IsAMotorad(v))
  914.     {
  915.     SetVehicleNumberPlate(v,"San");
  916.     }
  917.     if(IsABoat(v))
  918.     {
  919.     spawncar_license[v] = 4;
  920.     }
  921.     if(IsAPlane(v))
  922.     {
  923.     spawncar_license[v] = 3;
  924.     }
  925.     if(IsAMotorad(v))
  926.     {
  927.     spawncar_license[v] = 2;
  928.     }
  929.     if(interior != 0)
  930.     {
  931.         LinkVehicleToInterior(v, interior);
  932.     }
  933.     return v;
  934. }
  935.  
  936. forward GetBottle(bot,playerid);
  937. public GetBottle(bot,playerid)
  938. {
  939.         new geld;
  940.         geld = GetPlayerEuros(playerid);
  941.     if(!strcmp(PlayerOrder[playerid],"bier",true))
  942.     {
  943.     if(geld < 6)
  944.     {
  945.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (6€)!");
  946.         return 1;
  947.     }
  948.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  949.         GivePlayerEuro(playerid, -6);
  950.     }
  951.     if(!strcmp(PlayerOrder[playerid],"champagner",true))
  952.     {
  953.     if(geld < 95)
  954.     {
  955.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (95€)!");
  956.         return 1;
  957.     }
  958.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  959.         GivePlayerEuro(playerid, -95);
  960.     }
  961.     if(!strcmp(PlayerOrder[playerid],"wein",true))
  962.     {
  963.     if(geld < 70)
  964.     {
  965.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (70€)!");
  966.         return 1;
  967.     }
  968.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  969.         GivePlayerEuro(playerid, -70);
  970.     }
  971.     if(!strcmp(PlayerOrder[playerid],"vodka",true))
  972.     {
  973.     if(geld < 15)
  974.     {
  975.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (15€)!");
  976.         return 1;
  977.     }
  978.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  979.         GivePlayerEuro(playerid, -15);
  980.     }
  981.     if(!strcmp(PlayerOrder[playerid],"sprunk",true))
  982.     {
  983.     if(geld < 7)
  984.     {
  985.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (7€)!");
  986.         return 1;
  987.     }
  988.     SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  989.     GivePlayerEuro(playerid, -7);
  990.     }
  991.     SetPlayerChatBubble(bot,"Mike: {FFFFFF}Hier dein Getränk!",0xFFFF00DD,35.0,3000);
  992.     ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 1);
  993.     BarMenBusy = 0;
  994.     return 1;
  995. }
  996.  
  997. forward GetBottle2(bot,playerid);
  998. public GetBottle2(bot,playerid)
  999. {
  1000.         new geld;
  1001.         geld = GetPlayerMoney(playerid);
  1002.     if(!strcmp(PlayerOrder[playerid],"bier",true))
  1003.     {
  1004.     if(geld < 6)
  1005.     {
  1006.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (6€)!");
  1007.         return 1;
  1008.     }
  1009.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  1010.         GivePlayerEuro(playerid, -6);
  1011.     }
  1012.     if(!strcmp(PlayerOrder[playerid],"champagner",true))
  1013.     {
  1014.     if(geld < 95)
  1015.     {
  1016.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (95€)!");
  1017.         return 1;
  1018.     }
  1019.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  1020.         GivePlayerEuro(playerid, -95);
  1021.     }
  1022.     if(!strcmp(PlayerOrder[playerid],"wein",true))
  1023.     {
  1024.     if(geld < 70)
  1025.     {
  1026.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (70€)!");
  1027.         return 1;
  1028.     }
  1029.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  1030.         GivePlayerEuro(playerid, -70);
  1031.     }
  1032.     if(!strcmp(PlayerOrder[playerid],"vodka",true))
  1033.     {
  1034.     if(geld < 15)
  1035.     {
  1036.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (15€)!");
  1037.         return 1;
  1038.     }
  1039.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  1040.         GivePlayerEuro(playerid, -15);
  1041.     }
  1042.     if(!strcmp(PlayerOrder[playerid],"sprunk",true))
  1043.     {
  1044.     if(geld < 7)
  1045.     {
  1046.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (7€)!");
  1047.         return 1;
  1048.     }
  1049.     SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  1050.     GivePlayerEuro(playerid, -7);
  1051.     }
  1052.     SetPlayerChatBubble(bot,"Paul: {FFFFFF}Hier dein Getränk!",0xFFFF00DD,35.0,3000);
  1053.     ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 1);
  1054.     BarMenBusy = 0;
  1055.     return 1;
  1056. }
  1057.  
  1058. forward GetBottle3(bot,playerid);
  1059. public GetBottle3(bot,playerid)
  1060. {
  1061.         new geld;
  1062.         geld = GetPlayerEuros(playerid);
  1063.     if(!strcmp(PlayerOrder[playerid],"bier",true))
  1064.     {
  1065.     if(geld < 6)
  1066.     {
  1067.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (6€)!");
  1068.         return 1;
  1069.     }
  1070.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  1071.         GivePlayerEuro(playerid, -6);
  1072.     }
  1073.     if(!strcmp(PlayerOrder[playerid],"champagner",true))
  1074.     {
  1075.     if(geld < 95)
  1076.     {
  1077.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (95€)!");
  1078.         return 1;
  1079.     }
  1080.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  1081.         GivePlayerEuro(playerid, -95);
  1082.     }
  1083.     if(!strcmp(PlayerOrder[playerid],"wein",true))
  1084.     {
  1085.     if(geld < 70)
  1086.     {
  1087.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (70€)!");
  1088.         return 1;
  1089.     }
  1090.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  1091.         GivePlayerEuro(playerid, -70);
  1092.     }
  1093.     if(!strcmp(PlayerOrder[playerid],"vodka",true))
  1094.     {
  1095.     if(geld < 15)
  1096.     {
  1097.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (15€)!");
  1098.         return 1;
  1099.     }
  1100.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  1101.         GivePlayerEuro(playerid, -15);
  1102.     }
  1103.     if(!strcmp(PlayerOrder[playerid],"sprunk",true))
  1104.     {
  1105.     if(geld < 7)
  1106.     {
  1107.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (7€)!");
  1108.         return 1;
  1109.     }
  1110.     SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  1111.     GivePlayerEuro(playerid, -7);
  1112.     }
  1113.     SetPlayerChatBubble(bot,"Phillip: {FFFFFF}Hier dein Getränk!",0xFFFF00DD,35.0,3000);
  1114.     ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 1);
  1115.     BarMenBusy = 0;
  1116.     return 1;
  1117. }
  1118.  
  1119. forward GetBottle4(bot,playerid);
  1120. public GetBottle4(bot,playerid)
  1121. {
  1122.         new geld;
  1123.         geld = GetPlayerEuros(playerid);
  1124.     if(!strcmp(PlayerOrder[playerid],"bier",true))
  1125.     {
  1126.     if(geld < 6)
  1127.     {
  1128.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (6€)!");
  1129.         return 1;
  1130.     }
  1131.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  1132.         GivePlayerEuro(playerid, -6);
  1133.     }
  1134.     if(!strcmp(PlayerOrder[playerid],"champagner",true))
  1135.     {
  1136.     if(geld < 95)
  1137.     {
  1138.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (95€)!");
  1139.         return 1;
  1140.     }
  1141.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  1142.         GivePlayerEuro(playerid, -95);
  1143.     }
  1144.     if(!strcmp(PlayerOrder[playerid],"wein",true))
  1145.     {
  1146.     if(geld < 70)
  1147.     {
  1148.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (70€)!");
  1149.         return 1;
  1150.     }
  1151.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  1152.         GivePlayerEuro(playerid, -70);
  1153.     }
  1154.     if(!strcmp(PlayerOrder[playerid],"vodka",true))
  1155.     {
  1156.     if(geld < 15)
  1157.     {
  1158.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (15€)!");
  1159.         return 1;
  1160.     }
  1161.         SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  1162.         GivePlayerEuro(playerid, -15);
  1163.     }
  1164.     if(!strcmp(PlayerOrder[playerid],"sprunk",true))
  1165.     {
  1166.     if(geld < 7)
  1167.     {
  1168.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (7€)!");
  1169.         return 1;
  1170.     }
  1171.     SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  1172.     GivePlayerEuro(playerid, -7);
  1173.     }
  1174.     SetPlayerChatBubble(bot,"Muimerp: {FFFFFF}Hier dein Getränk!",0xFFFF00DD,35.0,3000);
  1175.     ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 1);
  1176.     BarMenBusy = 0;
  1177.     return 1;
  1178. }
  1179.  
  1180. forward GetBsn(bot,playerid);
  1181. public GetBsn(bot,playerid)
  1182. {
  1183.         new Float:Leben;
  1184.         GetPlayerHealth(playerid,Leben);
  1185.         new geld;
  1186.         geld = GetPlayerEuros(playerid);
  1187.     if(!strcmp(PlayerOrder[playerid],"KidsMenü",true))
  1188.     {
  1189.     if(geld < 12)
  1190.     {
  1191.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (12€)!");
  1192.         return 1;
  1193.     }
  1194.         GivePlayerEuro(playerid, -12);
  1195.         if(Leben + 12 >=100)
  1196.         {
  1197.         SetPlayerHealth(playerid,100);
  1198.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1199.         SendClientMessage(playerid,COLOR_WHITE,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1200.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1201.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1202.         }
  1203.         else
  1204.         {
  1205.         SetPlayerHealth(playerid,Leben+12);
  1206.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1207.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1208.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1209.         }
  1210.     }
  1211.     if(!strcmp(PlayerOrder[playerid],"MaxiMenü",true))
  1212.     {
  1213.     if(geld < 16)
  1214.     {
  1215.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (16€)!");
  1216.         return 1;
  1217.     }
  1218.         GivePlayerEuro(playerid, -16);
  1219.         if(Leben + 16 >=100)
  1220.         {
  1221.         SetPlayerHealth(playerid,100);
  1222.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1223.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1224.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1225.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1226.         }
  1227.         else
  1228.         {
  1229.         SetPlayerHealth(playerid,Leben+16);
  1230.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1231.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00} Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1232.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1233.         }
  1234.     }
  1235.     if(!strcmp(PlayerOrder[playerid],"Cheeseburger ohne Cheese",true))
  1236.     {
  1237.     if(geld < 20)
  1238.     {
  1239.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (20€)!");
  1240.         return 1;
  1241.     }
  1242.         GivePlayerEuro(playerid, -20);
  1243.         if(Leben + 20 >=100)
  1244.         {
  1245.         SetPlayerHealth(playerid,100);
  1246.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1247.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1248.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1249.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1250.         }
  1251.         else
  1252.         {
  1253.         SetPlayerHealth(playerid,Leben+18);
  1254.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1255.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00} Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1256.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1257.         }
  1258.     }
  1259.     if(!strcmp(PlayerOrder[playerid],"Salat",true))
  1260.     {
  1261.     if(geld < 25)
  1262.     {
  1263.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (25€)!");
  1264.         return 1;
  1265.     }
  1266.         GivePlayerEuro(playerid, -25);
  1267.         if(Leben + 25 >=100)
  1268.         {
  1269.         SetPlayerHealth(playerid,100);
  1270.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1271.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1272.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1273.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1274.         }
  1275.         else
  1276.         {
  1277.         SetPlayerHealth(playerid,Leben+25);
  1278.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1279.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00} Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1280.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1281.         }
  1282.     }
  1283.     if(!strcmp(PlayerOrder[playerid],"KingMenü",true))
  1284.     {
  1285.     if(geld < 30)
  1286.     {
  1287.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (30€)!");
  1288.         return 1;
  1289.     }
  1290.         GivePlayerEuro(playerid, -30);
  1291.         if(Leben + 30 >=100)
  1292.         {
  1293.         SetPlayerHealth(playerid,100);
  1294.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1295.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1296.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1297.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1298.         }
  1299.         else
  1300.         {
  1301.         SetPlayerHealth(playerid,Leben+30);
  1302.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1303.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1304.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1305.         }
  1306.     }
  1307.     SetPlayerChatBubble(bot,"Julia: {FFFFFF}Hier deine Bestellung!",0xFFFF00DD,35.0,3000);
  1308.     ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 0);
  1309.     BsnMenBusy = 0;
  1310.     return 1;
  1311. }
  1312.  
  1313. forward GetBsn2(bot,playerid);
  1314. public GetBsn2(bot,playerid)
  1315. {
  1316.         new Float:Leben;
  1317.         GetPlayerHealth(playerid,Leben);
  1318.         new geld;
  1319.         geld = GetPlayerEuros(playerid);
  1320.     if(!strcmp(PlayerOrder[playerid],"KidsMenü",true))
  1321.     {
  1322.     if(geld < 12)
  1323.     {
  1324.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (12€)!");
  1325.         return 1;
  1326.     }
  1327.         GivePlayerEuro(playerid, -12);
  1328.         if(Leben + 12 >=100)
  1329.         {
  1330.         SetPlayerHealth(playerid,100);
  1331.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1332.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1333.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1334.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1335.         }
  1336.         else
  1337.         {
  1338.         SetPlayerHealth(playerid,Leben+12);
  1339.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1340.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1341.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1342.         }
  1343.     }
  1344.     if(!strcmp(PlayerOrder[playerid],"MaxiMenü",true))
  1345.     {
  1346.     if(geld < 16)
  1347.     {
  1348.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (16€)!");
  1349.         return 1;
  1350.     }
  1351.         GivePlayerEuro(playerid, -16);
  1352.         if(Leben + 16 >=100)
  1353.         {
  1354.         SetPlayerHealth(playerid,100);
  1355.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1356.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1357.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1358.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1359.         }
  1360.         else
  1361.         {
  1362.         SetPlayerHealth(playerid,Leben+16);
  1363.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1364.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1365.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1366.         }
  1367.     }
  1368.     if(!strcmp(PlayerOrder[playerid],"Cheeseburger ohne Cheese",true))
  1369.     {
  1370.     if(geld < 18)
  1371.     {
  1372.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (18€)!");
  1373.         return 1;
  1374.     }
  1375.         GivePlayerEuro(playerid, -20);
  1376.         if(Leben + 20 >=100)
  1377.         {
  1378.         SetPlayerHealth(playerid,100);
  1379.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1380.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1381.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1382.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1383.         }
  1384.         else
  1385.         {
  1386.         SetPlayerHealth(playerid,Leben+18);
  1387.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1388.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1389.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1390.         }
  1391.     }
  1392.     if(!strcmp(PlayerOrder[playerid],"Salat",true))
  1393.     {
  1394.     if(geld < 25)
  1395.     {
  1396.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (25€)!");
  1397.         return 1;
  1398.     }
  1399.         GivePlayerEuro(playerid, -25);
  1400.         if(Leben + 25 >=100)
  1401.         {
  1402.         SetPlayerHealth(playerid,100);
  1403.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1404.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1405.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1406.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1407.         }
  1408.         else
  1409.         {
  1410.         SetPlayerHealth(playerid,Leben+25);
  1411.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1412.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1413.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1414.         }
  1415.     }
  1416.     if(!strcmp(PlayerOrder[playerid],"KingMenü",true))
  1417.     {
  1418.     if(geld < 30)
  1419.     {
  1420.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (30€)!");
  1421.         return 1;
  1422.     }
  1423.         GivePlayerEuro(playerid, -30);
  1424.         if(Leben + 30 >=100)
  1425.         {
  1426.         SetPlayerHealth(playerid,100);
  1427.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1428.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1429.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1430.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1431.         }
  1432.         else
  1433.         {
  1434.         SetPlayerHealth(playerid,Leben+30);
  1435.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1436.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1437.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1438.         }
  1439.     }
  1440.     SetPlayerChatBubble(bot,"Angelina: {FFFFFF}Hier deine Bestellung!",0xFFFF00DD,35.0,3000);
  1441.     ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 0);
  1442.     BsnMenBusy = 0;
  1443.     return 1;
  1444. }
  1445.  
  1446. forward GetCluck(bot,playerid);
  1447. public GetCluck(bot,playerid)
  1448. {
  1449.         new Float:Leben;
  1450.         GetPlayerHealth(playerid,Leben);
  1451.         new geld;
  1452.         geld = GetPlayerEuros(playerid);
  1453.     if(!strcmp(PlayerOrder[playerid],"ChickenNuggets",true))
  1454.     {
  1455.     if(geld < 12)
  1456.     {
  1457.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (12€)!");
  1458.         return 1;
  1459.     }
  1460.         GivePlayerEuro(playerid, -12);
  1461.         if(Leben + 12 >=100)
  1462.         {
  1463.         SetPlayerHealth(playerid,100);
  1464.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1465.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1466.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1467.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1468.         }
  1469.         else
  1470.         {
  1471.         SetPlayerHealth(playerid,Leben+12);
  1472.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1473.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1474.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1475.         }
  1476.     }
  1477.     if(!strcmp(PlayerOrder[playerid],"ChickenWings",true))
  1478.     {
  1479.     if(geld < 16)
  1480.     {
  1481.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (16€)!");
  1482.         return 1;
  1483.     }
  1484.         GivePlayerEuro(playerid, -16);
  1485.         if(Leben + 16 >=100)
  1486.         {
  1487.         SetPlayerHealth(playerid,100);
  1488.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1489.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1490.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1491.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1492.         }
  1493.         else
  1494.         {
  1495.         SetPlayerHealth(playerid,Leben+16);
  1496.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1497.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1498.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1499.         }
  1500.     }
  1501.     if(!strcmp(PlayerOrder[playerid],"Chicken am Stiel",true))
  1502.     {
  1503.     if(geld < 18)
  1504.     {
  1505.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (18€)!");
  1506.         return 1;
  1507.     }
  1508.         GivePlayerEuro(playerid, -20);
  1509.         if(Leben + 20 >=100)
  1510.         {
  1511.         SetPlayerHealth(playerid,100);
  1512.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1513.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1514.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1515.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1516.         }
  1517.         else
  1518.         {
  1519.         SetPlayerHealth(playerid,Leben+18);
  1520.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1521.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1522.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1523.         }
  1524.     }
  1525.     if(!strcmp(PlayerOrder[playerid],"Chicken Salat",true))
  1526.     {
  1527.     if(geld < 25)
  1528.     {
  1529.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (25€)!");
  1530.         return 1;
  1531.     }
  1532.         GivePlayerEuro(playerid, -25);
  1533.         if(Leben + 25 >=100)
  1534.         {
  1535.         SetPlayerHealth(playerid,100);
  1536.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1537.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1538.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1539.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1540.         }
  1541.         else
  1542.         {
  1543.         SetPlayerHealth(playerid,Leben+25);
  1544.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1545.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1546.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1547.         }
  1548.     }
  1549.     SetPlayerChatBubble(bot,"David: {FFFFFF}Hier deine Bestellung!",0xFFFF00DD,35.0,3000);
  1550.     ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 0);
  1551.     CluckMenBusy = 0;
  1552.     return 1;
  1553. }
  1554.  
  1555. forward GetPizza(bot,playerid);
  1556. public GetPizza(bot,playerid)
  1557. {
  1558.         new Float:Leben;
  1559.         GetPlayerHealth(playerid,Leben);
  1560.         new geld;
  1561.         geld = GetPlayerEuros(playerid);
  1562.     if(!strcmp(PlayerOrder[playerid],"Margarita",true))
  1563.     {
  1564.     if(geld < 12)
  1565.     {
  1566.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (12€)!");
  1567.         return 1;
  1568.     }
  1569.         GivePlayerEuro(playerid, -12);
  1570.         if(Leben + 12 >=100)
  1571.         {
  1572.         SetPlayerHealth(playerid,100);
  1573.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1574.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Well Stacked Pizza: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1575.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1576.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1577.         }
  1578.         else
  1579.         {
  1580.         SetPlayerHealth(playerid,Leben+12);
  1581.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1582.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1583.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1584.         }
  1585.     }
  1586.     if(!strcmp(PlayerOrder[playerid],"Salami",true))
  1587.     {
  1588.     if(geld < 16)
  1589.     {
  1590.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (16€)!");
  1591.         return 1;
  1592.     }
  1593.         GivePlayerEuro(playerid, -16);
  1594.     if(Leben + 16 >=100)
  1595.     {
  1596.         SetPlayerHealth(playerid,100);
  1597.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1598.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Well Stacked Pizza: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1599.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1600.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1601.     }
  1602.     else
  1603.     {
  1604.         SetPlayerHealth(playerid,Leben+16);
  1605.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1606.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Well Stacked Pizza: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1607.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1608.     }
  1609.     }
  1610.     if(!strcmp(PlayerOrder[playerid],"Thunfisch",true))
  1611.     {
  1612.     if(geld < 18)
  1613.     {
  1614.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (18€)!");
  1615.         return 1;
  1616.     }
  1617.         GivePlayerEuro(playerid, -20);
  1618.         if(Leben + 20 >=100)
  1619.         {
  1620.         SetPlayerHealth(playerid,100);
  1621.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1622.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Well Stacked Pizza: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1623.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1624.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1625.     }
  1626.     else
  1627.     {
  1628.         SetPlayerHealth(playerid,Leben+18);
  1629.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1630.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Well Stacked Pizza: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1631.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1632.     }
  1633.     }
  1634.     if(!strcmp(PlayerOrder[playerid],"Hawaii",true))
  1635.     {
  1636.     if(geld < 25)
  1637.     {
  1638.         SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (25€)!");
  1639.         return 1;
  1640.     }
  1641.         GivePlayerEuro(playerid, -25);
  1642.     if(Leben + 25 >=100)
  1643.     {
  1644.         SetPlayerHealth(playerid,100);
  1645.         ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
  1646.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Well Stacked Pizza: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1647.         SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
  1648.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1649.     }
  1650.     else
  1651.     {
  1652.         SetPlayerHealth(playerid,Leben+25);
  1653.         ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
  1654.         SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Well Stacked Pizza: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
  1655.         SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
  1656.     }
  1657.     }
  1658.         SetPlayerChatBubble(bot,"Peter: {FFFFFF}Hier deine Bestellung!",0xFFFF00DD,35.0,3000);
  1659.         ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 0);
  1660.         PizzaMenBusy = 0;
  1661.     return 1;
  1662. }
  1663.  
  1664. forward ClearBsn(bot,playerid);
  1665. public ClearBsn(bot,playerid)
  1666. {
  1667.     ClearAnimations(playerid);
  1668.     TogglePlayerControllable(playerid, true);
  1669. }
  1670.  
  1671. forward SpawnKillSchutzende(playerid);
  1672. public SpawnKillSchutzende(playerid)
  1673. {
  1674.     if(GetPVarInt(playerid, "Spawnkill") == 1)
  1675.     {
  1676.         DeletePVar(playerid, "Spawnkill");
  1677.         SetPlayerHealth(playerid,100.0);
  1678.         Delete3DTextLabel(SpawnKilllabel[playerid]);
  1679.     }
  1680. }
  1681.  
  1682. stock GetClosestPlayer(playerid)
  1683. {
  1684.     if(IsPlayerConnected(playerid) && IsPlayerConnected(0))
  1685.     {
  1686.         new closestplayer=0;
  1687.         new Float:closestdist=GetDistanceBetweenPlayers(playerid,0);
  1688.         for(new playerid2=0; playerid2<MAX_PLAYERS; playerid2++)
  1689.         {
  1690.             new Float:dist = GetDistanceBetweenPlayers(playerid,playerid2);
  1691.             if ((dist < closestdist))
  1692.             {
  1693.                 closestdist = dist;
  1694.                 closestplayer = playerid;
  1695.             }
  1696.         }
  1697.         return closestplayer;
  1698.     }
  1699.     return -1;
  1700. }
  1701.  
  1702. forward GetClosestPlayer2(p1);
  1703. public GetClosestPlayer2(p1)
  1704. {
  1705.     new Float:dis,Float:dis2,player;
  1706.     player = -1;
  1707.     dis = 99999.99;
  1708.     for(new x = 0; x < GetMaxPlayers(); x++)
  1709.     {
  1710.         if(GetPVarInt(x, "Authentication") == 1)
  1711.         {
  1712.                 if(x != p1)
  1713.                 {
  1714.                 dis2 = GetDistanceBetweenPlayers(x,p1);
  1715.                 if(dis2 < dis && dis2 != -1.00)
  1716.                 {
  1717.                     dis = dis2;
  1718.                     player = x;
  1719.                 }
  1720.         }
  1721.      }
  1722.   }
  1723.     return player;
  1724. }
  1725.  
  1726. forward Float:GetDistanceBetweenPlayers(p1,p2);
  1727. public Float:GetDistanceBetweenPlayers(p1,p2)
  1728. {
  1729.     new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
  1730.     if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2))
  1731.     {
  1732.         return -1.00;
  1733.     }
  1734.     GetPlayerPos(p1,x1,y1,z1);
  1735.     GetPlayerPos(p2,x2,y2,z2);
  1736.     return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  1737. }
  1738.  
  1739. public Audio_OnClientConnect(playerid)
  1740. {
  1741.     SetPVarInt(playerid, "AudioClient", 1);
  1742.     printf("%s wurde zum AudioClient connectet.",GetName(playerid));
  1743.     Audio_TransferPack(playerid);
  1744.     return 1;
  1745. }
  1746.  
  1747. public Audio_OnClientDisconnect(playerid)
  1748. {
  1749.     DeletePVar(playerid, "AudioClient");
  1750.     Audio_Stop(playerid, VMusic[playerid]);
  1751.     Audio_Stop(playerid, AMusic[playerid]);
  1752.     Audio_Stop(playerid, HMusic[playerid]);
  1753.     Audio_Stop(playerid, BMusic[playerid]);
  1754.     Audio_Stop(playerid, GMusic[playerid]);
  1755.     Audio_Stop(playerid, BUMusic[playerid]);
  1756.     return 1;
  1757. }
  1758.  
  1759. public Audio_OnSetPack(audiopack[])
  1760. {
  1761.     foreach(Player, i)
  1762.     {
  1763.         Audio_TransferPack(i);
  1764.     }
  1765. }
  1766.  
  1767. forward ProxDetectorS(Float:radi, playerid, targetid);
  1768. public ProxDetectorS(Float:radi, playerid, targetid)
  1769. {
  1770.     if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
  1771.     {
  1772.         new Float:posx, Float:posy, Float:posz;
  1773.         new Float:oldposx, Float:oldposy, Float:oldposz;
  1774.         new Float:tempposx, Float:tempposy, Float:tempposz;
  1775.         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  1776.         //radi = 2.0; //Trigger Radius
  1777.         GetPlayerPos(targetid, posx, posy, posz);
  1778.         tempposx = (oldposx -posx);
  1779.         tempposy = (oldposy -posy);
  1780.         tempposz = (oldposz -posz);
  1781.         //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  1782.         if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  1783.         {
  1784.             return 1;
  1785.         }
  1786.     }
  1787.     return 0;
  1788. }
  1789.  
  1790. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  1791. public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  1792. {
  1793.     if(IsPlayerConnected(playerid))
  1794.     {
  1795.         new Float:posx, Float:posy, Float:posz;
  1796.         new Float:oldposx, Float:oldposy, Float:oldposz;
  1797.         new Float:tempposx, Float:tempposy, Float:tempposz;
  1798.         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  1799.         //radi = 2.0; //Trigger Radius
  1800.         for(new i = 0; i < GetMaxPlayers(); i++)
  1801.         {
  1802.             if(IsPlayerConnected(i))
  1803.             {
  1804.                     GetPlayerPos(i, posx, posy, posz);
  1805.                     tempposx = (oldposx -posx);
  1806.                     tempposy = (oldposy -posy);
  1807.                     tempposz = (oldposz -posz);
  1808.                     //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  1809.                     if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  1810.                     {
  1811.                         SendClientMessage(i, col1, string);
  1812.                     }
  1813.                     else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  1814.                     {
  1815.                         SendClientMessage(i, col2, string);
  1816.                     }
  1817.                     else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  1818.                     {
  1819.                         SendClientMessage(i, col3, string);
  1820.                     }
  1821.                     else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  1822.                     {
  1823.                         SendClientMessage(i, col4, string);
  1824.                     }
  1825.                     else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  1826.                     {
  1827.                         SendClientMessage(i, col5, string);
  1828.                     }
  1829.                 }
  1830.                 else
  1831.                 {
  1832.                     SendClientMessage(i, col1, string);
  1833.                 }
  1834.         }
  1835.     }//not connected
  1836.     return 1;
  1837. }
  1838.  
  1839. forward SetPlayerCriminal(playerid,declare,reason[]);
  1840. public SetPlayerCriminal(playerid,declare,reason[])
  1841. {
  1842.     if(GetPVarInt(playerid, "Authentication") == 1)
  1843.     {
  1844.         SetPVarInt(playerid,"Verbrechen",GetPVarInt(playerid,"Verbrechen")+1);
  1845.         new turned[MAX_PLAYER_NAME];
  1846.         new turner[MAX_PLAYER_NAME];
  1847.         new turnmes[128];
  1848.         new wantedmes[128], cbjstore[128];
  1849.         new wlevel;
  1850.         GetPlayerName(playerid, turned, sizeof(turned));
  1851.         if (declare == 999)
  1852.         {
  1853.             format(turner, sizeof(turner), "Anonym");
  1854.         }
  1855.         if (declare == 110)
  1856.         {
  1857.             format(turner, sizeof(turner), "Der Staat");
  1858.         }
  1859.         if (declare == 900)
  1860.         {
  1861.             format(turner, sizeof(turner), "Bank");
  1862.         }
  1863.         else
  1864.         {
  1865.         if(GetPVarInt(declare, "Authentication") == 1)
  1866.         {
  1867.                 GetPlayerName(declare, turner, sizeof(turner));
  1868.             }
  1869.         }
  1870.         format(turnmes, sizeof(turnmes), "Du hast ein Verbrechen begangen! Grund: %s | Zeuge: %s.",reason,turner);
  1871.         SendClientMessage(playerid, COLOR_LIGHTRED, turnmes);
  1872.         SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid));
  1873.         wlevel = GetPlayerWantedLevel(playerid);
  1874.         pStats[playerid][pWanted] = wlevel;
  1875.         format(wantedmes, sizeof(wantedmes), "Aktuelles Wantedlevel: %d", wlevel);
  1876.         SendClientMessage(playerid, COLOR_YELLOW2, wantedmes);
  1877.         foreach(Player, i)
  1878.         {
  1879.             if(GetPVarInt(i, "Authentication") == 1)
  1880.             {
  1881.                 if(IsACop(playerid))
  1882.                 {
  1883.                     SendClientMessage(i,COLOR_LIGHTBLUE,"Funk: Es wurde ein neues Verbrechen gemeldet!, over.");
  1884.                     format(cbjstore, sizeof(turnmes), "Zeuge: %s | Verbrecher: %s | Verbrechen: %s",turner,turned,reason);
  1885.                     SendClientMessage(i, COLOR_LIGHTBLUE, cbjstore);
  1886.                 }
  1887.             }
  1888.         }
  1889.     }
  1890. }
  1891.  
  1892. forward SendLevelMessage(level, color, string[]);
  1893. public SendLevelMessage(level, color, string[])
  1894. {
  1895.     foreach(Player, i)
  1896.     {
  1897.             if(GetPVarInt(i, "Authentication") == 1)
  1898.         {
  1899.             if(pStats[i][pLevel] == level || pStats[i][pAdminLevel] > 0 && GetPVarInt(i, "AdminDuty") == 1)
  1900.             {
  1901.                 SendClientMessage(i, color, string);
  1902.             }
  1903.         }
  1904.     }
  1905. }
  1906.  
  1907. forward SendRadioMessage(member, color, string[]);
  1908. public SendRadioMessage(member, color, string[])
  1909. {
  1910.     foreach(Player, i)
  1911.     {
  1912.             if(GetPVarInt(i, "Authentication") == 1)
  1913.         {
  1914.             if(pStats[i][pMember] == member || pStats[i][pLeader] == member)
  1915.             {
  1916.                 SendClientMessage(i, color, string);
  1917.             }
  1918.         }
  1919.     }
  1920. }
  1921.  
  1922. forward IsACop(playerid);
  1923. public IsACop(playerid)
  1924. {
  1925.         if(GetPVarInt(playerid, "Authentication") == 1)
  1926.         {
  1927.         new leader = pStats[playerid][pLeader];
  1928.         new member = pStats[playerid][pMember];
  1929.         if(member==1)
  1930.         {
  1931.             return 1;
  1932.         }
  1933.         else if(leader==1)
  1934.         {
  1935.             return 1;
  1936.         }
  1937.     }
  1938.     return 0;
  1939. }
  1940.  
  1941. forward IsABeamter(playerid);
  1942. public IsABeamter(playerid)
  1943. {
  1944.         if(GetPVarInt(playerid, "Authentication") == 1)
  1945.         {
  1946.         new leader = pStats[playerid][pLeader];
  1947.         new member = pStats[playerid][pMember];
  1948.         if(member==1)
  1949.         {
  1950.             return 1;
  1951.         }
  1952.         else if(leader==1)
  1953.         {
  1954.             return 1;
  1955.         }
  1956.     }
  1957.     return 0;
  1958. }
  1959.  
  1960. forward IsACNN(playerid);
  1961. public IsACNN(playerid)
  1962. {
  1963.         if(GetPVarInt(playerid, "Authentication") == 1)
  1964.         {
  1965.         new leader = pStats[playerid][pLeader];
  1966.         new member = pStats[playerid][pMember];
  1967.         if(member==6)
  1968.         {
  1969.             return 1;
  1970.         }
  1971.         else if(leader==6)
  1972.         {
  1973.             return 1;
  1974.         }
  1975.     }
  1976.     return 0;
  1977. }
  1978.  
  1979. forward Unfreezeply(playerid);
  1980. public Unfreezeply(playerid)
  1981. {
  1982.     ClearAnimations(playerid);
  1983.     TogglePlayerControllable(playerid, 1);
  1984. }
  1985.  
  1986. forward Selbstschussanlagew(); //Selbstschussanlage
  1987. public Selbstschussanlagew()
  1988. {
  1989.     Selbstschussanlage = 0;
  1990. }
  1991.  
  1992. //Tore und Aufzüge
  1993.  
  1994. forward JailAufzugUp(); //Jail Aufzug
  1995. public JailAufzugUp()
  1996. {
  1997.     MoveDynamicObject(AufzugJail,1767.286743, -1542.457520, 23.152174,1);
  1998.     JailAufzugB = 0;
  1999. }
  2000.  
  2001. forward ZollSchranke1Zu(); //ZOLL LS-LV
  2002. public ZollSchranke1Zu()
  2003. {
  2004.     SetObjectRot(ZollSchranke1,-172.747348, 88.521979, -20.626481);
  2005.     SetObjectRot(ZollSchranke2,-172.747348, 88.521979, 157.276915);
  2006.     ZollSchrankea = 0;
  2007. }
  2008.  
  2009. forward LspdSchrankeZu(); //LSPD Schranke
  2010. public LspdSchrankeZu()
  2011. {
  2012.     SetObjectRot(SchrankeLspd,0.0000, 88.5222, 268.8997);
  2013.     SchrankeLspdB = 0;
  2014. }
  2015.  
  2016. forward LspdSchrankeZu2(); //LSPD Schranke2
  2017. public LspdSchrankeZu2()
  2018. {
  2019.     SetObjectRot(SchrankeLspd2,0.0000, 268.8998, 89.9994);
  2020.     SchrankeLspdB2 = 0;
  2021. }
  2022.  
  2023. forward LspdSchrankeZu3(); //LSPD Schranke3
  2024. public LspdSchrankeZu3()
  2025. {
  2026.     SetObjectRot(SchrankeLspd3,0.0000, 269.7592, 268.0403);
  2027.     SchrankeLspdB3 = 0;
  2028. }
  2029.  
  2030. forward Adminaufzug();
  2031. public Adminaufzug()
  2032. {
  2033.     MoveDynamicObject(adminaufzug1, 2500.287354, 2771.257568, 9.868746, 3.0);
  2034.     MoveDynamicObject(adminaufzug2, 2494.605957, 2771.261719, 9.897823, 3.0);
  2035.     AdminAufzugB = 0;
  2036.     return 1;
  2037. }
  2038.  
  2039. //Fahrzeuge
  2040.  
  2041. forward IsAMotorad(carid);
  2042. public IsAMotorad(carid)
  2043. {
  2044.     new realcarid;
  2045.     realcarid = GetVehicleModel(carid);
  2046.     if(realcarid==461||realcarid==463||realcarid==468||realcarid==521||realcarid==522||realcarid==581||realcarid==586||realcarid==471)
  2047.     {
  2048.         return 1;
  2049.     }
  2050.     return 0;
  2051. }
  2052.  
  2053. forward IsANotCar(carid);
  2054. public IsANotCar(carid)
  2055. {
  2056.     new realcarid;
  2057.     realcarid = GetVehicleModel(carid);
  2058.     if(realcarid==582||realcarid==601||realcarid==568||realcarid==432||realcarid==495||realcarid==525||realcarid==406||realcarid==407||realcarid==416||realcarid==423||realcarid==427||realcarid==428||realcarid==431||realcarid==432||realcarid==433||realcarid==437||realcarid==486||realcarid==514||realcarid==528||realcarid==530||realcarid==532||realcarid==434)
  2059.     {
  2060.         return 1;
  2061.     }
  2062.     return 0;
  2063. }
  2064.  
  2065. forward IsANotSpoilerCar(carid);
  2066. public IsANotSpoilerCar(carid)
  2067. {
  2068.     new realcarid;
  2069.     realcarid = GetVehicleModel(carid);
  2070.     if(realcarid==552)
  2071.     {
  2072.         return 1;
  2073.     }
  2074.     return 0;
  2075. }
  2076.  
  2077. forward IsACopCar(carid);
  2078. public IsACopCar(carid)
  2079. {
  2080.         if(spawncar_job[carid] == 1)
  2081.         {
  2082.             return 1;
  2083.         }
  2084.     return 0;
  2085. }
  2086.  
  2087. forward IsATaxiCar(carid);
  2088. public IsATaxiCar(carid)
  2089. {
  2090.         if(spawncar_job[carid] == 94)
  2091.         {
  2092.             return 1;
  2093.         }
  2094.     return 0;
  2095. }
  2096.  
  2097. forward IsAFahrschulCar(carid);
  2098. public IsAFahrschulCar(carid)
  2099. {
  2100.         if(spawncar_job[carid] == 97)
  2101.         {
  2102.             return 1;
  2103.         }
  2104.     return 0;
  2105. }
  2106.  
  2107. forward IsASanCar(carid);
  2108. public IsASanCar(carid)
  2109. {
  2110.         if(spawncar_job[carid] == 6)
  2111.         {
  2112.             return 1;
  2113.         }
  2114.     return 0;
  2115. }
  2116.  
  2117. forward IsAAdminCar(carid);
  2118. public IsAAdminCar(carid)
  2119. {
  2120.         if(spawncar_job[carid] == 99)
  2121.         {
  2122.             return 1;
  2123.         }
  2124.     return 0;
  2125. }
  2126.  
  2127. forward IsAFahrrad(carid);
  2128. public IsAFahrrad(carid)
  2129. {
  2130.     new model = GetVehicleModel(carid);
  2131.     if(model==481||model==509||model==510)
  2132.     {
  2133.         return 1;
  2134.     }
  2135.     return 0;
  2136. }
  2137.  
  2138. forward IsAZug(carid);
  2139. public IsAZug(carid)
  2140. {
  2141.     new model = GetVehicleModel(carid);
  2142.     if(model==537||model==538||model==449)
  2143.     {
  2144.         return 1;
  2145.     }
  2146.     return 0;
  2147. }
  2148.  
  2149. forward IsABoat(carid);
  2150. public IsABoat(carid)
  2151. {
  2152.     new model = GetVehicleModel(carid);
  2153.     if(model==472||model==493||model==473||model==493||model==595||model==484||model==430||model==453||model==446||model==553||model==464)
  2154.     {
  2155.         return 1;
  2156.     }
  2157.     return 0;
  2158. }
  2159.  
  2160. forward IsAPlane(carid);
  2161. public IsAPlane(carid)
  2162. {
  2163.     new model = GetVehicleModel(carid);
  2164.     if(model==520||model==476||model==593||model==553||model==513||model==512||model==577||model==592||model==511||model==539||model==464||model==460||model==519)
  2165.     {
  2166.         return 1;
  2167.     }
  2168.     return 0;
  2169. }
  2170.  
  2171. forward IsAPaintjobCar(carid);
  2172. public IsAPaintjobCar(carid)
  2173. {
  2174.     new model = GetVehicleModel(carid);
  2175.     if(model==483||model==534||model==535||model==536||model==513||model==558||model==559||model==560||model==561||model==562||model==565||model==567||model==575||model==576)
  2176.     {
  2177.         return 1;
  2178.     }
  2179.     return 0;
  2180. }
  2181.  
  2182. forward IsAWAACar(carid);
  2183. public IsAWAACar(carid)
  2184. {
  2185.     new model = GetVehicleModel(carid);
  2186.     if(model==562||model==565||model==559||model==561||model==560||model==558)
  2187.     {
  2188.         return 1;
  2189.     }
  2190.     return 0;
  2191. }
  2192.  
  2193. forward IsALocoCar(carid);
  2194. public IsALocoCar(carid)
  2195. {
  2196.     new model = GetVehicleModel(carid);
  2197.     if(model==536||model==575||model==534||model==567||model==535||model==566||model==576||model==412)
  2198.     {
  2199.         return 1;
  2200.     }
  2201.     return 0;
  2202. }
  2203.  
  2204. //Nagelband Update
  2205.  
  2206. forward NagelBandUpdate(playerid);
  2207. public NagelBandUpdate(playerid)
  2208. {
  2209.  DeletePVar(playerid, "NagelbandGelegt");
  2210. }
  2211.  
  2212. stock SendMessageToAll(color, string[])
  2213. {
  2214.     foreach(Player, i)
  2215.     {
  2216.         if(GetPVarInt(i, "Authentication") != 0)
  2217.         {
  2218.             SendClientMessage(i, color, string);
  2219.         }
  2220.         else return 0;
  2221.     }
  2222.     return 0;
  2223. }
  2224.  
  2225. forward RemoveFlash(playerid);
  2226. public RemoveFlash(playerid)
  2227. {
  2228.     TextDrawHideForPlayer(playerid,flash);
  2229.     SetPVarInt(playerid,"PlayerHasBeenFlashed",2);
  2230. }
  2231.  
  2232. forward GivePlayerWeaponEx(playerid,weaponid,ammo);
  2233. public GivePlayerWeaponEx(playerid,weaponid,ammo)
  2234. {
  2235. PlayerWeapons[playerid][weaponid]=true; // Player Has the weapon.
  2236. return GivePlayerWeapon(playerid,weaponid,ammo); // To realy give him the weapon.
  2237. }
  2238.  
  2239. forward RealSpawn(playerid);
  2240. public RealSpawn(playerid)
  2241. {
  2242. Spawned[playerid]=true;
  2243. }
  2244.  
  2245. public CheckPlayerText(playerid,string[])
  2246. {
  2247.     new countit = 0;
  2248.     for(new x=0; x<strlen(string); x++)
  2249.     {
  2250.         if(string[x] == '.' && string[x+1] <= '9' && string[x+1] >= '0') // Es wurde ein Punkt und eine Zahl dahinter geschrieben!
  2251.         {
  2252.             countit++;
  2253.         }
  2254.         else if(string[x] == '.' && string[x+2] <= '9' && string[x+2] >= '0') // Es wurde ein Punkt, Leerzeichen und eine Zahl dahinter geschrieben!
  2255.         {
  2256.             countit++;
  2257.         }
  2258.     }
  2259.     if(countit >= 3)
  2260.     {
  2261.         new textstring[128];
  2262.         format(textstring,sizeof(textstring),"Warnung: %s wird verdächtigt Serverwerbung zu betreiben!",GetName(playerid));
  2263.         SendAdminMessage(COLOR_LIGHTRED,textstring,1);
  2264.         format(textstring,sizeof(textstring),"Anti-Cheat: %s: %s",GetName(playerid),string);
  2265.         SendAdminMessage(COLOR_BRIGHTRED,textstring,1);
  2266.         SendClientMessage(playerid,COLOR_LIGHTRED,"** Anti-Cheat: Serverwerbungen für andere Server sind hier nicht gestattet!");
  2267.         pIPWarns[playerid]++;
  2268.         if(pIPWarns[playerid] >= 3)
  2269.         {
  2270.             format(textstring,sizeof(textstring),"** Anti-Cheat: %s wurde vom Server gebannt. Grund: Fremdwerbung!",GetName(playerid));
  2271.             SendClientMessageToAll(COLOR_LIGHTRED,textstring);
  2272.             TogglePlayerControllable(playerid, false);
  2273.             BanEx(playerid,"Fremdwerbung");
  2274.             Kick(playerid);
  2275.         }
  2276.         return 1;
  2277. }
  2278.     return 1;
  2279. }
  2280.  
  2281. forward VTicketDraw();
  2282. public VTicketDraw()
  2283. {
  2284.     SendMessageToAll(COLOR_YELLOW2,"Die Lottoziehungen beginnen in 5 Minuten, besorge dir einen Lotterieschein,");
  2285.     SendMessageToAll(COLOR_YELLOW2,"in der Lotterie in der nähe von der Bank in Los Santos.");
  2286.     return 1;
  2287. }
  2288.  
  2289. forward TicketDraw();
  2290. public TicketDraw()
  2291. {
  2292.     MakeNumber();
  2293.     new Winning[MAX_PLAYERS];
  2294.  
  2295.     foreach(Player, i)
  2296.     {
  2297.         if(HaveTicket[i] == 1)
  2298.         {
  2299.             for(new n = 0; n < 6; n++)
  2300.             {
  2301.                 if(PlayerNumber[0][i] == Number[n])
  2302.                 {
  2303.                     Winning[i]++;
  2304.                 }
  2305.                 if(PlayerNumber[1][i] == Number[n])
  2306.                 {
  2307.                     Winning[i]++;
  2308.                 }
  2309.                 if(PlayerNumber[2][i] == Number[n])
  2310.                 {
  2311.                     Winning[i]++;
  2312.                 }
  2313.                 if(PlayerNumber[3][i] == Number[n])
  2314.                 {
  2315.                     Winning[i]++;
  2316.                 }
  2317.                 if(PlayerNumber[4][i] == Number[n])
  2318.                 {
  2319.                     Winning[i]++;
  2320.                 }
  2321.                 if(PlayerNumber[5][i] == Number[n])
  2322.                 {
  2323.                     Winning[i]++;
  2324.                 }
  2325.             }
  2326.             new string[256];
  2327.  
  2328.             SendClientMessage(i, COLOR_WHITE, "--------> Lotterie 6/47 <--------");
  2329.  
  2330.             format(string, sizeof(string), "Deine Lotterie Zahlen: %d, %d, %d, %d, %d, %d", PlayerNumber[0][i], PlayerNumber[1][i], PlayerNumber[2][i], PlayerNumber[3][i], PlayerNumber[4][i], PlayerNumber[5][i]);
  2331.             SendClientMessage(i, COLOR_GREEN, string);
  2332.  
  2333.             format(string, sizeof(string), "Die Gewinner Lotterie Zahlen: %d, %d, %d, %d, %d, %d", Number[0], Number[1], Number[2], Number[3], Number[4], Number[5]);
  2334.             SendClientMessage(i, COLOR_GREEN, string);
  2335.  
  2336.             if(Winning[i] == 0)
  2337.             {
  2338.                 SendClientMessage(i, COLOR_WHITE, "Du hast 0 richtige.");
  2339.                 SendClientMessage(i, COLOR_YELLOW, "Gewinn: €0");
  2340.             }
  2341.             if(Winning[i] == 1)
  2342.             {
  2343.                 SendClientMessage(i, COLOR_WHITE, "Du hast 1 richtige.");
  2344.                 SendClientMessage(i, COLOR_YELLOW, "Gewinn: €5");
  2345.                 GivePlayerEuro(i, 5);
  2346.             }
  2347.             if(Winning[i] == 2)
  2348.             {
  2349.                 SendClientMessage(i, COLOR_WHITE, "Du hast 2 richtige.");
  2350.                 SendClientMessage(i, COLOR_YELLOW, "Gewinn: €10");
  2351.                 GivePlayerEuro(i, 10);
  2352.             }
  2353.             if(Winning[i] == 3)
  2354.             {
  2355.                 SendClientMessage(i, COLOR_WHITE, "Du hast 3 richtige.");
  2356.                 SendClientMessage(i, COLOR_YELLOW, "Gewinn: €63");
  2357.                 GivePlayerEuro(i, 63);
  2358.             }
  2359.             if(Winning[i] == 4)
  2360.             {
  2361.                 SendClientMessage(i, COLOR_WHITE, "Du hast 4 richtige.");
  2362.                 SendClientMessage(i, COLOR_YELLOW, "Gewinn: €1,730");
  2363.                 GivePlayerEuro(i, 1730);
  2364.             }
  2365.             if(Winning[i] == 5)
  2366.             {
  2367.                 SendClientMessage(i, COLOR_WHITE, "Du hast 5 richtige.");
  2368.                 SendClientMessage(i, COLOR_YELLOW, "Gewinn: €65,128");
  2369.                 GivePlayerEuro(i, 65128);
  2370.             }
  2371.             if(Winning[i] == 6)
  2372.             {
  2373.                 SendClientMessage(i, COLOR_WHITE, "Du hast 6 richtige.");
  2374.                 SendClientMessage(i, COLOR_YELLOW, "Gewinn: €1,000,000");
  2375.                 GivePlayerEuro(i, 1000000);
  2376.             }
  2377.             HaveTicket[i] = 0;
  2378.         }
  2379.     }
  2380. }
  2381.  
  2382. // ---------------[Paintball System]--------------- //
  2383.  
  2384. forward PreparePaintball();
  2385. public PreparePaintball()
  2386. {
  2387.     foreach(Player, i)
  2388.     {
  2389.             if(GetPVarInt(i, "Authentication") == 1)
  2390.         {
  2391.             if(PlayerPaintballing[i] != 0)
  2392.             {
  2393.                 SendClientMessage(i, COLOR_YELLOW2, "Das Paintball Match startet in 30 Sekunden.");
  2394.             }
  2395.         }
  2396.     }
  2397.     SetTimer("StartPaintball", 30011, 0);
  2398.     return 1;
  2399. }
  2400.  
  2401. forward StartPaintball();
  2402. public StartPaintball()
  2403. {
  2404.     PaintballRound = 1;
  2405.     StartingPaintballRound = 0;
  2406.     PaintballWinner = 999;
  2407.     PaintballWinnerKills = 0;
  2408.     foreach(Player, i)
  2409.     {
  2410.             if(GetPVarInt(i, "Authentication") == 1)
  2411.         {
  2412.             if(PlayerPaintballing[i] != 0)
  2413.             {
  2414.                 TogglePlayerControllable(i, 1);
  2415.                 SendClientMessage(i, COLOR_YELLOW, "Das Paintball Match startet, 5 Minuten verbleibend.");
  2416.                 PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
  2417.                 TextDrawShowForPlayer(i,PBText);
  2418.             }
  2419.         }
  2420.     }
  2421.     SetTimer("PaintballEnded", 300044, 0);
  2422.     return 1;
  2423. }
  2424.  
  2425. forward PaintballEnded();
  2426. public PaintballEnded()
  2427. {
  2428.     new string[52];
  2429.     foreach(Player, i)
  2430.     {
  2431.             if(GetPVarInt(i, "Authentication") == 1)
  2432.         {
  2433.             if(PlayerPaintballing[i] != 0)
  2434.             {
  2435.                 if(IsPlayerConnected(PaintballWinner))
  2436.                 {
  2437.                     format(string,sizeof(string), "** %s hat das Paintballmatch mit %d Kills gewonnen **",GetName(i),PaintballWinnerKills);
  2438.                     SendClientMessage(i, COLOR_WHITE, string);
  2439.                 }
  2440.                 ResetPlayerWeapons(i);
  2441.                 PlayerPaintballing[i] = 0;
  2442.                 SetPlayerPos(i,1310.1909,-1369.8401,13.5677);
  2443.                 SetPlayerFacingAngle(i,179.0102);
  2444.                 TogglePlayerControllable(i, true);
  2445.                 SetPlayerVirtualWorld(i, 0);
  2446.                 pStats[i][pPwaffe] = 0;
  2447.                 SetPlayerWeather(i, 1);
  2448.                 SendClientMessage(i,COLOR_YELLOW2,"Das Paintballmatch wurde beendet");
  2449.                 SetPVarInt(i, "Superfaust", 0);
  2450.                 SetPlayerWorldBounds(i, 20000.0000,-20000.0000, 20000.0000, -20000.0000);
  2451.                 PaintballPlayers = 0;
  2452.                 format(string,124,"Paintball gerade am gewinnen: Keiner.");
  2453.                 TextDrawSetString(PBText,string);
  2454.                 TextDrawHideForPlayer(i,PBText);
  2455.             }
  2456.         }
  2457.     }
  2458.     AnnouncedPaintballRound = 0;
  2459.     PaintballRound = 0;
  2460.     return 1;
  2461. }
  2462. // ---------------[San Andreas Newstime System]--------------- //
  2463.  
  2464. forward AddsOn();
  2465. public AddsOn()
  2466. {
  2467.     adds=1;
  2468.     return 1;
  2469. }
  2470.  
  2471. forward OOCNews(color,const string[]);
  2472. public OOCNews(color,const string[])
  2473. {
  2474.     foreach(Player, i)
  2475.     {
  2476.         if(GetPVarInt(i, "Authentication") == 1)
  2477.         {
  2478.             SendClientMessage(i, color, string);
  2479.         }
  2480.     }
  2481. }
  2482.  
  2483. forward Closecnna();
  2484. public Closecnna()
  2485. {
  2486.     MoveDynamicObject(AufzugCNN,1767.35925300,-1303.63110400,12.18498600, 4.0);
  2487.     AufzugCNNa = 0;
  2488.     return 1;
  2489. }
  2490.  
  2491. // ---------------[IsAtBar]--------------- //
  2492.  
  2493. forward IsAtBar(playerid);
  2494. public IsAtBar(playerid)
  2495. {
  2496.     if(GetPVarInt(playerid, "Authentication") == 1)
  2497.     {
  2498.         if(PlayerToPoint(2.0,playerid,1217.0641,-15.2606,1000.9219) || PlayerToPoint(2.0,playerid,968.8604,-47.2961,1001.1172))
  2499.         {//Verwöhnhölle - Adminbase
  2500.             return 1;
  2501.         }
  2502.         else if(PlayerToPoint(2.0,playerid,500.8093,-18.1370,1001.7262) || PlayerToPoint(1.0,playerid,920.7096,-2046.1642,14.6323))
  2503.         {//Alhambra - Premium
  2504.             return 1;
  2505.         }
  2506.     }
  2507.     return 0;
  2508. }
  2509.  
  2510. // ---------------[IsAtPc]--------------- //
  2511.  
  2512. forward IsAtPC(playerid);
  2513. public IsAtPC(playerid)
  2514. {
  2515.     if(GetPVarInt(playerid, "Authentication") == 1)
  2516.     {
  2517.         if(PlayerToPoint(2.0,playerid,847.8422,-1751.1002,22.0964) || PlayerToPoint(2.0,playerid,847.8465,-1754.1320,22.0964))
  2518.         {//PC1-2
  2519.             return 1;
  2520.         }
  2521.         else if(PlayerToPoint(2.0,playerid,843.8941,-1754.1415,22.1038) || PlayerToPoint(1.0,playerid,843.8942,-1750.8098,22.0964))
  2522.         {//PC3-4
  2523.             return 1;
  2524.         }
  2525.         else if(PlayerToPoint(2.0,playerid,840.9240,-1750.6995,22.1038) || PlayerToPoint(1.0,playerid,840.9237,-1754.0237,22.1038))
  2526.         {//PC5-6
  2527.             return 1;
  2528.         }
  2529.     }
  2530.     return 0;
  2531. }
  2532.  
  2533. // ---------------[IsAtBsn]--------------- //
  2534.  
  2535. forward IsAtRestaurant(playerid);
  2536. public IsAtRestaurant(playerid)
  2537. {
  2538.     if(GetPVarInt(playerid, "Authentication") == 1)
  2539.     {
  2540.         if(PlayerToPoint(playerid,2.0,377.3739,-67.4481,1001.5078)) //Zeile 24985
  2541.         {//Burgershot
  2542.             return 1;
  2543.         }
  2544.     }
  2545.     return 0;
  2546. }
  2547.  
  2548. // ---------------[IsAtCluck]--------------- //
  2549.  
  2550. forward IsAtCluck(playerid);
  2551. public IsAtCluck(playerid)
  2552. {
  2553.     if(GetPVarInt(playerid, "Authentication") == 1)
  2554.     {
  2555.         if(PlayerToPoint(1.5,playerid,369.6640,-6.0200,1001.8589))
  2556.         {//Cluckin Bell
  2557.             return 1;
  2558.         }
  2559.     }
  2560.     return 0;
  2561. }
  2562.  
  2563. // ---------------[IsAtPizza]--------------- //
  2564.  
  2565. forward IsAtPizza(playerid);
  2566. public IsAtPizza(playerid)
  2567. {
  2568.     if(GetPVarInt(playerid, "Authentication") == 1)
  2569.     {
  2570.         if(PlayerToPoint(1.5,playerid,375.7560,-118.8034,1001.4995))
  2571.         {//Pizza Laden
  2572.             return 1;
  2573.         }
  2574.     }
  2575.     return 0;
  2576. }
  2577.  
  2578. // ---------------[Handy System]--------------- //
  2579.  
  2580. forward BuyHandy(playerid, handyid);
  2581. public BuyHandy(playerid, handyid)
  2582. {
  2583.     if(GetPVarInt(playerid, "Authentication") == 1)
  2584.     {
  2585.         TogglePlayerControllable(playerid, true);
  2586.         if(handyid == 1)
  2587.         {
  2588.             if(GetPlayerEuros(playerid) < 100) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (100€)!"); return 1; }
  2589.             GivePlayerEuro(playerid,-100);
  2590.             SendClientMessage(playerid, COLOR_WHITE, "Glückwunsch, du hast dir erfolgreich ein Nokia 3330 gekauft!");
  2591.             SendClientMessage(playerid, COLOR_YELLOW, "Du erhältst außerdem ein Startguthaben von 10€!");
  2592.             pStats[playerid][pHandy] = 1;
  2593.             pStats[playerid][pGuthaben] = 10;
  2594.             pStats[playerid][pAkku] = 10;
  2595.         }
  2596.         else if(handyid == 2)
  2597.         {
  2598.             if(GetPlayerEuros(playerid) < 250) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (250€)!"); return 1; }
  2599.             GivePlayerEuro(playerid,-250);
  2600.             SendClientMessage(playerid, COLOR_WHITE, "Glückwunsch, du hast dir erfolgreich ein 6500 gekauft!");
  2601.             SendClientMessage(playerid, COLOR_YELLOW, "Du erhältst außerdem ein Startguthaben von 10€!");
  2602.             pStats[playerid][pHandy] = 2;
  2603.             pStats[playerid][pGuthaben] = 10;
  2604.             pStats[playerid][pAkku] = 10;
  2605.         }
  2606.         else if(handyid == 3)
  2607.         {
  2608.             if(GetPlayerEuros(playerid) < 500) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (500€)!"); return 1; }
  2609.             GivePlayerEuro(playerid,-500);
  2610.             SendClientMessage(playerid, COLOR_WHITE, "Glückwunsch, du hast dir erfolgreich ein Nokia N95 gekauft!");
  2611.             SendClientMessage(playerid, COLOR_YELLOW, "Du erhältst außerdem ein Startguthaben von 10€!");
  2612.             pStats[playerid][pHandy] = 3;
  2613.             pStats[playerid][pGuthaben] = 10;
  2614.             pStats[playerid][pAkku] = 10;
  2615.         }
  2616.         else if(handyid == 4)
  2617.         {
  2618.             if(GetPlayerEuros(playerid) < 1000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (1000€)!"); return 1; }
  2619.             GivePlayerEuro(playerid,-1000);
  2620.             SendClientMessage(playerid, COLOR_WHITE, "Glückwunsch, du hast dir erfolgreich ein Sony Ericsson C905 gekauft!");
  2621.             SendClientMessage(playerid, COLOR_YELLOW, "Du erhältst außerdem ein Startguthaben von 10€!");
  2622.             pStats[playerid][pHandy] = 4;
  2623.             pStats[playerid][pGuthaben] = 10;
  2624.             pStats[playerid][pAkku] = 10;
  2625.         }
  2626.         else if(handyid == 5)
  2627.         {
  2628.             if(GetPlayerEuros(playerid) < 2500) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (2500€)!"); return 1; }
  2629.             GivePlayerEuro(playerid,-2500);
  2630.             SendClientMessage(playerid, COLOR_WHITE, "Glückwunsch, du hast dir erfolgreich ein Motorola Q9h gekauft!");
  2631.             SendClientMessage(playerid, COLOR_YELLOW, "Du erhältst außerdem ein Startguthaben von 10€!");
  2632.             pStats[playerid][pHandy] = 5;
  2633.             pStats[playerid][pGuthaben] = 10;
  2634.             pStats[playerid][pAkku] = 10;
  2635.         }
  2636.         else if(handyid == 6)
  2637.         {
  2638.             if(GetPlayerEuros(playerid) < 4000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (4000€)!"); return 1; }
  2639.             GivePlayerEuro(playerid,-4000);
  2640.             SendClientMessage(playerid, COLOR_WHITE, "Glückwunsch, du hast dir erfolgreich ein BlackBerry BOLD gekauft!");
  2641.              SendClientMessage(playerid, COLOR_YELLOW, "Du erhältst außerdem ein Startguthaben von 10€!");
  2642.             pStats[playerid][pHandy] = 6;
  2643.             pStats[playerid][pGuthaben] = 10;
  2644.             pStats[playerid][pAkku] = 10;
  2645.         }
  2646.         else if(handyid == 7)
  2647.         {
  2648.             if(GetPlayerEuros(playerid) < 6500) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (6500€)!"); return 1; }
  2649.             GivePlayerEuro(playerid,-6500);
  2650.             SendClientMessage(playerid, COLOR_WHITE, "Glückwunsch, du hast dir erfolgreich ein iPhone gekauft!");
  2651.             SendClientMessage(playerid, COLOR_YELLOW, "Du erhältst außerdem ein Startguthaben von 10€!");
  2652.             pStats[playerid][pHandy] = 7;
  2653.             pStats[playerid][pGuthaben] = 10;
  2654.             pStats[playerid][pAkku] = 10;
  2655.         }
  2656.     }
  2657.     return 1;
  2658. }
  2659.  
  2660. forward SellHandy(playerid, handyid);
  2661. public SellHandy(playerid, handyid)
  2662. {
  2663.     if(GetPVarInt(playerid, "Authentication") == 1)
  2664.     {
  2665.         TogglePlayerControllable(playerid, true);
  2666.         if(handyid == 1)
  2667.         {
  2668.             GivePlayerEuro(playerid,100/2);
  2669.             SendClientMessage(playerid, COLOR_WHITE, "Du hast dein Nokia 3310 erfolgreich für 50€ verkauft!");
  2670.             pStats[playerid][pHandy] = 0;
  2671.         }
  2672.         else if(handyid == 2)
  2673.         {
  2674.             GivePlayerEuro(playerid,250/2);
  2675.             SendClientMessage(playerid, COLOR_WHITE, "Du hast dein Nokia 6500 erfolgreich für 125€ verkauft!");
  2676.             pStats[playerid][pHandy] = 2;
  2677.         }
  2678.         else if(handyid == 3)
  2679.         {
  2680.             GivePlayerEuro(playerid,500/2);
  2681.             SendClientMessage(playerid, COLOR_WHITE, "Du hast dein Nokia N95 erfolgreich für 250€ verkauft!");
  2682.             pStats[playerid][pHandy] = 0;
  2683.         }
  2684.         else if(handyid == 4)
  2685.         {
  2686.             GivePlayerEuro(playerid,1000/2);
  2687.             SendClientMessage(playerid, COLOR_WHITE, "Du hast dein Sony Ericsson C905 erfolgreich für 500€ verkauft!");
  2688.             pStats[playerid][pHandy] = 0;
  2689.         }
  2690.         else if(handyid == 5)
  2691.         {
  2692.             GivePlayerEuro(playerid,2500/2);
  2693.             SendClientMessage(playerid, COLOR_WHITE, "Du hast dein Motorola Q9h erfolgreich für 1250€ verkauft!");
  2694.             pStats[playerid][pHandy] = 0;
  2695.         }
  2696.         else if(handyid == 6)
  2697.         {
  2698.             GivePlayerEuro(playerid,4000/2);
  2699.             SendClientMessage(playerid, COLOR_WHITE, "Du hast dein Blackbarry BOLD erfolgreich für 2000€ verkauft!");
  2700.             pStats[playerid][pHandy] = 0;
  2701.         }
  2702.         else if(handyid == 7)
  2703.         {
  2704.             GivePlayerEuro(playerid,8500/2);
  2705.             SendClientMessage(playerid, COLOR_WHITE, "Du hast dein iPhone erfolgreich für 4250€ verkauft!");
  2706.             pStats[playerid][pHandy] = 0;
  2707.         }
  2708.     }
  2709.     return 1;
  2710. }
  2711.  
  2712. forward GetTon(playerid, handyid);
  2713. public GetTon(playerid, handyid)
  2714. {
  2715.     if(GetPVarInt(playerid, "Authentication") == 1)
  2716.     {
  2717.         TogglePlayerControllable(playerid, true);
  2718.         if(handyid == 1)
  2719.         {
  2720.             if(GetPlayerEuros(playerid) < 1000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (1000€)!"); return 1; }
  2721.             GivePlayerEuro(playerid,-1000);
  2722.             SendClientMessage(playerid, COLOR_WHITE, "Du hast erfolgreich den Klingelton Crank ausgewählt!");
  2723.             pStats[playerid][pRingTone] = 1;
  2724.         }
  2725.         else if(handyid == 2)
  2726.         {
  2727.             if(GetPlayerEuros(playerid) < 1000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (1000€)!"); return 1; }
  2728.             GivePlayerEuro(playerid,-1000);
  2729.             SendClientMessage(playerid, COLOR_WHITE, "Du hast erfolgreich den Klingelton Higher ausgewählt!");
  2730.             pStats[playerid][pRingTone] = 2;
  2731.         }
  2732.         else if(handyid == 3)
  2733.         {
  2734.             if(GetPlayerEuros(playerid) < 1000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (1000€)!"); return 1; }
  2735.             GivePlayerEuro(playerid,-1000);
  2736.             SendClientMessage(playerid, COLOR_WHITE, "Du hast erfolgreich den Klingelton Dynamite ausgewählt!");
  2737.             pStats[playerid][pRingTone] = 3;
  2738.         }
  2739.         else if(handyid == 4)
  2740.         {
  2741.             if(GetPlayerEuros(playerid) < 1000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (1000€)!"); return 1; }
  2742.             GivePlayerEuro(playerid,-1000);
  2743.             SendClientMessage(playerid, COLOR_WHITE, "Du hast erfolgreich den Klingelton CallMyName ausgewählt!");
  2744.             pStats[playerid][pRingTone] = 4;
  2745.         }
  2746.         else if(handyid == 5)
  2747.         {
  2748.             if(GetPlayerEuros(playerid) < 1000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (1000€)!"); return 1; }
  2749.             GivePlayerEuro(playerid,-1000);
  2750.             SendClientMessage(playerid, COLOR_WHITE, "Du hast erfolgreich den Klingelton Never Say Never ausgewählt!");
  2751.             pStats[playerid][pRingTone] = 5;
  2752.         }
  2753.         else if(handyid == 6)
  2754.         {
  2755.             if(GetPlayerEuros(playerid) < 1000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (1000€)!"); return 1; }
  2756.             GivePlayerEuro(playerid,-1000);
  2757.             SendClientMessage(playerid, COLOR_WHITE, "Du hast erfolgreich den Klingelton Don´t Stop the Party ausgewählt!");
  2758.             pStats[playerid][pRingTone] = 6;
  2759.         }
  2760.     }
  2761.     return 1;
  2762. }
  2763.  
  2764. forward GetGps(playerid);
  2765. public GetGps(playerid)
  2766. {
  2767.     ClearChat(playerid);
  2768.     TogglePlayerControllable(playerid, true);
  2769.     pStats[playerid][pGPS] = 1;
  2770.     SendClientMessage(playerid,COLOR_WHITE,"Das GPS App wurde erfolgreich auf dein Handy transferiert.");
  2771.     SendClientMessage(playerid,COLOR_YELLOW2,"Du kannst dieses nun mit /gps benutzen!");
  2772. }
  2773.  
  2774. forward AkkuLaden(playerid);
  2775. public AkkuLaden(playerid)
  2776. {
  2777.     ClearChat(playerid);
  2778.     TogglePlayerControllable(playerid, true);
  2779.     pStats[playerid][pAkku] = 10;
  2780.     SendClientMessage(playerid,COLOR_YELLOW2,"Dein Akku wurde erfolgreich aufgeladen!");
  2781. }
  2782.  
  2783. forward PlaySMSTone(playerid);
  2784. public PlaySMSTone(playerid)
  2785. {
  2786.         if(GetPVarInt(playerid, "Authentication") == 1)
  2787.     {
  2788.         if(GetPVarInt(playerid, "AudioClient") == 1)
  2789.     {
  2790.    
  2791.         Audio_Play(playerid, 99, false, false, false);
  2792.    
  2793.     }
  2794.     }
  2795. }
  2796. forward PlayRingTone(playerid);
  2797. public PlayRingTone(playerid)
  2798. {
  2799.         if(GetPVarInt(playerid, "Authentication") == 1)
  2800.     {
  2801.         if(GetPVarInt(playerid, "AudioClient") == 1)
  2802.     {
  2803.         if(pStats[playerid][pPremium] > 0)
  2804.     {
  2805.         if(pStats[playerid][pRingTone] > 0)
  2806.     {
  2807.     if(pStats[playerid][pRingTone] == 1)
  2808.     {
  2809.     HMusic[playerid] = Audio_Play(playerid, 1, false, false, false);
  2810.     return 1;
  2811.     }
  2812.     if(pStats[playerid][pRingTone] == 2)
  2813.     {
  2814.     HMusic[playerid] = Audio_Play(playerid, 2, false, false, false);
  2815.     return 1;
  2816.     }
  2817.     if(pStats[playerid][pRingTone] == 3)
  2818.     {
  2819.     HMusic[playerid] = Audio_Play(playerid, 3, false, false, false);
  2820.     return 1;
  2821.     }
  2822.     if(pStats[playerid][pRingTone] == 4)
  2823.     {
  2824.     HMusic[playerid] = Audio_Play(playerid, 4, false, false, false);
  2825.     return 1;
  2826.     }
  2827.     if(pStats[playerid][pRingTone] == 5)
  2828.     {
  2829.     HMusic[playerid] = Audio_Play(playerid, 5, false, false, false);
  2830.     return 1;
  2831.     }
  2832.     if(pStats[playerid][pRingTone] == 6)
  2833.     {
  2834.     HMusic[playerid] = Audio_Play(playerid, 6, false, false, false);
  2835.     return 1;
  2836.     }
  2837.    
  2838.     }
  2839.     }
  2840.     }
  2841.     }
  2842.     return 1;
  2843. }
  2844.  
  2845. forward StopRingTone(playerid);
  2846. public StopRingTone(playerid)
  2847. {
  2848.         if(GetPVarInt(playerid, "Authentication") == 1)
  2849.     {
  2850.         if(GetPVarInt(playerid, "AudioClient") == 1)
  2851.     {
  2852.         if(pStats[playerid][pPremium] > 0)
  2853.     {
  2854.         if(pStats[playerid][pRingTone] > 0)
  2855.     {
  2856.         Audio_Stop(playerid, HMusic[playerid]);
  2857.     }
  2858.     }
  2859.     }
  2860.     }
  2861. }
  2862.  
  2863. forward ClearHandy(playerid);
  2864. public ClearHandy(playerid)
  2865. {
  2866.     SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
  2867.     Audio_Stop(playerid, HMusic[playerid]);
  2868.  
  2869. }
  2870.  
  2871. forward Anruf(playerid);
  2872. public Anruf(playerid)
  2873. {
  2874.     if(GetPVarInt(playerid, "Anrufen") == 1)
  2875.     {
  2876.     DeletePVar(playerid, "Anrufen");
  2877.     SendClientMessage(playerid,COLOR_YELLOW,"Dein Anruf wurde abgebrochen, da sich keiner gemeldet hat!");
  2878.     SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
  2879.     Audio_Stop(playerid, HMusic[playerid]);
  2880.     }
  2881.     if(GetPVarInt(playerid, "Anrufen") == 2)
  2882.     {
  2883.     SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
  2884.     wirdangerufen[playerid] = -1;
  2885.     DeletePVar(playerid, "Anrufen");
  2886.     Audio_Stop(playerid, HMusic[playerid]);
  2887.     }
  2888. }
  2889.  
  2890. // ---------------[Tuninggarage]--------------- //
  2891.  
  2892. forward IsPlayerInInvalidNosVehicle(playerid);
  2893. public IsPlayerInInvalidNosVehicle(playerid)
  2894. {
  2895.     new carid = GetPlayerVehicleID(playerid);
  2896.     new carmodel = GetVehicleModel(carid);
  2897.     for (new i=0; i<sizeof(InvalidNosVehicles); i++)
  2898.     {
  2899.         if (carmodel == InvalidNosVehicles[i]) return 1;
  2900.     }
  2901.     return 0;
  2902. }
  2903.  
  2904. // ---------------[Premium System]--------------- //
  2905.  
  2906. forward Closeptor();
  2907. public Closeptor()
  2908. {
  2909.     MoveDynamicObject(ptor, 946.042603, -2004.170654, 14.882845, 3.0);
  2910.     PremiumB = 0;
  2911.     return 1;
  2912. }
  2913.  
  2914. // ---------------[Banksystem]--------------- //
  2915.  
  2916. forward SetBankRaub();
  2917. public SetBankRaub()
  2918. {
  2919.         BankRaub = 1;
  2920. }
  2921.  
  2922. forward BankRaub2(playerid);
  2923. public BankRaub2(playerid)
  2924. {
  2925.     new string[150];
  2926.     SetPVarInt(playerid, "Bankraub", 1);
  2927.     ClearChat(playerid);
  2928.     ClearAnimations(playerid);
  2929.     SetCameraBehindPlayer(playerid);
  2930.     SendClientMessage(playerid, COLOR_RED, "   |___________________________________| Banküberfall |___________________________________|");
  2931.     SendClientMessage(playerid, COLOR_YELLOW2, "Du hast die Bank überfallen!                                      ");
  2932.     SendClientMessage(playerid, COLOR_YELLOW2, "Du hast nun Wanted Lvl. 6 und musst vor dem Staat flüchten!                   ");
  2933.     SendClientMessage(playerid, COLOR_YELLOW2, "ausloggen bringt dir nichts, beim nächsten Login wird jede Sicherheitskraft benachrichtigt!");
  2934.     SendClientMessage(playerid, COLOR_LIGHTRED, "INFO: Gehe nun zum roten Punkt nach Las Venturas und lasse das Geld waschen!");
  2935.     SendClientMessage(playerid, COLOR_RED, "|______________________________________________________________________________________|");
  2936.  
  2937.     TogglePlayerControllable(playerid, true);
  2938.     ClearAnimations(playerid);
  2939.     SetPlayerWantedLevel(playerid,6);
  2940.     pStats[playerid][pWanted] = 6;
  2941.     SetPlayerCriminal(playerid,900, "Bankräuber");
  2942.     format(string, sizeof(string), "Der Spieler %s[%d] hat die Bank in Los Santos überfallen!", GetName(playerid), playerid);
  2943.     SendRadioMessage(1, COLOR_LIGHTBLUE, string);
  2944.     SetPlayerAttachedObject( playerid, 0, 1550, 1, 0.000000, -0.220224, 0.000000, 1.166815, 85.423309, 0.000000, 1.000000, 1.000000, 1.000000 ); //Geldsack an den Spieler hängen
  2945.    
  2946.     foreach(Player, i)
  2947.     {
  2948.         if(IsPlayerNPC(i))
  2949.         {
  2950.             new npcname[MAX_PLAYER_NAME];
  2951.             GetPlayerName(i, npcname, sizeof(npcname));
  2952.             if(!strcmp(npcname, "Lissa", true))
  2953.             {
  2954.                 ClearAnimations(i);
  2955.                 SetPlayerChatBubble(i,"Lissa: HILFFEEEEEEEEEE!",COLOR_BRIGHTRED,35.0,6000);
  2956.             }
  2957.         }
  2958.     }
  2959.     SetPlayerCheckpoint(playerid, 1026.5580,2365.8740,10.8203, 2.0); //Geld Wäsche
  2960.     FscheinCP[playerid] = 66;
  2961. }
  2962.  
  2963. forward SetBotAnimation(playerid);
  2964. public SetBotAnimation(playerid)
  2965. {
  2966.     ApplyAnimation(playerid, "ON_LOOKERS","point_loop", 4.0, 0, 1, 1, 1, 0, 0);
  2967.     foreach(Player, i)
  2968.     {
  2969.         if(IsPlayerNPC(i))
  2970.         {
  2971.             new npcname[MAX_PLAYER_NAME];
  2972.             GetPlayerName(i, npcname, sizeof(npcname));
  2973.             if(!strcmp(npcname, "Lissa", true))
  2974.             {
  2975.                 ApplyAnimation(i, "ROB_BANK","SHP_HandsUp_Scr", 4.0, 0, 1, 1, 1, 0, 0);
  2976.             }
  2977.             }
  2978.           }
  2979. }
  2980.  
  2981. //GetNearestBot
  2982. stock GetNearestBot(playerid, Float:abstand)
  2983. {
  2984.     new Float:pX, Float:pY, Float:pZ, Float:vX, Float:vZ, Float:vY;
  2985.     GetPlayerPos(playerid, pX, pY, pZ);
  2986.     for(new i = 0; i < MAX_PLAYERS; i++)
  2987.     {
  2988.     if(IsPlayerNPC(i))
  2989.     {
  2990.         GetPlayerPos(i, vX, vY, vZ);
  2991.         if(floatabs(pX-vX) < abstand && floatabs(pY-vY) < abstand && floatabs(pZ-vZ) < abstand &&  i != playerid)
  2992.         {
  2993.             return i;
  2994.         }
  2995.     }
  2996.     }
  2997.     return 9999;
  2998. }
  2999.  
  3000. forward Kilometer(vehicleid);
  3001. public Kilometer(vehicleid)
  3002. {
  3003.     foreach(Player, i)
  3004.     {
  3005.     new speed = floatround(GetVehicleSpeed(GetPlayerVehicleID(i),0));
  3006.     static string[27];
  3007.     if(speed > 10)
  3008.     {
  3009.         Metros[vehicleid] += floatround(floatdiv(GetVehicleSpeed(vehicleid), 60.0));
  3010.     }
  3011.     if(Metros[vehicleid] > 9)
  3012.     {
  3013.         Kilometros[vehicleid] += 1;
  3014.         Metros[vehicleid] = 0;
  3015.     }
  3016.     if(arrlen(Kilometros[vehicleid]) == 1)
  3017.     {
  3018.         format(string, 27, "Kilometer: 0000%d~g~%d", Kilometros[vehicleid], Metros[vehicleid]);
  3019.         TextDrawSetString(Speedo2[vehicleid], string);
  3020.     }
  3021.     else if(arrlen(Kilometros[vehicleid]) == 2)
  3022.     {
  3023.         format(string, 27, "Kilometer: 000%d~g~%d", Kilometros[vehicleid], Metros[vehicleid]);
  3024.         TextDrawSetString(Speedo2[vehicleid], string);
  3025.     }
  3026.     else if(arrlen(Kilometros[vehicleid]) == 3)
  3027.     {
  3028.         format(string, 27, "Kilometer: 00%d~g~%d", Kilometros[vehicleid], Metros[vehicleid]);
  3029.         TextDrawSetString(Speedo2[vehicleid], string);
  3030.     }
  3031.     else if(arrlen(Kilometros[vehicleid]) == 4)
  3032.     {
  3033.         format(string, 27, "Kilometer: 0%d~y~%d", Kilometros[vehicleid], Metros[vehicleid]);
  3034.         TextDrawSetString(Speedo2[vehicleid], string);
  3035.     }
  3036.     else if(arrlen(Kilometros[vehicleid]) == 5)
  3037.     {
  3038.         format(string, 27, "Kilometer: %d~r~%d", Kilometros[vehicleid], Metros[vehicleid]);
  3039.         TextDrawSetString(Speedo2[vehicleid], string);
  3040.     }
  3041.     }
  3042.     return 1;
  3043. }
  3044.  
  3045. forward Taxameter(vehicleid);
  3046. public Taxameter(vehicleid)
  3047. {
  3048.     foreach(Player, i)
  3049.     {
  3050.     if(spawncar_job[vehicleid] == 94)
  3051. {
  3052.     new iSeat = GetPlayerVehicleSeat(i);
  3053.     new speed = floatround(GetVehicleSpeed(GetPlayerVehicleID(i),0));
  3054.     new preis;
  3055.     static string[70];
  3056.     if(iSeat == 0)
  3057.     {
  3058.      preis =  GetPVarInt(i, "Taxipreis");
  3059.     }
  3060.     if(iSeat == 1)
  3061.     {
  3062.     if(speed > 10)
  3063.     {
  3064.         Sekunden[vehicleid] += 1;
  3065.     if(Sekunden[vehicleid] == 15)
  3066.     {
  3067.         Euro[vehicleid] +=preis;
  3068.     }
  3069.     if(Sekunden[vehicleid] == 30)
  3070.     {
  3071.         Euro[vehicleid] +=preis;
  3072.     }
  3073.     if(Sekunden[vehicleid] == 45)
  3074.     {
  3075.         Euro[vehicleid] +=preis;
  3076.     }
  3077.     if(Sekunden[vehicleid] == 60)
  3078.     {
  3079.         Euro[vehicleid] +=preis;
  3080.     }
  3081.     }
  3082.     if(arrlen(Minuten[vehicleid]) == 1)
  3083.     {
  3084.         format(string, 70, "Taxameter:  ~g~%d%ds ~r~E%d~n~ ~g~0s ~r~E0  ~g~0s ~r~E0", Minuten[vehicleid], Sekunden[vehicleid],Euro[vehicleid]);
  3085.         TextDrawSetString(Taxa2[vehicleid], string);
  3086.     }
  3087.     if(arrlen(Minuten[vehicleid]) == 2)
  3088.     {
  3089.         format(string, 70, "Taxameter:  ~g~0%d%ds ~r~E0~n~ ~g~0s ~r~E0  ~g~0s ~r~E0", Minuten[vehicleid], Sekunden[vehicleid]);
  3090.         TextDrawSetString(Taxa2[vehicleid], string);
  3091.     }
  3092.     if(arrlen(Minuten[vehicleid]) == 3)
  3093.     {
  3094.         format(string, 70, "Taxameter:  ~g~%d%ds ~r~E0~n~ ~g~0s ~r~E0  ~g~0s ~r~E0", Minuten[vehicleid], Sekunden[vehicleid]);
  3095.         TextDrawSetString(Taxa2[vehicleid], string);
  3096.     }
  3097.     }
  3098. }
  3099. }
  3100. }
  3101.  
  3102. // ---------------[Autohaus]--------------- //
  3103.  
  3104. public SetCarSpawn(playerid,carslot,Autohaus)
  3105. {
  3106.     PlayerCar[playerid][carslot][cPos_x] = AutoHausPlatze[Autohaus][AutoHausZaehler[Autohaus]][0];
  3107.     PlayerCar[playerid][carslot][cPos_y] = AutoHausPlatze[Autohaus][AutoHausZaehler[Autohaus]][1];
  3108.     PlayerCar[playerid][carslot][cPos_z] = AutoHausPlatze[Autohaus][AutoHausZaehler[Autohaus]][2];
  3109.     PlayerCar[playerid][carslot][cRotate] = AutoHausPlatze[Autohaus][AutoHausZaehler[Autohaus]][3];
  3110.     PlayerCar[playerid][carslot][cLock] = 1;
  3111.     AutoHausZaehler[Autohaus] ++;
  3112.     if(AutoHausZaehler[Autohaus] >= 5) {AutoHausZaehler[Autohaus] = 0;}
  3113.     return 1;
  3114. }
  3115.  
  3116. public SpawnCar(playerid,carslot)
  3117. {
  3118.     new model = PlayerCar[playerid][carslot][cModel];
  3119.     if(model >= 400 && model <= 611)
  3120.     {
  3121.         PlayerCar[playerid][carslot][cId] = AddStaticVehicleEx(PlayerCar[playerid][carslot][cModel], PlayerCar[playerid][carslot][cPos_x],PlayerCar[playerid][carslot][cPos_y],PlayerCar[playerid][carslot][cPos_z],PlayerCar[playerid][carslot][cRotate],PlayerCar[playerid][carslot][cC1],PlayerCar[playerid][carslot][cC2],-1);
  3122.         if(PlayerCar[playerid][carslot][cPj] >= 0) {ChangeVehiclePaintjob(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cPj]);}
  3123.         if(PlayerCar[playerid][carslot][cMod1] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod1]);}
  3124.         if(PlayerCar[playerid][carslot][cMod2] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod2]);}
  3125.         if(PlayerCar[playerid][carslot][cMod3] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod3]);}
  3126.         if(PlayerCar[playerid][carslot][cMod4] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod4]);}
  3127.         if(PlayerCar[playerid][carslot][cMod5] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod5]);}
  3128.         if(PlayerCar[playerid][carslot][cMod6] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod6]);}
  3129.         if(PlayerCar[playerid][carslot][cMod7] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod7]);}
  3130.         if(PlayerCar[playerid][carslot][cMod8] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod8]);}
  3131.         if(PlayerCar[playerid][carslot][cMod9] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod9]);}
  3132.         if(PlayerCar[playerid][carslot][cMod10] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod10]);}
  3133.         if(PlayerCar[playerid][carslot][cMod11] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod11]);}
  3134.         if(PlayerCar[playerid][carslot][cMod12] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod12]);}
  3135.         if(PlayerCar[playerid][carslot][cMod13] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod13]);}
  3136.         if(PlayerCar[playerid][carslot][cMod14] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod14]);}
  3137.         if(PlayerCar[playerid][carslot][cMod15] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod15]);}
  3138.         if(PlayerCar[playerid][carslot][cMod16] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod16]);}
  3139.         if(PlayerCar[playerid][carslot][cMod17] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod17]);}
  3140.     }
  3141. }
  3142.  
  3143. public UpdatePlayerCar(playerid)
  3144. {
  3145.     if(IsPlayerConnected(playerid))
  3146.     {
  3147.         if(pStats[playerid][pCars] != 0)
  3148.         {
  3149.             for(new i = 0;i<pStats[playerid][pCars];i++)
  3150.             {
  3151.                 new string3[150];
  3152.                 new playername3[MAX_PLAYER_NAME];
  3153.                 GetPlayerName(playerid, playername3, sizeof(playername3));
  3154.                 format(string3, sizeof(string3), "/Autos/%s%d.glcar", playername3,i);
  3155.                 new File: hFile = fopen(string3, io_write);
  3156.                 if (hFile)
  3157.                 {
  3158.                     new var[32];
  3159.                     format(var, 32, "Id=%d\n",PlayerCar[playerid][i][cId]);fwrite(hFile, var);
  3160.                     format(var, 32, "Model=%d\n",PlayerCar[playerid][i][cModel]);fwrite(hFile, var);
  3161.                     format(var, 32, "C1=%d\n",PlayerCar[playerid][i][cC1]);fwrite(hFile, var);
  3162.                     format(var, 32, "C2=%d\n",PlayerCar[playerid][i][cC2]);fwrite(hFile, var);
  3163.                     format(var, 32, "Pj=%d\n",PlayerCar[playerid][i][cPj]);fwrite(hFile, var);
  3164.                     format(var, 32, "Preis=%d\n",PlayerCar[playerid][i][cPreis]);fwrite(hFile, var);
  3165.                     format(var, 32, "Pos_x=%.3f\n",PlayerCar[playerid][i][cPos_x]);fwrite(hFile, var);
  3166.                     format(var, 32, "Pos_y=%.3f\n",PlayerCar[playerid][i][cPos_y]);fwrite(hFile, var);
  3167.                     format(var, 32, "Pos_z=%.3f\n",PlayerCar[playerid][i][cPos_z]);fwrite(hFile, var);
  3168.                     format(var, 32, "Rotate=%.3f\n",PlayerCar[playerid][i][cRotate]);fwrite(hFile, var);
  3169.                     format(var, 32, "Mod1=%d\n",PlayerCar[playerid][i][cMod1]);fwrite(hFile, var);
  3170.                     format(var, 32, "Mod2=%d\n",PlayerCar[playerid][i][cMod2]);fwrite(hFile, var);
  3171.                     format(var, 32, "Mod3=%d\n",PlayerCar[playerid][i][cMod3]);fwrite(hFile, var);
  3172.                     format(var, 32, "Mod4=%d\n",PlayerCar[playerid][i][cMod4]);fwrite(hFile, var);
  3173.                     format(var, 32, "Mod5=%d\n",PlayerCar[playerid][i][cMod5]);fwrite(hFile, var);
  3174.                     format(var, 32, "Mod6=%d\n",PlayerCar[playerid][i][cMod6]);fwrite(hFile, var);
  3175.                     format(var, 32, "Mod7=%d\n",PlayerCar[playerid][i][cMod7]);fwrite(hFile, var);
  3176.                     format(var, 32, "Mod8=%d\n",PlayerCar[playerid][i][cMod8]);fwrite(hFile, var);
  3177.                     format(var, 32, "Mod9=%d\n",PlayerCar[playerid][i][cMod9]);fwrite(hFile, var);
  3178.                     format(var, 32, "Mod10=%d\n",PlayerCar[playerid][i][cMod10]);fwrite(hFile, var);
  3179.                     format(var, 32, "Mod11=%d\n",PlayerCar[playerid][i][cMod11]);fwrite(hFile, var);
  3180.                     format(var, 32, "Mod12=%d\n",PlayerCar[playerid][i][cMod12]);fwrite(hFile, var);
  3181.                     format(var, 32, "Mod13=%d\n",PlayerCar[playerid][i][cMod13]);fwrite(hFile, var);
  3182.                     format(var, 32, "Mod14=%d\n",PlayerCar[playerid][i][cMod14]);fwrite(hFile, var);
  3183.                     format(var, 32, "Mod15=%d\n",PlayerCar[playerid][i][cMod15]);fwrite(hFile, var);
  3184.                     format(var, 32, "Mod16=%d\n",PlayerCar[playerid][i][cMod16]);fwrite(hFile, var);
  3185.                     format(var, 32, "Mod17=%d\n",PlayerCar[playerid][i][cMod17]);fwrite(hFile, var);
  3186.                     format(var, 32, "Lock=%d\n",PlayerCar[playerid][i][cLock]);fwrite(hFile, var);
  3187.                     format(var, 32, "Gesperrt=%d\n",PlayerCar[playerid][i][cGesperrt]);fwrite(hFile, var);
  3188.                     format(var, 32, "OPos_x=%.3f\n",PlayerCar[playerid][i][cOPos_x]);fwrite(hFile, var);
  3189.                     format(var, 32, "OPos_y=%.3f\n",PlayerCar[playerid][i][cOPos_y]);fwrite(hFile, var);
  3190.                     format(var, 32, "OPos_z=%.3f\n",PlayerCar[playerid][i][cOPos_z]);fwrite(hFile, var);
  3191.                     format(var, 32, "ORotate=%.3f\n",PlayerCar[playerid][i][cORotate]);fwrite(hFile, var);
  3192.  
  3193.                     fclose(hFile);
  3194.                 }
  3195.             }
  3196.         }
  3197.     }
  3198. }
  3199.  
  3200. public LoadPlayerCar(playerid)
  3201. {
  3202.     if(IsPlayerConnected(playerid))
  3203.     {
  3204.         if(pStats[playerid][pCars] != 0)
  3205.         {
  3206.             for(new i = 0;i<pStats[playerid][pCars];i++)
  3207.             {
  3208.                 new string2[64];
  3209.                 new playername2[MAX_PLAYER_NAME];
  3210.                 GetPlayerName(playerid, playername2, sizeof(playername2));
  3211.                 format(string2, sizeof(string2), "/Autos/%s%d.glcar", playername2,i);
  3212.                 new File: UserFile = fopen(string2, io_read);
  3213.                 if ( UserFile )
  3214.                 {
  3215.                     new key[ 256 ] , val[ 256 ];
  3216.                     new Data[ 256 ];
  3217.                     while ( fread( UserFile , Data , sizeof( Data ) ) )
  3218.                     {
  3219.                         key = ini_GetKey( Data );
  3220.                         if( strcmp( key , "Model" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cModel] = strval( val ); }
  3221.                         if( strcmp( key , "C1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cC1] = strval( val ); }
  3222.                         if( strcmp( key , "C2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cC2] = strval( val ); }
  3223.                         if( strcmp( key , "Pj" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cPj] = strval( val ); }
  3224.                         if( strcmp( key , "Preis" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cPreis] = strval( val ); }
  3225.                         if( strcmp( key , "Pos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cPos_x] = floatstr( val ); }
  3226.                         if( strcmp( key , "Pos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cPos_y] = floatstr( val ); }
  3227.                         if( strcmp( key , "Pos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cPos_z] = floatstr( val ); }
  3228.                         if( strcmp( key , "Rotate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cRotate] = floatstr( val ); }
  3229.                         if( strcmp( key , "Mod1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod1] = strval( val ); }
  3230.                         if( strcmp( key , "Mod2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod2] = strval( val ); }
  3231.                         if( strcmp( key , "Mod3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod3] = strval( val ); }
  3232.                         if( strcmp( key , "Mod4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod4] = strval( val ); }
  3233.                         if( strcmp( key , "Mod5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod5] = strval( val ); }
  3234.                         if( strcmp( key , "Mod6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod6] = strval( val ); }
  3235.                         if( strcmp( key , "Mod7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod7] = strval( val ); }
  3236.                         if( strcmp( key , "Mod8" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod8] = strval( val ); }
  3237.                         if( strcmp( key , "Mod9" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod9] = strval( val ); }
  3238.                         if( strcmp( key , "Mod10" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod10] = strval( val ); }
  3239.                         if( strcmp( key , "Mod11" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod11] = strval( val ); }
  3240.                         if( strcmp( key , "Mod12" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod12] = strval( val ); }
  3241.                         if( strcmp( key , "Mod13" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod13] = strval( val ); }
  3242.                         if( strcmp( key , "Mod14" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod14] = strval( val ); }
  3243.                         if( strcmp( key , "Mod15" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod15] = strval( val ); }
  3244.                         if( strcmp( key , "Mod16" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod16] = strval( val ); }
  3245.                         if( strcmp( key , "Mod17" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod17] = strval( val ); }
  3246.                         if( strcmp( key , "Lock" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cLock] = strval( val ); }
  3247.                         if( strcmp( key , "Gesperrt" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cGesperrt] = strval( val ); }
  3248.                         if( strcmp( key , "OPos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cOPos_x] = floatstr( val ); }
  3249.                         if( strcmp( key , "OPos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cOPos_y] = floatstr( val ); }
  3250.                         if( strcmp( key , "OPos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cOPos_z] = floatstr( val ); }
  3251.                         if( strcmp( key , "ORotate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cRotate] = floatstr( val ); }
  3252.  
  3253.                     }
  3254.                     fclose(UserFile);//close the file after everything has been read in the while
  3255.                     SpawnCar(playerid,i);
  3256.                 }
  3257.             }
  3258.         }
  3259.     }
  3260. }
  3261.  
  3262. forward bombtor();
  3263. public bombtor()
  3264. {
  3265. foreach(Player, i)
  3266. {
  3267.     SendClientMessage(i, COLOR_YELLOW, "Die Atomschutzbunker Türen werden jetzt geschlossen!");
  3268.     MoveDynamicObject(atomgate,-469.86840820313, 1462.0517578125, 22.695581436157,0.5);
  3269. }
  3270. }
  3271.  
  3272. forward bombexplode(playerid);
  3273. public bombexplode(playerid)
  3274. {
  3275.     DestroyDynamicObject(Abombeo);
  3276.     CreateExplosion(PlayerExplosionX[1], PlayerExplosionY[1], PlayerExplosionZ[1], 10, 0);
  3277.     SendClientMessage(playerid, COLOR_YELLOW, "Deine Atombombe ist explodiert!");
  3278.     SendClientMessageToAll(COLOR_CNN, "San Andreas Newstime: Eine Atombombe ist explodiert!");
  3279.     new Float:pX,Float:pY;
  3280.     foreach(Player,i)
  3281.     {
  3282.         if (PlayerToPoint(99999, i, PlayerExplosionX[1],PlayerExplosionY[1], PlayerExplosionZ[1]) && pStats[playerid][pTutorial] == 1)
  3283.         {
  3284.             SendClientMessage(i,COLOR_LIGHTRED,"Du wurdest von der Schallwelle der Atombombe getroffen!");
  3285.             PushPlayer(i, pX+5, pY+80);
  3286.             Audio_Stop(playerid, HMusic[i]);
  3287.            
  3288.         }
  3289.     }
  3290.     Abombe=0;
  3291. }
  3292.  
  3293. // ---------------[Speicherung von allem]--------------- //
  3294.  
  3295. forward SaveAll();
  3296. public SaveAll()
  3297. {
  3298.     new string[128];
  3299.     foreach(Player, i)
  3300.     {
  3301.         UpdatePlayerCar(i);
  3302.         SaveStatus(i);
  3303.     }
  3304.     format(string, sizeof(string), "Server: Es wurden alle Accounts,Autos und Häuser gespeichert!");
  3305.     SendAdminMessage(COLOR_LIGHTRED, string, 0);
  3306. }
  3307. // ---------------[Split]--------------- //
  3308.  
  3309. forward split(const strsrc[], strdest[][], delimiter);
  3310. public split(const strsrc[], strdest[][], delimiter)
  3311. {
  3312.     new i, li;
  3313.     new aNum;
  3314.     new len;
  3315.     while(i <= strlen(strsrc)){
  3316.         if(strsrc[i]==delimiter || i==strlen(strsrc)){
  3317.             len = strmid(strdest[aNum], strsrc, li, i, 128);
  3318.             strdest[aNum][len] = 0;
  3319.             li = i+1;
  3320.             aNum++;
  3321.         }
  3322.         i++;
  3323.     }
  3324.     return 1;
  3325. }
  3326.  
  3327. // ---------------[Login System]--------------- //
  3328.  
  3329. forward SaveStatus(playerid);
  3330. public SaveStatus(playerid)
  3331. {
  3332.     if(IsPlayerNPC(playerid)) return 1;
  3333.     new file[128];
  3334.     format(file,sizeof(file),"Spieler/%s.txt",GetName(playerid));
  3335.     if(fexist(file))
  3336.     {
  3337.         new INI:Acc = INI_Open(file);
  3338.         GetPlayerIp(playerid,rip[playerid],16);
  3339.                
  3340.         INI_WriteString(Acc,"IP",rip[playerid]);
  3341.         INI_WriteInt(Acc,"Score",GetPlayerScore(playerid));
  3342.         INI_WriteInt(Acc,"Geld",GetPlayerEuros(playerid));
  3343.         INI_WriteInt(Acc,"Tode",pStats[playerid][pDeaths]);
  3344.         INI_WriteInt(Acc,"Kills",pStats[playerid][pKills]);
  3345.         INI_WriteInt(Acc,"Logins",pStats[playerid][pLogins]);
  3346.         INI_WriteInt(Acc,"Skin",GetPlayerSkin(playerid));
  3347.         INI_WriteInt(Acc,"Geschlecht",pStats[playerid][pSex]);
  3348.         INI_WriteInt(Acc,"Alter",pStats[playerid][pAge]);
  3349.         INI_WriteInt(Acc,"Level",pStats[playerid][pLevel]);
  3350.         INI_WriteInt(Acc,"FightStyle",GetPlayerFightingStyle(playerid));
  3351.         INI_WriteInt(Acc,"AdminLevel",pStats[playerid][pAdminLevel]);
  3352.         INI_WriteInt(Acc,"Level",pStats[playerid][pLevel]);
  3353.         INI_WriteInt(Acc,"Tutorial",pStats[playerid][pTutorial]);
  3354.         INI_WriteInt(Acc,"Quest",pStats[playerid][pQuest]);
  3355.         INI_WriteInt(Acc,"WantedLevel",pStats[playerid][pWanted]);
  3356.         INI_WriteFloat(Acc,"Leben",pStats[playerid][pHealth]);
  3357.         INI_WriteFloat(Acc,"Schutz",pStats[playerid][pArmour]);
  3358.         INI_WriteFloat(Acc,"PosX",pStats[playerid][pPosX]);
  3359.         INI_WriteFloat(Acc,"PosY",pStats[playerid][pPosY]);
  3360.         INI_WriteFloat(Acc,"PosZ",pStats[playerid][pPosZ]);
  3361.         INI_WriteInt(Acc,"Interior",pStats[playerid][pInt]);
  3362.         INI_WriteInt(Acc,"GameCrash",pStats[playerid][pGameCrash]);
  3363.         INI_WriteInt(Acc,"Sfpass",pStats[playerid][pSfpass]);
  3364.         INI_WriteInt(Acc,"Lvpass",pStats[playerid][pLvpass]);
  3365.         INI_WriteInt(Acc,"Rvpass",pStats[playerid][pRvpass]);
  3366.         INI_WriteInt(Acc,"Handy",pStats[playerid][pHandy]);
  3367.         INI_WriteInt(Acc,"Guthaben",pStats[playerid][pGuthaben]);
  3368.         INI_WriteInt(Acc,"Akku",pStats[playerid][pAkku]);
  3369.         INI_WriteInt(Acc,"Klingelton",pStats[playerid][pRingTone]);
  3370.         INI_WriteInt(Acc,"Vertrag",pStats[playerid][pVertrag]);
  3371.         INI_WriteInt(Acc,"AppGps",pStats[playerid][pGPS]);
  3372.         INI_WriteInt(Acc,"Telefonbuch",pStats[playerid][pTelefonBuch]);
  3373.         INI_WriteInt(Acc,"Nummer",pStats[playerid][pnumber]);
  3374.         INI_WriteInt(Acc,"Aver",pStats[playerid][pAver]);
  3375.         INI_WriteInt(Acc,"Kver",pStats[playerid][pKver]);
  3376.         INI_WriteInt(Acc,"TragbareNews",pStats[playerid][ptnews]);
  3377.         INI_WriteInt(Acc,"Premium",pStats[playerid][pPremium]);
  3378.         INI_WriteInt(Acc,"PremiumTage",pStats[playerid][pPremiumTage]);
  3379.         INI_WriteInt(Acc,"Helm",pStats[playerid][pHelm]);
  3380.         INI_WriteInt(Acc,"Autos",pStats[playerid][pCars]);
  3381.         INI_WriteInt(Acc,"Wetter",pStats[playerid][pWetter]);
  3382.         INI_WriteInt(Acc,"PMStatus",pStats[playerid][pPMStatus]);
  3383.         INI_WriteInt(Acc,"Haus",pStats[playerid][pHaus]);
  3384.         INI_WriteInt(Acc,"Konto",pStats[playerid][pKonto]);
  3385.         INI_WriteInt(Acc,"Karte",pStats[playerid][pKarte]);
  3386.         INI_WriteInt(Acc,"Pin",pStats[playerid][pPin]);
  3387.         INI_WriteInt(Acc,"Personalausweis",pStats[playerid][pPersonalausweis]);
  3388.         INI_WriteInt(Acc,"ArbeitslosenGeld",pStats[playerid][pArbeitslosengeld]);
  3389.         INI_WriteInt(Acc,"Mob",pStats[playerid][pMob]);
  3390.         INI_WriteInt(Acc,"Sap",pStats[playerid][pSap]);
  3391.         INI_WriteInt(Acc,"Supportsperre",pStats[playerid][pSupportsperre]);
  3392.         INI_WriteInt(Acc,"Fschein",pStats[playerid][pCarLic]);
  3393.         INI_WriteInt(Acc,"Member",pStats[playerid][pMember]);
  3394.         INI_WriteInt(Acc,"Leader",pStats[playerid][pLeader]);
  3395.         INI_WriteInt(Acc,"Rank",pStats[playerid][pRank]);
  3396.         INI_WriteInt(Acc,"Job",pStats[playerid][pJob]);
  3397.         INI_WriteInt(Acc,"JobTime",pStats[playerid][pJobTime]);
  3398.         INI_WriteInt(Acc,"ServerPunkte",pStats[playerid][pSpunkte]);
  3399.         INI_WriteInt(Acc,"ServerPunkteB",pStats[playerid][pSpunkteb]);
  3400.         INI_WriteInt(Acc,"Jailed",pStats[playerid][pJailed]);
  3401.         INI_WriteInt(Acc,"JailedTime",pStats[playerid][pJailTime]);
  3402.         INI_WriteInt(Acc,"NewsSkill",pStats[playerid][pNewsSkill]);
  3403.         INI_WriteInt(Acc,"PaintballKills",pStats[playerid][pPkills]);
  3404.         INI_WriteInt(Acc,"PaintballTode",pStats[playerid][pPdeaths]);
  3405.         INI_WriteInt(Acc,"PaintballWaffe",pStats[playerid][pPwaffe]);
  3406.         INI_WriteInt(Acc,"PaintballPunkte",pStats[playerid][pPpunkte]);
  3407.         INI_WriteInt(Acc,"Warnungen",pStats[playerid][pWarns]);
  3408.         INI_WriteString(Acc,"Warnung1",pStats[playerid][pWarning1]);
  3409.         INI_WriteString(Acc,"Warnung2",pStats[playerid][pWarning2]);
  3410.         INI_WriteString(Acc,"Warnung3",pStats[playerid][pWarning3]);
  3411.         INI_Close(Acc);
  3412.     }
  3413.  return 1;
  3414. }
  3415.  
  3416. forward LoadSpieler(playerid);
  3417. public LoadSpieler(playerid)
  3418. {
  3419.     if(IsPlayerNPC(playerid)) return 1;
  3420.     OnPlayerLogin(playerid);
  3421.     new file[128];
  3422.     ResetPlayerMoney(playerid);
  3423.     ResetPlayerEuro(playerid);
  3424.     format(file,sizeof(file),"Spieler/%s.txt",GetName(playerid));
  3425.     if(fexist(file))
  3426.     {
  3427.         SetPlayerWantedLevel(playerid,GetPVarInt(playerid, "WantedLevel"));
  3428.         SetPlayerFightingStyle(playerid,GetPVarInt(playerid, "FightingStyle"));
  3429.         SetPlayerScore(playerid,GetPVarInt(playerid, "Score"));
  3430.         GivePlayerEuro(playerid,GetPVarInt(playerid, "Geld"));
  3431.         pStats[playerid][pAdminLevel] = GetPVarInt(playerid, "AdminLevel");
  3432.         pStats[playerid][pDeaths] = GetPVarInt(playerid, "Tode");
  3433.         pStats[playerid][pKills] = GetPVarInt(playerid, "Kills");
  3434.         pStats[playerid][pLogins] = GetPVarInt(playerid, "Login");
  3435.         pStats[playerid][pSex] = GetPVarInt(playerid, "Geschlecht");
  3436.         pStats[playerid][pAge] = GetPVarInt(playerid, "Alter");
  3437.         pStats[playerid][pLevel] = GetPVarInt(playerid, "Level");
  3438.         pStats[playerid][pTutorial] = GetPVarInt(playerid, "Tutorial");
  3439.         pStats[playerid][pQuest] = GetPVarInt(playerid, "Quest");
  3440.         pStats[playerid][pWanted] = GetPVarInt(playerid, "WantedLevel");
  3441.         pStats[playerid][pHealth] = GetPVarInt(playerid, "Leben");
  3442.         pStats[playerid][pArmour] = GetPVarInt(playerid, "Schutz");
  3443.         pStats[playerid][pPosX] = GetPVarInt(playerid, "PosX");
  3444.         pStats[playerid][pPosY] = GetPVarInt(playerid, "PosY");
  3445.         pStats[playerid][pPosZ] = GetPVarInt(playerid, "PosZ");
  3446.         pStats[playerid][pInt] = GetPVarInt(playerid, "Interior");
  3447.         pStats[playerid][pGameCrash] = GetPVarInt(playerid, "GameCrash");
  3448.         pStats[playerid][pSfpass] = GetPVarInt(playerid, "Sfpass");
  3449.         pStats[playerid][pLvpass] = GetPVarInt(playerid, "Lvpass");
  3450.         pStats[playerid][pRvpass] = GetPVarInt(playerid, "Rvpass");
  3451.         pStats[playerid][pHandy] = GetPVarInt(playerid, "WantedLevel");
  3452.         pStats[playerid][pGuthaben] = GetPVarInt(playerid, "Guthaben");
  3453.         pStats[playerid][pAkku] = GetPVarInt(playerid, "Akku");
  3454.         pStats[playerid][pRingTone] = GetPVarInt(playerid, "Klingelton");
  3455.         pStats[playerid][pVertrag] = GetPVarInt(playerid, "Vertrag");
  3456.         pStats[playerid][pGPS] = GetPVarInt(playerid, "AppGps");
  3457.         pStats[playerid][pTelefonBuch] = GetPVarInt(playerid, "TelefonBuch");
  3458.         pStats[playerid][pnumber] = GetPVarInt(playerid, "Nummber");
  3459.         pStats[playerid][ptnews] = GetPVarInt(playerid, "TragbareNews");
  3460.         pStats[playerid][pAver] = GetPVarInt(playerid, "Aver");
  3461.         pStats[playerid][pKver] = GetPVarInt(playerid, "Kver");
  3462.         pStats[playerid][pPremium] = GetPVarInt(playerid, "Premium");
  3463.         pStats[playerid][pPremiumTage] = GetPVarInt(playerid, "PremiumTage");
  3464.         pStats[playerid][pHelm] = GetPVarInt(playerid, "Helm");
  3465.         pStats[playerid][pCars] = GetPVarInt(playerid, "Autos");
  3466.         pStats[playerid][pWetter] = GetPVarInt(playerid, "Wetter");
  3467.         pStats[playerid][pPMStatus] = GetPVarInt(playerid, "PMStatus");
  3468.         pStats[playerid][pHaus] = GetPVarInt(playerid, "Haus");
  3469.         pStats[playerid][pKonto] = GetPVarInt(playerid, "Konto");
  3470.         pStats[playerid][pKarte] = GetPVarInt(playerid, "Karte");
  3471.         pStats[playerid][pPin] = GetPVarInt(playerid, "Pin");
  3472.         pStats[playerid][pPersonalausweis] = GetPVarInt(playerid, "Personalausweis");
  3473.         pStats[playerid][pArbeitslosengeld] = GetPVarInt(playerid, "Arbeitslosengeld");
  3474.         pStats[playerid][pMob] = GetPVarInt(playerid, "Mob");
  3475.         pStats[playerid][pSap] = GetPVarInt(playerid, "Sap");
  3476.         pStats[playerid][pSupportsperre] = GetPVarInt(playerid, "SupportSperre");
  3477.         pStats[playerid][pCarLic] = GetPVarInt(playerid, "Fschein");
  3478.         pStats[playerid][pMember] = GetPVarInt(playerid, "Member");
  3479.         pStats[playerid][pLeader] = GetPVarInt(playerid, "Leader");
  3480.         pStats[playerid][pRank] = GetPVarInt(playerid, "Rank");
  3481.         pStats[playerid][pJob] = GetPVarInt(playerid, "Job");
  3482.         pStats[playerid][pJobTime] = GetPVarInt(playerid, "JobTime");
  3483.         pStats[playerid][pSpunkte] = GetPVarInt(playerid, "ServerPunkte");
  3484.         pStats[playerid][pSpunkteb] = GetPVarInt(playerid, "ServerPunkteb");
  3485.         pStats[playerid][pJailed] = GetPVarInt(playerid, "Jailed");
  3486.         pStats[playerid][pJailTime] = GetPVarInt(playerid, "JailTime");
  3487.         pStats[playerid][pNewsSkill] = GetPVarInt(playerid, "NewsSkill");
  3488.         pStats[playerid][pPkills] = GetPVarInt(playerid, "PaintballKills");
  3489.         pStats[playerid][pPdeaths] = GetPVarInt(playerid, "PaintballTode");
  3490.         pStats[playerid][pPwaffe] = GetPVarInt(playerid, "PaintballWaffe");
  3491.         pStats[playerid][pPpunkte] = GetPVarInt(playerid, "PaintballPunkte");
  3492.         pStats[playerid][pWarns] = GetPVarInt(playerid, "Warnungen");
  3493.         pStats[playerid][pWarning1] = GetPVarInt(playerid, "Warnung1");
  3494.         pStats[playerid][pWarning2] = GetPVarInt(playerid, "Warnung2");
  3495.         pStats[playerid][pWarning3] = GetPVarInt(playerid, "Warnung3");
  3496.     }
  3497.     //Gamecrash
  3498.     if(pStats[playerid][pTutorial] == 1 && pStats[playerid][pGameCrash] == 1)
  3499.     {
  3500.         ShowPlayerDialog(playerid,DIALOG_GAMECRASH,DIALOG_STYLE_MSGBOX,"Gamecrash Wiederhersteller","{FFFFFF}Du hattest einen {FFFF00}Gamecrash{FFFFFF} soll deine Statistik wiederhergestellt werden?","Ja","Nein");
  3501.     }
  3502.     //Motd Anzeigen
  3503.     if(pStats[playerid][pTutorial] == 1 && pStats[playerid][pGameCrash] == 0)
  3504.     {
  3505.         ShowPlayerDialog(playerid,DIALOG_MOTD,DIALOG_STYLE_MSGBOX,"Die Letzen Server Updates","{FFFF00}Wichtige Information{FFFFFF}\nTeamspeak³ IP: \nForum: nemesus.de\n\n\n{FFFF00}Updates:{FFFFFF}\n- Gamecrash Reconnector eingebaut\n- Stadthallen System fertiggestellt\n- MotD(Das hier] erstellt\n- Taxi Fahrzeuge eingebaut\n- Gangsterauto gefixxt\n- Level speichert ab jetzt!","OK","");
  3506.     }
  3507.  return 1;
  3508. }
  3509.  
  3510. forward LoadUser(playerid, name[], value[]);
  3511. public LoadUser(playerid, name[], value[])
  3512. {
  3513.     if(IsPlayerNPC(playerid)) return 1;
  3514.     if(!strcmp(name, "AdminLevel"))SetPVarInt(playerid,"AdminLevel", strval(value ));
  3515.     if(!strcmp(name, "Score"))SetPVarInt(playerid,"Score", strval(value ));
  3516.     if(!strcmp(name, "Geld"))SetPVarInt(playerid,"Geld", strval(value ));
  3517.     if(!strcmp(name, "Tode"))SetPVarInt(playerid,"Tode", strval(value ));
  3518.     if(!strcmp(name, "Kills"))SetPVarInt(playerid,"Kills", strval(value ));
  3519.     if(!strcmp(name, "Login"))SetPVarInt(playerid,"Login", strval(value ));
  3520.     if(!strcmp(name, "Skin"))SetPVarInt(playerid,"Skin", strval(value ));
  3521.     if(!strcmp(name, "Geschlecht"))SetPVarInt(playerid,"Geschlecht", strval(value ));
  3522.     if(!strcmp(name, "Alter"))SetPVarInt(playerid,"Alter", strval(value ));
  3523.     if(!strcmp(name, "FightStyle"))SetPVarInt(playerid,"FightStyle", strval(value ));
  3524.     if(!strcmp(name, "Level"))SetPVarInt(playerid,"Level", strval(value ));
  3525.     if(!strcmp(name, "Tutorial"))SetPVarInt(playerid,"Tutorial", strval(value ));
  3526.     if(!strcmp(name, "Quest"))SetPVarInt(playerid,"Quest", strval(value ));
  3527.     if(!strcmp(name, "WantedLevel"))SetPVarInt(playerid,"WantedLevel", strval(value ));
  3528.     if(!strcmp(name, "Leben"))SetPVarInt(playerid,"Leben", strval(value ));
  3529.     if(!strcmp(name, "Schutz"))SetPVarInt(playerid,"Schutz", strval(value ));
  3530.     if(!strcmp(name, "PosX"))SetPVarInt(playerid,"PosX", strval(value ));
  3531.     if(!strcmp(name, "PosY"))SetPVarInt(playerid,"PosY", strval(value ));
  3532.     if(!strcmp(name, "PosZ"))SetPVarInt(playerid,"PosZ", strval(value ));
  3533.     if(!strcmp(name, "Interior"))SetPVarInt(playerid,"Interior", strval(value ));
  3534.     if(!strcmp(name, "GameCrash"))SetPVarInt(playerid,"GameCrash", strval(value ));
  3535.     if(!strcmp(name, "Sfpass"))SetPVarInt(playerid,"Sfpass", strval(value ));
  3536.     if(!strcmp(name, "Lvpass"))SetPVarInt(playerid,"Lvpass", strval(value ));
  3537.     if(!strcmp(name, "Rvpass"))SetPVarInt(playerid,"Rvpass", strval(value ));
  3538.     if(!strcmp(name, "Handy"))SetPVarInt(playerid,"Handy", strval(value ));
  3539.     if(!strcmp(name, "Guthaben"))SetPVarInt(playerid,"Guthaben", strval(value ));
  3540.     if(!strcmp(name, "Akku"))SetPVarInt(playerid,"Akku", strval(value ));
  3541.     if(!strcmp(name, "Klingelton"))SetPVarInt(playerid,"Klingelton", strval(value ));
  3542.     if(!strcmp(name, "Vertrag"))SetPVarInt(playerid,"Vertrag", strval(value ));
  3543.     if(!strcmp(name, "AppGps"))SetPVarInt(playerid,"AppGps", strval(value ));
  3544.     if(!strcmp(name, "TelefonBuch"))SetPVarInt(playerid,"TelefonBuch", strval(value ));
  3545.     if(!strcmp(name, "Nummer"))SetPVarInt(playerid,"Nummer", strval(value ));
  3546.     if(!strcmp(name, "Aver"))SetPVarInt(playerid,"Aver", strval(value ));
  3547.     if(!strcmp(name, "Kver"))SetPVarInt(playerid,"Kver", strval(value ));
  3548.     if(!strcmp(name, "TragbareNews"))SetPVarInt(playerid,"TragbareNews", strval(value ));
  3549.     if(!strcmp(name, "Premium"))SetPVarInt(playerid,"Premium", strval(value ));
  3550.     if(!strcmp(name, "PremiumTage"))SetPVarInt(playerid,"PremiumTage", strval(value ));
  3551.     if(!strcmp(name, "Helm"))SetPVarInt(playerid,"Helm", strval(value ));
  3552.     if(!strcmp(name, "Autos"))SetPVarInt(playerid,"Autos", strval(value ));
  3553.     if(!strcmp(name, "Wetter"))SetPVarInt(playerid,"Wetter", strval(value ));
  3554.     if(!strcmp(name, "PMStatus"))SetPVarInt(playerid,"PMStatus", strval(value ));
  3555.     if(!strcmp(name, "Haus"))SetPVarInt(playerid,"Haus", strval(value ));
  3556.     if(!strcmp(name, "Konto"))SetPVarInt(playerid,"Konto", strval(value ));
  3557.     if(!strcmp(name, "Karte"))SetPVarInt(playerid,"Karte", strval(value ));
  3558.     if(!strcmp(name, "Pin"))SetPVarInt(playerid,"Pin", strval(value ));
  3559.     if(!strcmp(name, "Personalausweis"))SetPVarInt(playerid,"Personalausweis", strval(value ));
  3560.     if(!strcmp(name, "Arbeitslosengeld"))SetPVarInt(playerid,"Arbeitslosengeld", strval(value ));
  3561.     if(!strcmp(name, "Mob"))SetPVarInt(playerid,"Mob", strval(value ));
  3562.     if(!strcmp(name, "Sap"))SetPVarInt(playerid,"Sap", strval(value ));
  3563.     if(!strcmp(name, "SupportSperre"))SetPVarInt(playerid,"SupportSperre", strval(value ));
  3564.     if(!strcmp(name, "Fschein"))SetPVarInt(playerid,"Fschein", strval(value ));
  3565.     if(!strcmp(name, "Member"))SetPVarInt(playerid,"Member", strval(value ));
  3566.     if(!strcmp(name, "Leader"))SetPVarInt(playerid,"Leader", strval(value ));
  3567.     if(!strcmp(name, "Rank"))SetPVarInt(playerid,"Rank", strval(value ));
  3568.     if(!strcmp(name, "Job"))SetPVarInt(playerid,"Job", strval(value ));
  3569.     if(!strcmp(name, "ServerPunkte"))SetPVarInt(playerid,"ServerPunkte", strval(value ));
  3570.     if(!strcmp(name, "ServerPunkteb"))SetPVarInt(playerid,"ServerPunkteb", strval(value ));
  3571.     if(!strcmp(name, "Jailed"))SetPVarInt(playerid,"Jailed", strval(value ));
  3572.     if(!strcmp(name, "JailTime"))SetPVarInt(playerid,"JailTime", strval(value ));
  3573.     if(!strcmp(name, "NewsSkill"))SetPVarInt(playerid,"NewsSkill", strval(value ));
  3574.     if(!strcmp(name, "PaintballKills"))SetPVarInt(playerid,"PaintballKills", strval(value ));
  3575.     if(!strcmp(name, "PaintballTode"))SetPVarInt(playerid,"PaintballTode", strval(value ));
  3576.     if(!strcmp(name, "PaintballWaffe"))SetPVarInt(playerid,"PaintballWaffe", strval(value ));
  3577.     if(!strcmp(name, "PaintballPunkte"))SetPVarInt(playerid,"PaintballPunkte", strval(value ));
  3578.     if(!strcmp(name, "Warnungen"))SetPVarInt(playerid,"Warnungen", strval(value ));
  3579.     if(!strcmp(name, "Warnung1"))SetPVarInt(playerid,"Warnung1", strval(value ));
  3580.     if(!strcmp(name, "Warnung2"))SetPVarInt(playerid,"Warnung2", strval(value ));
  3581.     if(!strcmp(name, "Warnung3"))SetPVarInt(playerid,"Warnung3", strval(value ));
  3582.     return 1;
  3583. }
  3584.  
  3585. forward PlayerAdminLevel(playerid, name[], value[]);
  3586. public PlayerAdminLevel(playerid, name[], value[])
  3587. {
  3588.     if(!strcmp(name, "AdminLevel"))SetPVarInt(playerid,"AdminLevel", strval(value ));
  3589. }
  3590.  
  3591. forward OnPlayerLogin(playerid);
  3592. public OnPlayerLogin(playerid)
  3593. {
  3594.     if(IsPlayerNPC(playerid)) return 1;
  3595.     SetPVarInt(playerid, "Authentication", 1);
  3596.    
  3597.     SetPVarInt(playerid, "JustLogged", 1);
  3598.     DeletePVar(playerid, "Newbie");
  3599.     DeletePVar(playerid, "Garage");
  3600.  
  3601.     RemovePlayerAttachedObject(playerid,0);
  3602.  
  3603.     pStats[playerid][pLogins] += 1;
  3604.  
  3605.     LoadPlayerCar(playerid);
  3606.  
  3607.     Handy[playerid][Nummer] = pStats[playerid][pnumber];
  3608.     Handy[playerid][Akku] = pStats[playerid][pAkku];
  3609.     Handy[playerid][HatHandy] = 0;
  3610.     SetPVarInt(playerid, "HandyStatus", 1);
  3611.     wirdangerufen[playerid] = -1;
  3612.     Anderer[playerid] = 0-1;
  3613.  
  3614.     //Untere Leiste
  3615.     TextDrawHideForPlayer(playerid,Stats0[playerid]);
  3616.     TextDrawHideForPlayer(playerid,Stats1[playerid]);
  3617.     TextDrawHideForPlayer(playerid,Stats2[playerid]);
  3618.     TextDrawHideForPlayer(playerid,Stats3[playerid]);
  3619.     TextDrawHideForPlayer(playerid,Stats4[playerid]);
  3620.  
  3621.     UpdateStats(playerid);
  3622.    
  3623.     new string[100];
  3624.     new tmp2[70];
  3625.     ClearChat(playerid);
  3626.     format(string, sizeof(string), "* Willkommen zurück, %s.", GetName(playerid));
  3627.     SendClientMessage(playerid,COLOR_YELLOW, string);
  3628.     format(tmp2, sizeof(tmp2), "~b~Willkommen~n~~y~ %s", GetName(playerid));
  3629.     GameTextForPlayer(playerid, tmp2, 5000, 1);
  3630.  
  3631.     SpawnPlayer(playerid);
  3632.     return 1;
  3633. }
  3634.  
  3635. forward PlayerPassword(playerid, name[], value[]);
  3636. public PlayerPassword(playerid, name[], value[])
  3637. {
  3638. if (!strcmp( name, "Password" ) )
  3639.     {
  3640.         SetPVarString(playerid, "pPass", value);
  3641.     }
  3642. }
  3643.  
  3644. // ---------------[Taxisystem]--------------- //
  3645.  
  3646. forward Closettor();
  3647. public Closettor()
  3648. {
  3649.     MoveDynamicObject(taxitor, 1805.054321, -1890.907959, 14.005671, 3.0);
  3650.     taxitoro = 0;
  3651.     return 1;
  3652. }
  3653.  
  3654. forward closetaxiaufzug();
  3655. public closetaxiaufzug()
  3656. {
  3657.     MoveDynamicObject(taxiaufzug,1756.080688, -1919.567383, 20.266584, 4.0);
  3658.     taxiaufzugo = 0;
  3659.     return 1;
  3660. }
  3661.  
  3662. // ---------------[Clear Chat]--------------- //
  3663.  
  3664. stock ClearChat(playerid)
  3665. {
  3666.     for(new i = 1; i != 60; i++)
  3667.     {
  3668.         SendClientMessage(playerid, COLOR_GREY, "");
  3669.     }
  3670.     return 1;
  3671. }
  3672.  
  3673. // ---------------[Garsino's "CarMenu" FS]--------------- //
  3674.  
  3675. stock IsVehicleOccupied(vehicleid)
  3676. {
  3677.     foreach(Player, i)
  3678.     {
  3679.         if(GetPlayerState(i) == PLAYER_STATE_DRIVER || GetPlayerState(i) == PLAYER_STATE_PASSENGER)
  3680.         {
  3681.             if(GetPlayerVehicleID(i) == vehicleid)
  3682.             {
  3683.                 return 1;
  3684.             }
  3685.         }
  3686.     }
  3687.     return 0;
  3688. }
  3689.  
  3690. stock CreateVehicleEx(playerid, modelid, Float:posX, Float:posY, Float:posZ, Float:angle, Colour1, Colour2, respawn_delay)
  3691. {
  3692.     new world = GetPlayerVirtualWorld(playerid);
  3693.     new interior = GetPlayerInterior(playerid);
  3694.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  3695.     {
  3696.         DestroyVehicle(GetPlayerVehicleID(playerid));
  3697.         GetPlayerPos(playerid, posX, posY, posZ);
  3698.         GetPlayerFacingAngle(playerid, angle);
  3699.         CurrentSpawnedVehicle[playerid] = CreateVehicle(modelid, posX, posY, posZ, angle, Colour1, Colour2, respawn_delay);
  3700.         LinkVehicleToInterior(CurrentSpawnedVehicle[playerid], interior);
  3701.         SetVehicleVirtualWorld(CurrentSpawnedVehicle[playerid], world);
  3702.         SetVehicleZAngle(CurrentSpawnedVehicle[playerid], angle);
  3703.         PutPlayerInVehicle(playerid, CurrentSpawnedVehicle[playerid], 0);
  3704.     }
  3705.     if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  3706.     {
  3707.         if(!IsVehicleOccupied(CurrentSpawnedVehicle[playerid])) DestroyVehicle(CurrentSpawnedVehicle[playerid]);
  3708.         GetPlayerPos(playerid, posX, posY, posZ);
  3709.         GetPlayerFacingAngle(playerid, angle);
  3710.         CurrentSpawnedVehicle[playerid] = CreateVehicle(modelid, posX, posY, posZ, angle, Colour1, Colour2, respawn_delay);
  3711.         LinkVehicleToInterior(CurrentSpawnedVehicle[playerid], interior);
  3712.         SetVehicleVirtualWorld(CurrentSpawnedVehicle[playerid], world);
  3713.         SetVehicleZAngle(CurrentSpawnedVehicle[playerid], angle);
  3714.         PutPlayerInVehicle(playerid, CurrentSpawnedVehicle[playerid], 0);
  3715.         SetPlayerInterior(playerid, interior);
  3716.     }
  3717.     return 1;
  3718. }
  3719.  
  3720. Float:DistanceCameraTargetToLocation(Float:CamX, Float:CamY, Float:CamZ,  Float:ObjX, Float:ObjY, Float:ObjZ,  Float:FrX, Float:FrY, Float:FrZ)
  3721. {
  3722.  
  3723.     new Float:TGTDistance;
  3724.  
  3725.     // get distance from camera to target
  3726.     TGTDistance = floatsqroot((CamX - ObjX) * (CamX - ObjX) + (CamY - ObjY) * (CamY - ObjY) + (CamZ - ObjZ) * (CamZ - ObjZ));
  3727.  
  3728.     new Float:tmpX, Float:tmpY, Float:tmpZ;
  3729.  
  3730.     tmpX = FrX * TGTDistance + CamX;
  3731.     tmpY = FrY * TGTDistance + CamY;
  3732.     tmpZ = FrZ * TGTDistance + CamZ;
  3733.  
  3734.     return floatsqroot((tmpX - ObjX) * (tmpX - ObjX) + (tmpY - ObjY) * (tmpY - ObjY) + (tmpZ - ObjZ) * (tmpZ - ObjZ));
  3735. }
  3736.  
  3737. stock IsPlayerAimingAt(playerid, Float:x, Float:y, Float:z, Float:radius)
  3738. {
  3739.     new Float:cx,Float:cy,Float:cz,Float:fx,Float:fy,Float:fz;
  3740.     GetPlayerCameraPos(playerid, cx, cy, cz);
  3741.     GetPlayerCameraFrontVector(playerid, fx, fy, fz);
  3742.     return (radius >= DistanceCameraTargetToLocation(cx, cy, cz, x, y, z, fx, fy, fz));
  3743. }
  3744.  
  3745. // --------------------[Nagelbänder]-------------------- //
  3746.  
  3747. stock CreateStrip(Float:x,Float:y,Float:z,Float:Angles)
  3748. {
  3749.     for(new i = 0; i < sizeof(SpikeInfo); i++)
  3750.     {
  3751.         if(SpikeInfo[i][sCreated] == 0)
  3752.         {
  3753.             SpikeInfo[i][sCreated]=1;
  3754.             SpikeInfo[i][sX]=x;
  3755.             SpikeInfo[i][sY]=y;
  3756.             SpikeInfo[i][sZ]=z-0.7;
  3757.             SpikeInfo[i][sObject] = CreateDynamicObject(2899, x, y, z-0.9, 0, 0, Angles-90);
  3758.             nagelband +=1;
  3759.             return 1;
  3760.         }
  3761.     }
  3762.     return 0;
  3763. }
  3764.  
  3765. stock DeleteAllStrip()
  3766. {
  3767.     for(new i = 0; i < sizeof(SpikeInfo); i++)
  3768.     {
  3769.         if(SpikeInfo[i][sCreated] == 1)
  3770.         {
  3771.             SpikeInfo[i][sCreated]=0;
  3772.             SpikeInfo[i][sX]=0.0;
  3773.             SpikeInfo[i][sY]=0.0;
  3774.             SpikeInfo[i][sZ]=0.0;
  3775.             DestroyDynamicObject(SpikeInfo[i][sObject]);
  3776.             nagelband =0;
  3777.         }
  3778.     }
  3779.     return 0;
  3780. }
  3781.  
  3782. stock DeleteClosestStrip(playerid)
  3783. {
  3784.     for(new i = 0; i < sizeof(SpikeInfo); i++)
  3785.     {
  3786.         if(IsPlayerInRangeOfPoint(playerid, 2.0, SpikeInfo[i][sX], SpikeInfo[i][sY], SpikeInfo[i][sZ]))
  3787.         {
  3788.             if(SpikeInfo[i][sCreated] == 1)
  3789.             {
  3790.                 SpikeInfo[i][sCreated]=0;
  3791.                 SpikeInfo[i][sX]=0.0;
  3792.                 SpikeInfo[i][sY]=0.0;
  3793.                 SpikeInfo[i][sZ]=0.0;
  3794.                 DestroyDynamicObject(SpikeInfo[i][sObject]);
  3795.                 nagelband -=1;
  3796.                 return 1;
  3797.             }
  3798.         }
  3799.     }
  3800.     return 0;
  3801. }
  3802.  
  3803. encode_tires(tires1, tires2, tires3, tires4) {
  3804.  
  3805.     return tires1 | (tires2 << 1) | (tires3 << 2) | (tires4 << 3);
  3806.  
  3807. }
  3808.  
  3809. // --------------------[Blitzer]-------------------- //
  3810.  
  3811. stock CreateSpeedCam(Float:x,Float:y,Float:z,Float:rot,range,limit,fine)
  3812. {
  3813.     if(currentid +1 > CAMERA_LIMIT)
  3814.     {
  3815.         print("Error! Das maximum an Blitzern wurde erreicht!");
  3816.         return -1;
  3817.     }
  3818.     currentid++;
  3819.     SpeedCameras[currentid][_x] = x;
  3820.     SpeedCameras[currentid][_y] = y;
  3821.     SpeedCameras[currentid][_z] = z;
  3822.     SpeedCameras[currentid][_rot] = rot;
  3823.     SpeedCameras[currentid][_range] = range;
  3824.     SpeedCameras[currentid][_limit] = limit;
  3825.     SpeedCameras[currentid][_fine] = fine;
  3826.     SpeedCameras[currentid][_usemph] = 0;
  3827.     SpeedCameras[currentid][_objectid] = CreateDynamicObject(18880,x,y,z-1,0,0,rot+180);
  3828.     SpeedCameras[currentid][_active] = true;
  3829.     return currentid;
  3830. }
  3831. stock DestroySpeedCam(cameraid)
  3832. {
  3833.     SpeedCameras[cameraid][_active] = false;
  3834.     DestroyObject(SpeedCameras[cameraid][_objectid]);
  3835.     return 1;
  3836. }
  3837. stock SetSpeedCamRange(cameraid,limit)
  3838. {
  3839.     SpeedCameras[cameraid][_limit] = limit;
  3840.     return 1;
  3841. }
  3842. stock SetSpeedCamFine(cameraid,fine)
  3843. {
  3844.     SpeedCameras[cameraid][_fine] = fine;
  3845.     return 1;
  3846. }
  3847.  
  3848. // --------------------[Geschwindigkeits Messung]-------------------- //
  3849.  
  3850. stock SendClientMessageEx(playerid,color,type[],{Float,_}:...)
  3851. {
  3852.     new string[128];
  3853.     for(new i = 0;i<numargs() -2;i++)
  3854.     {
  3855.         switch(type[i])
  3856.         {
  3857.             case 's':
  3858.             {
  3859.                 new result[128];
  3860.                 for(new a= 0;getarg(i +3,a) != 0;a++)
  3861.                 {
  3862.                     result[a] = getarg(i +3,a);
  3863.                 }
  3864.                 if(!strlen(string))
  3865.                 {
  3866.                     format(string,sizeof string,"%s",result);
  3867.                 } else format(string,sizeof string,"%s%s",string,result);
  3868.             }
  3869.  
  3870.             case 'i':
  3871.             {
  3872.                 new result = getarg(i +3);
  3873.                 if(!strlen(string))
  3874.                 {
  3875.                     format(string,sizeof string,"%i",result);
  3876.                 } else format(string,sizeof string,"%s%i",string,result);
  3877.             }
  3878.  
  3879.             case 'f':
  3880.             {
  3881.                 new Float:result = Float:getarg(i +3);
  3882.                 if(!strlen(string))
  3883.                 {
  3884.                     format(string,sizeof string,"%f",result);
  3885.                 } else format(string,sizeof string,"%s%f",string,result);
  3886.             }
  3887.         }
  3888.     }
  3889.     SendClientMessage(playerid,color,string);
  3890.     return 1;
  3891. }
  3892.  
  3893. // --------------------[PushPlayer]-------------------- //
  3894. stock PushPlayer(playerid, Float:X1, Float:Y2)
  3895. {
  3896.     new
  3897.        Float:pX1,
  3898.        Float:pY2;
  3899.        GetPlayerPos(playerid, X1, Y2); //Zeile 26344
  3900.  
  3901.     new Float:ang = (-acos((X1 - pX1) / floatsqroot((X1 - pX1)*(X1 - pX1) + (Y2 - pY2)*(Y2 - pY2))) - 90.0);
  3902.     pX1 = (-3 * floatsin(-ang, degrees));
  3903.     pY2= (-3 * floatcos(-ang, degrees));
  3904.  
  3905.     if(GetPlayerState(playerid) == 2)
  3906.     {
  3907.         SetVehicleVelocity(GetPlayerVehicleID(playerid), pX1+5, pY2+5, 100.0);
  3908.         SetVehicleHealth(GetPlayerVehicleID(playerid), 15.0);
  3909.     }
  3910.     else if(GetPlayerState(playerid) == 1)
  3911.     {
  3912.         SetPlayerVelocity(playerid, pX1+5, pY2+5,100.0);
  3913.     }
  3914.     SetPlayerHealth(playerid, 15.0);
  3915.     return 0;
  3916. }
  3917.  
  3918. // --------------------[Geld System]-------------------- //
  3919.  
  3920. stock GivePlayerEuro(playerid,euros)
  3921. {
  3922.         SetPVarInt(playerid,"Euros",GetPVarInt(playerid,"Euros")+euros);
  3923.         new cashtext[64];
  3924.         format(cashtext,64,"%d Euro",GetPVarInt(playerid,"Euros"));
  3925.         TextDrawSetString(Money2[playerid],cashtext);
  3926. }
  3927.  
  3928. stock EnoughEuro(playerid,euros)
  3929. {
  3930.         if(GetPVarInt(playerid,"Euros") > euros) return 1;
  3931.         else if((GetPVarInt(playerid,"Euros") == euros)) return 1;
  3932.         else return 0;
  3933. }
  3934.  
  3935. stock ResetPlayerEuro(playerid)
  3936. {
  3937.     SetPVarInt(playerid,"Euros",0);
  3938.     GivePlayerEuro(playerid,0);
  3939. }
  3940.  
  3941. stock GetPlayerEuros(playerid)
  3942. {
  3943.         return GetPVarInt(playerid,"Euros");
  3944. }
  3945.  
  3946. stock SetPlayerEuro(playerid,euros)
  3947. {
  3948.     SetPVarInt(playerid,"Euros",0);
  3949.     GivePlayerEuro(playerid,euros);
  3950. }
  3951.  
  3952. // --------------------[Waffen Anti System]-------------------- //
  3953.  
  3954. stock GetWeaponModel(weaponid) // credits Double-O-Seven
  3955.         {
  3956.                 switch(weaponid)
  3957.                 {
  3958.                     case 1:
  3959.                         return 331;
  3960.  
  3961.                         case 2..8:
  3962.                             return weaponid+331;
  3963.  
  3964.                 case 9:
  3965.                             return 341;
  3966.  
  3967.                         case 10..15:
  3968.                                 return weaponid+311;
  3969.  
  3970.                         case 16..18:
  3971.                             return weaponid+326;
  3972.  
  3973.                         case 22..29:
  3974.                             return weaponid+324;
  3975.  
  3976.                         case 30,31:
  3977.                             return weaponid+325;
  3978.  
  3979.                         case 32:
  3980.                             return 372;
  3981.  
  3982.                         case 33..45:
  3983.                             return weaponid+324;
  3984.  
  3985.                         case 46:
  3986.                             return 371;
  3987.                 }
  3988.                 return 0;
  3989.         }
  3990.  
  3991. // --------------------[Facing Player]-------------------- //
  3992. stock IsPlayerFacingPlayer(playerid, targetid, Float:dOffset)
  3993. {
  3994.     new
  3995.         Float:pX,
  3996.         Float:pY,
  3997.         Float:pZ,
  3998.         Float:pA,
  3999.         Float:X,
  4000.         Float:Y,
  4001.         Float:Z,
  4002.         Float:ang;
  4003.  
  4004.     if(!IsPlayerConnected(playerid) || !IsPlayerConnected(targetid)) return 0;
  4005.  
  4006.     GetPlayerPos(targetid, pX, pY, pZ);
  4007.     GetPlayerPos(playerid, X, Y, Z);
  4008.     GetPlayerFacingAngle(playerid, pA);
  4009.  
  4010.     if( Y > pY ) ang = (-acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
  4011.     else if( Y < pY && X < pX ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 450.0);
  4012.     else if( Y < pY ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
  4013.  
  4014.     return AngleInRangeOfAngle(-ang, pA, dOffset);
  4015. }
  4016.  
  4017. // --------------------[AngleinRangeofRangle]-------------------- //
  4018.  
  4019. stock AngleInRangeOfAngle(Float:a1, Float:a2, Float:range)
  4020. {
  4021.     a1 -= a2;
  4022.     if((a1 < range) && (a1 > -range)) return true;
  4023.  
  4024.     return false;
  4025. }
  4026.  
  4027. // --------------------[Lotto System]-------------------- //
  4028.  
  4029. stock MakeNumber()
  4030. {
  4031.     Number[0] = random(99);
  4032.     Number[1] = random(99);
  4033.     Number[2] = random(99);
  4034.     Number[3] = random(99);
  4035.     Number[4] = random(99);
  4036.     Number[5] = random(99);
  4037. }
  4038.  
  4039. stock MakePlayerNumber(playerid)
  4040. {
  4041.     PlayerNumber[0][playerid] = random(99);
  4042.     PlayerNumber[1][playerid] = random(99);
  4043.     PlayerNumber[2][playerid] = random(99);
  4044.     PlayerNumber[3][playerid] = random(99);
  4045.     PlayerNumber[4][playerid] = random(99);
  4046.     PlayerNumber[5][playerid] = random(99);
  4047. }
  4048.  
  4049. // --------------------[PlayerToPlayer]-------------------- //
  4050.  
  4051. stock PlayerToPlayer(playerid,targetid,Float:distance)
  4052. {
  4053.     new Float:x, Float:y, Float:z;
  4054.     GetPlayerPos(playerid,x,y,z);
  4055.     if(IsPlayerInRangeOfPoint(targetid,distance,x,y,z))
  4056.     {
  4057.         return true;
  4058.     }
  4059.     return false;
  4060. }
  4061.  
  4062. // --------------------[PlayerToPoint]-------------------- //
  4063.  
  4064. PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  4065. {
  4066.     new Float:oldposx, Float:oldposy, Float:oldposz;
  4067.     new Float:tempposx, Float:tempposy, Float:tempposz;
  4068.     GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  4069.     tempposx = (oldposx -x);
  4070.     tempposy = (oldposy -y);
  4071.     tempposz = (oldposz -z);
  4072.     if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  4073.     {
  4074.         return 1;
  4075.     }
  4076.     return 0;
  4077. }
  4078.  
  4079. // --------------------[Tuningarage]-------------------- //
  4080.  
  4081. stock StartGarage(playerid)
  4082. {
  4083.     SetPVarInt(playerid, "Garage", 1);
  4084.     TogglePlayerControllable(playerid, false);
  4085.     ShowPlayerDialog(playerid, DIALOG_GARAGE1, DIALOG_STYLE_LIST, "Tuninggarage","{00AA00}1. {FFFFFF}Farbe\n{00AA00}2. {FFFFFF}Paintjob\n{00AA00}3. {FFFFFF}Nitro\n{00AA00}4. {FFFFFF}Neonlichter\n{00AA00}5. {FFFFFF}Reifen\n{00AA00}6. {FFFFFF}Soundanlage\n{00AA00}6. {FFFFFF}Spoiler\n{00AA00}7. {FFFFFF}Hydraulik\n{00AA00}8. {FFFFFF}Auspuff\n{00AA00}9. {FFFFFF}Dach\n{00AA00}10. {FFFFFF}Heckstoßstange\n{00AA00}11. {FFFFFF}Frontstoßstange\n{00AA00}12. {FFFFFF}Seitenteile", "Auswählen", "Abbrechen");
  4086.    
  4087. }
  4088.  
  4089. stock StopGarage(playerid)
  4090. {
  4091.     TogglePlayerControllable(playerid, true);
  4092.     TgateB = 0;
  4093.     SendClientMessage(playerid,COLOR_WHITE,"{FFFF00}Tuninggarage: {FFFFFF}Beehren Sie uns bald wieder!");
  4094.     MoveDynamicObject(tgate0,1518.26220700,-1476.00231900,7.48960700,2);
  4095.     MoveDynamicObject(tgate,1529.72448700,-1474.88757300,8.53587000 ,2);
  4096.     MoveDynamicObject(tgate1,1518.25378400,-1474.64648400,7.46458500 ,2);
  4097.     MoveDynamicObject(tgate2,1520.91699200,-1475.98803700,7.48958300 ,2);
  4098.     MoveDynamicObject(tgate3,1520.91577100,-1474.64892600,7.48958300 ,2);
  4099.     MoveDynamicObject(tgate4,1523.55273400,-1475.99853500,7.48960800 ,2);
  4100.     MoveDynamicObject(tgate5,1523.57202100,-1474.65380900,7.48960800 ,2);
  4101.     MoveDynamicObject(tgate6,1518.24743700,-1473.30639600,7.46460800 ,2);
  4102.     MoveDynamicObject(tgate7,1520.91491700,-1473.30334500,7.46460800 ,2);
  4103.     MoveDynamicObject(tgate8,1523.57458500,-1473.29760700,7.46460800 ,2);
  4104.     MoveDynamicObject(tgate9,1516.72961400,-1476.32873500,8.60031800 ,2);
  4105.     MoveDynamicObject(tgate10,1517.60376000,-1476.72082500,9.29875500 ,2);
  4106.     MoveDynamicObject(tgate11,1517.60107400,-1472.48510700,9.24875500 ,2);
  4107.     SetPVarInt(playerid, "Garage", 0);
  4108.  
  4109. }
  4110.  
  4111. stock UpdateStats(playerid)
  4112. {
  4113.     new string[150];
  4114.     new jtext[25];
  4115.     if(pStats[playerid][pJob] == 0) { jtext = "Arbeitslos"; }
  4116.     else if(pStats[playerid][pJob] == 1) { jtext = "Mechatroniker"; }
  4117.     else if(pStats[playerid][pJob] == 2) { jtext = "Taxifahrer"; }
  4118.     else if(pStats[playerid][pJob] > 2) { jtext = "Arbeitslos"; }
  4119.     else if(pStats[playerid][pJob] == 99) { jtext = "Hartz IV"; }
  4120.  
  4121.     format(string, sizeof(string),"Level: ~r~%d",pStats[playerid][pLevel]);
  4122.     TextDrawSetString(Stats4[playerid],string); // Level Update
  4123.     format(string, sizeof(string),"Job: ~r~%s",jtext);
  4124.     TextDrawSetString(Stats2[playerid],string); // Job Update
  4125.     format(string, sizeof(string),"Spielpunkte : ~r~%d/%d",pStats[playerid][pSpunkte],pStats[playerid][pSpunkteb]);
  4126.     TextDrawSetString(Stats3[playerid],string); // Punkte Update
  4127. }
  4128.  
  4129. // --------------------[Helmsystem]-------------------- //
  4130.  
  4131. stock SetPlayerHelm(playerid)
  4132. {
  4133.     if(pStats[playerid][pHelm] == 1)
  4134. {
  4135.     SendClientMessage(playerid,COLOR_WHITE,"Du hast dir deinen Helm erfolgreich aufgesetzt!");
  4136.     SetPlayerAttachedObject(playerid, 1, 18645, 2, 0.07, 0.0, 0.0, 88, 75, 0);
  4137.     SetPVarInt(playerid, "Helm", 1);
  4138. }
  4139.     if(pStats[playerid][pHelm] == 2)
  4140. {
  4141.     SendClientMessage(playerid,COLOR_WHITE,"Du hast dir deinen Helm erfolgreich aufgesetzt!");
  4142.     SetPlayerAttachedObject(playerid, 1, 18976, 2, 0.07, 0.0, 0.0, 88, 75, 0);
  4143.     SetPVarInt(playerid, "Helm", 1);
  4144. }
  4145.     if(pStats[playerid][pHelm] == 3)
  4146. {
  4147.     SendClientMessage(playerid,COLOR_WHITE,"Du hast dir deinen Helm erfolgreich aufgesetzt!");
  4148.     SetPlayerAttachedObject(playerid, 1, 18977, 2, 0.07, 0.0, 0.0, 88, 75, 0);
  4149.     SetPVarInt(playerid, "Helm", 1);
  4150. }
  4151.     if(pStats[playerid][pHelm] == 4)
  4152. {
  4153.     SendClientMessage(playerid,COLOR_WHITE,"Du hast dir deinen Helm erfolgreich aufgesetzt!");
  4154.     SetPlayerAttachedObject(playerid, 1, 18978, 2, 0.07, 0.0, 0.0, 88, 75, 0);
  4155. }
  4156.     if(pStats[playerid][pHelm] == 5)
  4157. {
  4158.     SendClientMessage(playerid,COLOR_WHITE,"Du hast dir deinen Helm erfolgreich aufgesetzt!");
  4159.     SetPlayerAttachedObject(playerid, 1, 18979, 2, 0.07, 0.0, 0.0, 88, 75, 0);
  4160.     SetPVarInt(playerid, "Helm", 1);
  4161. }
  4162. }
  4163.  
  4164. // --------------------[ReturnUser]-------------------- //
  4165.  
  4166. stock ReturnUser(text[], playerid = INVALID_PLAYER_ID)
  4167. {
  4168.         new pos = 0;
  4169.         while (text[pos] < 0x21) // Strip out leading spaces
  4170.         {
  4171.                 if (text[pos] == 0) return INVALID_PLAYER_ID; // No passed text
  4172.                 pos++;
  4173.         }
  4174.         new userid = INVALID_PLAYER_ID;
  4175.         if (IsNumeric(text[pos])) // Check whole passed string
  4176.         {
  4177.                 // If they have a numeric name you have a problem (although names are checked on id failure)
  4178.                 userid = strval(text[pos]);
  4179.                 if (userid >=0 && userid < MAX_PLAYERS)
  4180.                 {
  4181.                         if(!IsPlayerConnected(userid))
  4182.                         {
  4183.                                 /*if (playerid != INVALID_PLAYER_ID)
  4184.                                 {
  4185.                                         SendClientMessage(playerid, 0xFF0000AA, "User not connected");
  4186.                                 }*/
  4187.                                 userid = INVALID_PLAYER_ID;
  4188.                         }
  4189.                         else
  4190.                         {
  4191.                                 return userid; // A player was found
  4192.                         }
  4193.                 }
  4194.                 /*else
  4195.                 {
  4196.                         if (playerid != INVALID_PLAYER_ID)
  4197.                         {
  4198.                                 SendClientMessage(playerid, 0xFF0000AA, "Invalid user ID");
  4199.                         }
  4200.                         userid = INVALID_PLAYER_ID;
  4201.                 }
  4202.                 return userid;*/
  4203.                 // Removed for fallthrough code
  4204.         }
  4205.         // They entered [part of] a name or the id search failed (check names just incase)
  4206.         new len = strlen(text[pos]);
  4207.         new count = 0;
  4208.         new name[MAX_PLAYER_NAME];
  4209.     foreach(Player, i)
  4210.     {
  4211.                 if (IsPlayerConnected(i))
  4212.                 {
  4213.                         GetPlayerName(i, name, sizeof (name));
  4214.                         if (strcmp(name, text[pos], true, len) == 0) // Check segment of name
  4215.                         {
  4216.                                 if (len == strlen(name)) // Exact match
  4217.                                 {
  4218.                                         return i; // Return the exact player on an exact match
  4219.                                         // Otherwise if there are two players:
  4220.                                         // Me and MeYou any time you entered Me it would find both
  4221.                                         // And never be able to return just Me's id
  4222.                                 }
  4223.                                 else // Partial match
  4224.                                 {
  4225.                                         count++;
  4226.                                         userid = i;
  4227.                                 }
  4228.                         }
  4229.                 }
  4230.         }
  4231.         if (count != 1)
  4232.         {
  4233.                 if (playerid != INVALID_PLAYER_ID)
  4234.                 {
  4235.                         if (count)
  4236.                         {
  4237.                                 SendClientMessage(playerid, 0xFF0000AA, "Multiple users found, please narrow earch");
  4238.                         }
  4239.                         else
  4240.                         {
  4241.                                 SendClientMessage(playerid, 0xFF0000AA, "No matching user found");
  4242.                         }
  4243.                 }
  4244.                 userid = INVALID_PLAYER_ID;
  4245.         }
  4246.    return userid; // INVALID_USER_ID for bad return
  4247. }
  4248.  
  4249. // --------------------[IsNumeric]-------------------- //
  4250.  
  4251. stock IsNumeric(const string[])
  4252. {
  4253.         for (new i = 0, j = strlen(string); i < j; i++)
  4254.         {
  4255.                 if (string[i] > '9' || string[i] < '0') return 0;
  4256.         }
  4257.         return 1;
  4258. }
  4259.  
  4260. // --------------------[Internetcafe]-------------------- //
  4261.  
  4262. stock StartBot(playerid)
  4263. {
  4264.     new cartyp = GetPVarInt(playerid, "Car");
  4265.     leihcar[playerid] = CreateServerVehicle(0,cartyp,417.9730,-1818.5844,5.2867,0.6873,1,1,0,0);
  4266.     SetVehicleNumberPlate(leihcar[playerid], GetName(playerid));
  4267.     SetPVarInt(playerid, "Car", 0);
  4268.     leihcar[playerid] = leihcar[playerid];
  4269.     foreach(Player, i)
  4270.     {
  4271.         if(IsPlayerNPC(i))
  4272.         {
  4273.             new npcname[MAX_PLAYER_NAME];
  4274.             GetPlayerName(i, npcname, sizeof(npcname));
  4275.             if(!strcmp(npcname, "Ralle", true))
  4276.             {
  4277.                 IsLogged[i] = 1;
  4278.                 PutPlayerInVehicle(i, leihcar[playerid], 0);
  4279.                 SetPlayerChatBubble(i,"Ralle: {FFFFFF}So dann fahren wir mal zum Internetcafe!",0xFFFF00DD,35.0,6000);
  4280.             }
  4281.         }
  4282.     }
  4283. }
  4284.  
  4285. stock ShowEmail(playerid)
  4286. {
  4287.         new string[128],
  4288.             name[MAX_PLAYER_NAME],
  4289.             inbox,
  4290.             outbox;
  4291.  
  4292.         GetPlayerName(playerid,name,MAX_PLAYER_NAME);
  4293.  
  4294.         format(string,sizeof(string),"SELECT `New` FROM `emails` WHERE `Reciever`='%s@"#EMAIL_NAME"' AND `New`=1",name);
  4295.         QUERY(string);
  4296.         STORE;
  4297.         inbox = ROWS;
  4298.         FREE;
  4299.  
  4300.         format(string,sizeof(string),"SELECT `New` FROM `emails` WHERE `Sender`='%s@"#EMAIL_NAME"' AND `New`=1",name);
  4301.         QUERY(string);
  4302.         STORE;
  4303.         outbox = ROWS;
  4304.         FREE;
  4305.  
  4306.         format(string,sizeof(string),"{FFFFFF}\
  4307.                                         Eingang({FF0000}%i{FFFFFF} Neu)\n\
  4308.                                         Ausgang({FF0000}%i{FFFFFF} Ungelesen)\n\
  4309.                                         Email Erstellen",inbox,outbox);
  4310.         ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST,"E-Mail",string,"OK","Zurück");
  4311.         return 1;
  4312. }
  4313.  
  4314. // --------------------[Speedometer]-------------------- //
  4315.  
  4316. stock SetT(playerid)
  4317. {
  4318. new car = GetPlayerVehicleID(playerid);
  4319. new string[90];
  4320. if(IsAAdminCar(car) || IsACopCar(car) || IsASanCar(car) || IsAFahrschulCar(car) || IsATaxiCar(car))
  4321. {
  4322.     format(string, sizeof(string), "Tuev: ~g~%gueltig");
  4323.     TextDrawSetString(Speedo5[playerid],string);
  4324. }
  4325. if(IsAFahrrad(car))
  4326. {
  4327.     format(string, sizeof(string), "Tuev: ~g~- - - - - -");
  4328.     TextDrawSetString(Speedo5[playerid],string);
  4329. }
  4330. if(IsABoat(car)|| IsAPlane(car))
  4331. {
  4332.     format(string, sizeof(string), "Tuev: ~g~- - - - - -");
  4333.     TextDrawSetString(Speedo5[playerid],string);
  4334. }
  4335. if(car == gangstercar)
  4336. {
  4337.     format(string, sizeof(string), "Tuev: ~g~%gueltig");
  4338.     TextDrawSetString(Speedo5[playerid],string);
  4339. }
  4340. if(!IsAAdminCar(car) && !IsACopCar(car) && !IsASanCar(car) && !IsAFahrrad(car) && !IsAFahrschulCar(car) && !IsATaxiCar(car) && car != gangstercar)
  4341. {
  4342.     format(string, sizeof(string), "Tuev: ~r~%ungueltig");
  4343.     TextDrawSetString(Speedo5[playerid],string);
  4344. }
  4345. }
  4346.  
  4347. stock SetPunkte(playerid)
  4348. {
  4349.     new string[90];
  4350. new punkte = pStats[playerid][pSap];
  4351. if(punkte < 8)
  4352. {
  4353.     format(string, sizeof(string), "Punkte in SA: ~g~%d", punkte);
  4354.     TextDrawSetString(Speedo4[playerid],string);
  4355. }
  4356. if(punkte > 8)
  4357. {
  4358.     format(string, sizeof(string), "Punkte in SA: ~y~%d", punkte);
  4359.     TextDrawSetString(Speedo4[playerid],string);
  4360. }
  4361. if(punkte > 10)
  4362. {
  4363.     format(string, sizeof(string), "Punkte in SA: ~r~%d", punkte);
  4364.     TextDrawSetString(Speedo4[playerid],string);
  4365. }
  4366. if(punkte >= 12)
  4367. {
  4368.     if(IsPlayerInAnyVehicle(playerid))
  4369.     {
  4370.     RemovePlayerFromVehicle(playerid);
  4371.     pStats[playerid][pSap] = 0;
  4372.     pStats[playerid][pCarLic] = 0;
  4373.     format(string, sizeof(string), "Punkte in SA: ~r~%d", punkte);
  4374.     TextDrawSetString(Speedo4[playerid],string);
  4375.     SendClientMessage(playerid,COLOR_YELLOW,"Du hattest 12 Punkte in San Andreas, dein Führerschein wurde dir abgenommen.");
  4376.     SendClientMessage(playerid,COLOR_YELLOW,"Gehe zur Fahrschule in Los Santos und lasse dir einen neuen erstellen!");
  4377.     SendClientMessage(playerid,COLOR_LIGHTRED,"Deine Punkte in San Andreas wurden auf 0 gesetzt!");
  4378. }
  4379. }
  4380. }
  4381. stock SetHealth(playerid) // Danke an Sniper für seine Zustand berechnung.
  4382. {
  4383. new string[90];
  4384. new Float:CarHealth;
  4385. GetVehicleHealth(GetPlayerVehicleID(playerid),CarHealth);
  4386. CarHealth = CarHealth - 250;
  4387. CarHealth = CarHealth /10;
  4388. CarHealth = CarHealth /75;
  4389. CarHealth = CarHealth *100;
  4390. new CarHealthIni =floatround(CarHealth,floatround_floor);
  4391. if(CarHealthIni < 0){CarHealthIni = 0;}
  4392. if(CarHealthIni > 50)
  4393. {
  4394.     format(string, sizeof(string), "Zustand: ~g~%d%", CarHealthIni);
  4395.     TextDrawSetString(Speedo3[playerid],string);
  4396. }
  4397. if(CarHealthIni < 50)
  4398. {
  4399.     format(string, sizeof(string), "Zustand: ~y~%d%", CarHealthIni);
  4400.     TextDrawSetString(Speedo3[playerid],string);
  4401. }
  4402. if(CarHealthIni < 25)
  4403. {
  4404.     format(string, sizeof(string), "Zustand: ~r~%d%", CarHealthIni);
  4405.     TextDrawSetString(Speedo3[playerid],string);
  4406. }
  4407. }
  4408. stock SetSpeed(playerid)
  4409. {
  4410. for(new b = 0;b<currentid +1;b++)
  4411. {
  4412. new speed = floatround(GetVehicleSpeed(GetPlayerVehicleID(playerid),SpeedCameras[b][_usemph]));
  4413. new string[140];
  4414. if(speed < 100)
  4415. {
  4416. format(string, sizeof(string), "Tempo: ~g~%d KM/h", speed);
  4417. TextDrawSetString(Speedo0[playerid],string);
  4418. }
  4419. if(speed > 100)
  4420. {
  4421. format(string, sizeof(string), "Tempo: ~y~%d KM/h", speed);
  4422. TextDrawSetString(Speedo0[playerid],string);
  4423. }
  4424. if(speed > 119)
  4425. {
  4426. format(string, sizeof(string), "Tempo: ~r~%d KM/h", speed);
  4427. TextDrawSetString(Speedo0[playerid],string);
  4428. }
  4429. }
  4430. }
  4431.  
  4432. /*stock mktime(hour,minute,second,day,month,year) {
  4433.     new timestamp2;
  4434.  
  4435.     timestamp2 = second + (minute * 60) + (hour * 3600);
  4436.  
  4437.     new days_of_month[12];
  4438.  
  4439.     if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) ) {
  4440.             days_of_month = {31,29,31,30,31,30,31,31,30,31,30,31}; // Schaltjahr
  4441.         } else {
  4442.             days_of_month = {31,28,31,30,31,30,31,31,30,31,30,31}; // keins
  4443.         }
  4444.     new days_this_year = 0;
  4445.     days_this_year = day;
  4446.     if(month > 1) { // No January Calculation, because its always the 0 past months
  4447.         for(new i=0; i<month-1;i++) {
  4448.             days_this_year += days_of_month[i];
  4449.         }
  4450.     }
  4451.     timestamp2 += days_this_year * 86400;
  4452.  
  4453.     for(new j=1970;j<year;j++) {
  4454.         timestamp2 += 31536000;
  4455.         if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) )  timestamp2 += 86400; // Schaltjahr + 1 Tag
  4456.     }
  4457.  
  4458.     return timestamp2;
  4459. }*/
  4460.  
  4461. /*stock ValidEmail2(email[]) {
  4462.   new len=strlen(email);
  4463.   new cstate=0;
  4464.   new i;
  4465.   for(i=0;i<len;i++) {
  4466.     if ((cstate==0 || cstate==1) && (email[i]>='A' && email[i]<='Z') || (email[i]>='a' && email[i]<='z')  || (email[i]=='.')  || (email[i]=='-')  || (email[i]=='_'))
  4467.     {
  4468.     } else {
  4469.        // Ok no A..Z,a..z,_,.,-
  4470.        if ((cstate==0) &&(email[i]=='@')) {
  4471.           // its an @ after the name, ok state=1;
  4472.           cstate=1;
  4473.        } else {
  4474.           // Its stuff which is not allowed
  4475.           return false;
  4476.        }
  4477.     }
  4478.   }
  4479.   if (cstate<1) return false;
  4480.   if (len<6) return false;
  4481.   // A toplevel domain has only 3 to 4 signs :-)
  4482.   if ((email[len-3]=='.') || (email[len-4]=='.') || (email[len-5]=='.')) return true;
  4483.   return false;
  4484. }*/
  4485.  
  4486. stock arrlen(&constinteger)
  4487. {
  4488.     new tmp[12];
  4489.     format(tmp, 12, "%i", constinteger);
  4490.     return strlen(tmp);
  4491. }
  4492.  
  4493. stock PlaySoundCool(playerid)
  4494. {
  4495.     new Float:px,Float:py,Float:pz;
  4496.     GetPlayerPos(playerid, px, py, pz);
  4497.     foreach(Player,i)
  4498. {
  4499.     if(PlayerToPoint(5.0,i,px,py,pz))
  4500. {
  4501.     GMusic[i] = Audio_Play(i, 97, false, false, false);
  4502.     Audio_SetVolume(i, GMusic[playerid], 100);
  4503. }
  4504. }
  4505. }
  4506. // --------------------[Autohaus]-------------------- //
  4507.  
  4508. InitComponents(componentid)
  4509. {
  4510.     new i;
  4511.     for(i=0; i<20; i++)
  4512.     {
  4513.     if(spoiler[i][0]==componentid) { return 1; }
  4514.     }
  4515.     for(i=0; i<3; i++)
  4516.     {
  4517.         if(nitro[i][0]==componentid) { return 2; }
  4518.     }
  4519.     for(i=0; i<23; i++)
  4520.     {
  4521.         if(fbumper[i][0]==componentid) { return 3; }
  4522.     }
  4523.     for(i=0; i<22; i++)
  4524.     {
  4525.         if(rbumper[i][0]==componentid) { return 4; }
  4526.     }
  4527.     for(i=0; i<28; i++)
  4528.     {
  4529.         if(exhaust[i][0]==componentid) { return 5; }
  4530.     }
  4531.     for(i=0; i<2; i++)
  4532.     {
  4533.         if(bventr[i][0]==componentid) { return 6; }
  4534.     }
  4535.     for(i=0; i<2; i++)
  4536.     {
  4537.         if(bventl[i][0]==componentid) { return 7; }
  4538.     }
  4539.     for(i=0; i<4; i++)
  4540.     {
  4541.         if(bscoop[i][0]==componentid) { return 8; }
  4542.     }
  4543.     for(i=0; i<13; i++)
  4544.     {
  4545.         if(rscoop[i][0]==componentid) { return 9; }
  4546.     }
  4547.     for(i=0; i<21; i++)
  4548.     {
  4549.         if(SlideL[i][0]==componentid) { return 10; }
  4550.     }
  4551.     for(i=0; i<21; i++)
  4552.     {
  4553.         if(SlideR[i][0]==componentid) { return 11; }
  4554.     }
  4555.     if(hydraulics[0][0]==componentid) { return 12; }
  4556.     if(base[0][0]==componentid) { return 13; }
  4557.     for(i=0; i<2; i++)
  4558.     {
  4559.         if(rbbars[i][0]==componentid) { return 14; }
  4560.     }
  4561.     for(i=0; i<2; i++)
  4562.     {
  4563.         if(fbbars[i][0]==componentid) { return 15; }
  4564.     }
  4565.     for(i=0; i<17; i++)
  4566.     {
  4567.         if(wheels[i][0]==componentid) { return 16; }
  4568.     }
  4569.     for(i=0; i<2; i++)
  4570.     {
  4571.         if(lights[i][0]==componentid) { return 17; }
  4572.     }
  4573.     return 0;
  4574. }
  4575.  
  4576. stock ini_GetKey( line[] )
  4577. {
  4578.     new keyRes[256];
  4579.     keyRes[0] = 0;
  4580.     if ( strfind( line , "=" , true ) == -1 ) return keyRes;
  4581.     strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
  4582.     return keyRes;
  4583. }
  4584.  
  4585. stock ini_GetValue( line[] )
  4586. {
  4587.     new valRes[256];
  4588.     valRes[0]=0;
  4589.     if ( strfind( line , "=" , true ) == -1 ) return valRes;
  4590.     strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
  4591.     return valRes;
  4592. }
  4593.  
  4594. // --------------------[Log Files]-------------------- //
  4595.  
  4596. stock ServerLog(adminname[], playername[], action[], reason[]) // Kicks, bans, warns, slaps, etc.
  4597. {
  4598.     new hour, minute, second, year, month, day;
  4599.     getdate(year, month, day);
  4600.     gettime(hour, minute, second);
  4601.  
  4602.     format(Query, sizeof(Query), "INSERT INTO `server Logs` (`Admin Name`, `Player Name`, `Action`, `Reason`, `Date`, `Time`) VALUES('%s', '%s', '%s', '%s', '%d/%d/%d', '%d:%d:%d')", adminname, playername, action, reason, month, day, year, hour, minute, second);
  4603.     mysql_query(Query);
  4604. }
  4605.  
  4606. stock AdminLog(adminname[], action[])
  4607. {
  4608.     new hour, minute, second, year, month, day;
  4609.     getdate(year, month, day);
  4610.     gettime(hour, minute, second);
  4611.  
  4612.     format(Query, sizeof(Query), "INSERT INTO `admin Logs` (`Admin Name`, `Action`, `Date`, `Time`) VALUES('%s', '%s', '%d/%d/%d', '%d:%d:%d')", adminname, action, month, day, year, hour, minute, second);
  4613.     mysql_query(Query);
  4614. }
  4615.  
  4616. stock CNNLog(adminname[], playername[], action[], reason[])
  4617. {
  4618.     new hour, minute, second, year, month, day;
  4619.     getdate(year, month, day);
  4620.     gettime(hour, minute, second);
  4621.  
  4622.     format(Query, sizeof(Query), "INSERT INTO `cnn log` (`Vergeben`,`Erhalten`, `Was`,`Menge`, `Datum`, `Zeit`) VALUES('%s','%s','%s', '%d', '%d/%d/%d', '%d:%d:%d')", adminname, playername, action, reason, month, day, year, hour, minute, second);
  4623.     mysql_query(Query);
  4624. }
  4625.  
  4626.  
  4627. // --------------------[AntiDeAmx]-------------------- //
  4628.  
  4629. AntiDeAMX()
  4630. {
  4631. new a[][] =
  4632. {
  4633. "Unarmed  (Fist)",
  4634. "Brass K"
  4635. };
  4636. #pragma  unused a
  4637. } //Zeile 27083
Add Comment
Please, Sign In to add comment