Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock StopShow()
- {
- foreach(Player, i)
- {
- if(GetPVarInt(i, "InDerShow") == 1)
- {
- SetPlayerPos(i,1210.5896,3.5140,1000.9219);
- SetPlayerFacingAngle(i,171.8069);
- SetPlayerHealth(i,100.0);
- ClearChat(i);
- SendClientMessage(i,COLOR_YELLOW,"Nach der Vorführung fühlst du dich sehr erholt du strahlst vor Glück.");
- SendClientMessage(i,COLOR_YELLOW,"Deine Lebensenergie ist wieder auf 100 angestiegen.");
- RefreshPlayerNachShow(i); //Zeile 22458
- PrivateStatus = 0;
- }
- }
- }
- stock InitPlayerConnection(playerid)
- {
- ResetPlayerVariables(playerid);
- IsLogged[playerid] = 0;
- new file[128], string[460];
- format(file,sizeof(file),"Spieler/%s.txt",GetName(playerid));
- if(!fexist(file))
- {
- ClearChat(playerid);
- 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","");
- }
- if(fexist(file))
- {
- format(file,sizeof(file),"Spieler/%s.txt",GetName(playerid));
- INI_ParseFile(file, "LoadUser", false, true, playerid, true, false );
- ClearChat(playerid);
- format(string, sizeof(string),"{FFFFFF}Willkommen zurück {FFD700}%s{FFFFFF},\n\nBitte gebe dein Passwort ein um dich zu authentifizieren.",GetName(playerid));
- ShowPlayerDialog(playerid,1, DIALOG_STYLE_INPUT,"Authentifizierung",string, "Login", "");
- SendClientMessage(playerid, COLOR_WHITE, "Dein Account wurde gefunden. Bitte gebe dein Passwort ein um dich anzumelden.");
- SendClientMessage(playerid, COLOR_WHITE, "");
- }
- return 1;
- }
- /*stock SavePlayerAccount(playerid)
- {
- if(IsPlayerNPC(playerid)) return 1;
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- 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));
- mysql_query(Query);
- GetPlayerHealth(playerid, pStats[playerid][pHealth]);
- GetPlayerArmour(playerid, pStats[playerid][pArmour]);
- GetPlayerPos(playerid, pStats[playerid][pPosX], pStats[playerid][pPosY], pStats[playerid][pPosZ]);
- 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'"
- ,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],
- 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));
- mysql_query(Query);
- GetPlayerIp(playerid, pStats[playerid][pIPAddress], 17);
- 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'",
- 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],
- 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],
- pStats[playerid][pPMStatus], GetEscName(playerid));
- mysql_query(Query);
- }
- else print("[MySQL ERROR] SavePlayerAccount() was called, but to a non-connected ID.");
- return 1;
- }*/
- /*stock LoadAccountVariables(playerid)
- {
- if(IsPlayerNPC(playerid)) return 1;
- new EscapedName[MAX_PLAYER_NAME];
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- mysql_real_escape_string(GetName(playerid), EscapedName);
- format(Query, sizeof(Query), "SELECT * FROM `accounts` WHERE `Username` = '%s'", EscapedName);
- mysql_query(Query);
- mysql_store_result();
- mysql_fetch_row_format(Query, "|");
- sscanf(Query, "e<p<|>s[24]s[129]s[64]s[129]s[17]ddddfffffdddddddddddddddddddddddddddddddddddddddddddddddds[128]s[128]s[128]>", pStats[playerid]);
- }
- else print("[MySQL ERROR] LoadAccountVariables() was called, but to a non-connected ID.");
- mysql_free_result();
- }
- stock GetFromAccount(username[], obtaining[], holdingvar[])
- {
- format(Query, sizeof(Query), "SELECT `%s` FROM `accounts` WHERE `Username` = '%s'", obtaining, username);
- mysql_query(Query);
- mysql_store_result();
- if(mysql_fetch_row(holdingvar) == 1)
- {
- mysql_free_result();
- }
- return 1;
- }*/
- // --------------------------------------------------------------------- //
- stock LoadVehiclesFromDatabase()
- {
- new Str[67], dModel, Float:VX, Float:VY, Float:VZ, Float:VA,FraktionsID,ScheinID,Farbe1, Farbe2 ,vTotal;
- mysql_query("SELECT * FROM `vehicles`");
- mysql_store_result();
- vTotal = mysql_num_rows();
- if(vTotal > 0)
- {
- while(mysql_fetch_row(Str))
- {
- sscanf(Str, "p<|>iffffiiii", dModel, VX, VY, VZ, VA,FraktionsID,ScheinID,Farbe1, Farbe2);
- CreateServerVehicle(0,dModel,VX,VY,VZ,VA,Farbe1,Farbe2,FraktionsID,ScheinID);
- }
- }
- mysql_free_result();
- printf("** Es wurden %i Fahrzeuge erfolgreich aus der Datenbank geladen **", vTotal);
- return 1;
- }
- stock SaveVehiclesToDatabase(Float:VX, Float:VY, Float:VZ, Float:VA, dModel, FraktionsID , ScheinID, Farbe1, Farbe2)
- {
- 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)",
- dModel, VX, VY, VZ, VA,FraktionsID,ScheinID,Farbe1,Farbe2);
- mysql_query(Query);
- mysql_free_result();
- return 1;
- }
- stock SaveBlitzerToDatabase(Float:VX, Float:VY, Float:VZ, Float:VA,Range,Speed)
- {
- format(Query, sizeof(Query), "INSERT INTO `Blitzer` (BlitzerX, BlitzerY, BlitzerZ, BlitzerA, BlitzerRange, BlitzerSpeed) VALUES(%f, %f, %f, %f,%d,%d)",
- VX, VY, VZ, VA,Range,Speed);
- mysql_query(Query);
- mysql_free_result();
- return 1;
- }
- stock LoadBlitzerFromDatabase()
- {
- new Strr[67], Float:BX, Float:BY, Float:BZ, Fload:BA,Range,Speed,ATMS;
- mysql_query("SELECT * FROM `blitzer`");
- mysql_store_result();
- ATMS = mysql_num_rows();
- if(ATMS > 0)
- {
- while(mysql_fetch_row(Strr))
- {
- sscanf(Strr, "p<|>ffffii", BX, BY, BZ,BA,Range,Speed); //Zeile 22602
- CreateSpeedCam(BX,BY,BZ,BA,Range,Speed,0); //Zeile 22603
- }
- }
- mysql_free_result();
- printf("** Es wurden %i Blitzer erfolgreich aus der Datenbank geladen **", ATMS);
- return 1;
- }
- stock SaveATMToDatabase(Float:VX, Float:VY, Float:VZ)
- {
- new Query[200];
- format(Query, sizeof(Query), "INSERT INTO `ATM` (ATMX, ATMY, ATMZ) VALUES(%f, %f, %f)",
- VX, VY, VZ);
- mysql_query(Query);
- mysql_free_result();
- return 1;
- }
- stock LoadATMFromDatabase()
- {
- new Str[67], Float:ATMX, Float:ATMY, Float:ATMZ, ATMS;
- mysql_query("SELECT * FROM `atm`");
- mysql_store_result();
- ATMS = mysql_num_rows();
- if(ATMS > 0)
- {
- while(mysql_fetch_row(Str))
- {
- sscanf(Str, "p<|>fff", ATMX, ATMY, ATMZ);
- AddATM(2942,ATMX,ATMY,ATMZ-0.36,0.0000,0.0000,270.0000, -1, -1, -1, 120);
- CreateDynamicObject(2942,ATMX,ATMY,ATMZ-0.36,0.0000,0.0000,270.0000, -1, -1, -1, 120);
- }
- }
- mysql_free_result();
- printf("** Es wurden %i ATM Automaten erfolgreich aus der Datenbank geladen **", ATMS);
- return 1;
- }
- stock LoadTicketsFromDatabase(playerid)
- {
- new Str[67], Ersteller, IP, inputtext, tickets;
- mysql_query("SELECT * FROM `tickets`");
- mysql_store_result();
- tickets = mysql_num_rows();
- if(tickets > 0)
- {
- while(mysql_fetch_row(Str))
- {
- sscanf(Str, "e<u< | >s[34]s[12]s[17]s[124]>", Ersteller, Datum, IP,inputtext);//22653
- new string[200];
- //format(string,sizeof(string),"Ersteller: %s | Datum: %s | IP: %s | Nachricht: %s.",Ersteller,Datum,IP,inputtext);
- format(string,sizeof(string),"%s %s %s %s",Ersteller,Datum,IP,inputtext);//Zeile 22656
- SendClientMessage(playerid,COLOR_YELLOW,string);
- SendClientMessage(playerid,COLOR_WHITE,"---------------------------------------------------------");
- }
- }
- mysql_free_result();
- printf("** Es wurden %i Support Tickets aus der Datenbank geladen **", tickets);
- return 1;
- }
- stock LoadMapIconFromDatabase()
- {
- new Str[67], MType, Float:MX, Float:MY, Float:MZ, MColor, Icons;
- mysql_query("SELECT * FROM `mapicons`");
- mysql_store_result();
- Icons = mysql_num_rows();
- if(Icons > 0)
- {
- while(mysql_fetch_row(Str))
- {
- sscanf(Str, "p<|>fffii", MX, MY, MZ, MType, MColor);
- CreateDynamicMapIcon(MX, MY, MZ, MType, MColor, -1, -1, -1, MAPICONDISTANCE);
- }
- }
- mysql_free_result();
- printf("** Es wurden %i Mapicons erfolgreich aus der Datenbank geladen **", Icons);
- return 1;
- }
- stock SaveMapIconToDatabase(Float:MX, Float:MY, Float:MZ, MType, MColor)
- {
- format(Query, sizeof(Query), "INSERT INTO `mapicons` (MapIconX, MapIconY, MapIconZ, MapIconType, MapIconColor) VALUES(%f, %f, %f, %d, %d)",
- MX, MY, MZ, MType, MColor);
- mysql_query(Query);
- mysql_free_result();
- return 1;
- }
- stock AddATM(Float:nnnx,Float:nnny,Float:nnnz,Float:nnnrx,Float:nnnry,Float:nnnrz)
- {
- atm[atmcounter][atpx] = nnnx;
- atm[atmcounter][atpy] = nnny;
- atm[atmcounter][atpz] = nnnz;
- CreateDynamicObject(2942,nnnx,nnny,nnnz,nnnrx,nnnry,nnnrz, -1, -1, -1, 120);
- atmcounter++;
- return 1;
- }
- stock SaveStaatskasse()
- {
- format(Query, sizeof(Query), "UPDATE `configurations` (Staatskasse) VALUES(%d)",
- Staatskasse);
- mysql_query(Query);
- mysql_free_result();
- return 1;
- }
- stock LoadStaatskasse()
- {
- new Str[67];
- mysql_query("SELECT `Staatskasse` FROM `configurations`");
- mysql_store_result();
- while(mysql_fetch_row(Str))
- {
- sscanf(Str, "i", Staatskasse);
- }
- mysql_free_result();
- printf("** Die Staatskasse wurde erfolgreich aus der Datenbank geladen **");
- return 1;
- }
- // --------------------------------------------------------------------- //
- GetVehicleModelIDFromName(vname[])
- {
- for(new i = 0; i < 211; i++)
- {
- if(strfind(VehicleNames[i], vname, true) != -1)
- return i + 400;
- }
- return -1;
- }
- stock GetEscName(playerid)
- {
- new EscapedName[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, name, sizeof(name));
- mysql_real_escape_string(name, EscapedName);
- }
- else EscapedName = "Unknown";
- return EscapedName;
- }
- stock GetName(playerid)
- {
- new name[MAX_PLAYER_NAME];
- if(IsPlayerConnected(playerid)) GetPlayerName(playerid, name, sizeof(name));
- else name = "Unbekannt";
- return name;
- }
- stock GetNameA(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, MAX_PLAYER_NAME);
- return name;
- }
- forward SendAdminMessage(color, string[], requireduty);
- public SendAdminMessage(color, string[], requireduty)
- {
- foreach(Player, i)
- {
- if(pStats[i][pAdminLevel] >= 1)
- {
- if(GetPVarInt(i, "Authentication") == 1)
- {
- if(requireduty == 1)
- {
- if(GetPVarInt(i, "AdminDuty") == 1) SendClientMessage(i, color, string);
- else return 0;
- }
- else if(requireduty == 0)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- return 1;
- }
- forward SendJobMessage(job,color, string[]);
- public SendJobMessage(job, color, string[])
- {
- foreach(Player, i)
- {
- if(GetPVarInt(i, "Authentication") == 1)
- {
- if(pStats[i][pJob] == job)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- forward NearByMessage(playerid, color, string[]);
- public NearByMessage(playerid, color, string[])
- {
- new Float: PlayerX, Float: PlayerY, Float: PlayerZ;
- foreach(Player, i)
- {
- if(GetPVarInt(i, "Authentication") == 1)
- {
- GetPlayerPos(playerid, PlayerX, PlayerY, PlayerZ);
- if(PlayerToPoint(i, 12, PlayerX, PlayerY, PlayerZ))
- {
- if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i) && GetPlayerInterior(playerid) == GetPlayerInterior(i))
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- return 1;
- }
- stock GetNameEx(playerid) // This is VERY useful for RP server types. It's a function, like "GetName()", but removes the "_" from their name! :)
- {
- new str[24], String[128];
- GetPlayerName(playerid, String, 24);
- strmid(str, String, 0, strlen(String), 24);
- for(new i = 0; i < MAX_PLAYER_NAME; i++)
- {
- if (str[i] == '_') str[i] = ' ';
- }
- return str;
- }
- forward ClearTextSpam(playerid);
- public ClearTextSpam(playerid)
- {
- SetPVarInt(playerid, "TextSpam", 0);
- }
- forward EndMute(playerid);
- public EndMute(playerid)
- {
- if(PlayerMuted[playerid] == 1)
- {
- PlayerMuted[playerid] = 0;
- SendClientMessage(playerid,COLOR_WHITE,"Du wurdest wieder entmutet, bitte lasse das Chat spammen jetzt sein!");
- }
- }
- forward ClearCommandSpam(playerid);
- public ClearCommandSpam(playerid)
- {
- SetPVarInt(playerid, "CommandSpam", 0);
- }
- //Allgemeiner Timer2
- forward Timer2();
- public Timer2()
- {
- foreach(Player, i)
- {
- //James
- new color = random(25);
- new colors[25] = {
- 0xFF0000FF, 0xFF2C00FF, 0xFF5000FF, 0xFF8700FF, 0xFFA700FF,
- 0xFFDC00FF, 0xFFFB00FF, 0xC4FF00FF, 0x7BFF00FF, 0x00FF00FF,
- 0x00FF1EFF, 0x00FF3BFF, 0x00FF7CFF, 0x00FFAEFF, 0x00FFD5FF,
- 0x00FFFFFF, 0x00CCFFFF, 0x00ACFFFF, 0x0083FFFF, 0x0054FFFF,
- 0x0000FFFF, 0x2C00FFFF, 0x5F00FFFF, 0x9B00FFFF, 0xCB00FFFF
- };
- new str[5][170] = {
- {"James : Herzlich Willkommen auf dem Gaming-Lounge Reallife Server."},
- {"James : Solltest du Probleme haben benutze /support."},
- {"James : Besuch doch mal bitte unsere Homepage auf nemesus.de."},
- {"James : Du möchtest eine Servereinführung dann benutze /einweisung."},
- {"James : Halte dich bitte an die /regeln."}
- };
- new npcname[MAX_PLAYER_NAME];
- GetPlayerName(i, npcname, sizeof(npcname));
- if(!strcmp(npcname, "James", true))
- {
- SetPlayerChatBubble(i,str[random(5)],colors[color],35.0,8000);
- ApplyAnimation(i, "ON_LOOKERS","wave_loop", 4.0, 1, 1, 1, 1, 0, 1);
- }
- if(!strcmp(npcname, "Steffen", true))
- {
- SetPlayerChatBubble(i,"Hier gehts zur Fahrschule. Heute 20% auf alles!",0xFF0000FF,35.0,8000);
- ApplyAnimation(i, "ON_LOOKERS","wave_loop", 4.0, 1, 1, 1, 1, 0, 1);
- }
- if(!strcmp(npcname, "Lilly", true))
- {
- ApplyAnimation(i, "DANCING","DAN_Down_A", 4.0, 1, 1, 1, 1, 0, 1);
- }
- if(!strcmp(npcname, "Beatrix", true))
- {
- ApplyAnimation(i, "DANCING","dance_loop", 4.0, 1, 1, 1, 1, 0, 1);
- }
- if(!strcmp(npcname, "DJ_Paddy", true))
- {
- SetPlayerChatBubble(i,"PARTY!",0xFF0000FF,35.0,8000);
- new anm = random(7);
- switch(anm)
- {
- case 0:ApplyAnimation(i, "SCRATCHING","scdldlp", 4.0, 1, 1, 1, 1, 0, 1);
- case 1:ApplyAnimation(i, "SCRATCHING","scdlulp", 4.0, 1, 1, 1, 1, 0, 1);
- case 2:ApplyAnimation(i, "SCRATCHING","scdrdlp", 4.0, 1, 1, 1, 1, 0, 1);
- case 3:ApplyAnimation(i, "SCRATCHING","scdrulp", 4.0, 1, 1, 1, 1, 0, 1);
- /*case 4:ApplyAnimation(i, "SCRATCHING","sclng_l", 4.0, 1, 1, 1, 1, 0, 1);
- case 5:ApplyAnimation(i, "SCRATCHING","sclng_r", 4.0, 1, 1, 1, 1, 0, 1);
- case 6:ApplyAnimation(i, "SCRATCHING","scmid_l", 4.0, 1, 1, 1, 1, 0, 1);
- case 7:ApplyAnimation(i, "SCRATCHING","scmid_r", 4.0, 1, 1, 1, 1, 0, 1);*/
- case 4:ApplyAnimation(i,"RIOT", "RIOT_CHANT",4.1,1,1,1,1,0,1);
- case 5:ApplyAnimation(i, "DANCING","dnce_M_b", 4.0, 1, 1, 1, 1, 0, 1);
- case 6:ApplyAnimation(i, "SCRATCHING","sclng_l", 4.0, 1, 1, 1, 1, 0, 1);
- }
- }
- }
- }
- forward Timer3();
- public Timer3()
- {
- foreach(Player, i)
- {
- if (GetPVarInt(i, "Authentication") == 1)
- {
- //Taxi
- if(TaxiCallTime[i] > 0)
- {
- if(TaxiAccepted[i] < 999)
- {
- if(IsPlayerConnected(TaxiAccepted[i]))
- {
- new Float:Xx,Float:Yy,Float:Zz;
- GetPlayerPos(TaxiAccepted[i], Xx, Yy, Zz);
- SetPlayerCheckpoint(i, Xx, Yy, Zz, 5);
- }
- }
- }
- //Wetter System
- new Float:xx, Float:yy, Float:zz;
- GetPlayerPos(i, xx, yy, zz);
- if((xx > -992.5172 && xx < 4000.0000) && (yy < 528.0000 && yy > -4000.0000 && PlayerPaintballing[i] < 1 && pStats[i][pWetter] == 1)) //Los Santos
- {
- SetPlayerWeather(i, Weather[0]);
- //Los Santos
- }
- if((xx > -4000.0000 && xx< -992.5172) && (yy < 4000.0000 && yy > -4000.0000 && PlayerPaintballing[i] < 1 && pStats[i][pWetter] == 1)) //San Fierro
- {
- SetPlayerWeather(i, Weather[1]);
- //San Fierro
- }
- if((xx > -992.5172 && xx< 4000.0000) && (yy < 4000.0000 && yy > 528.0000 && PlayerPaintballing[i] < 1 && pStats[i][pWetter] == 1)) //Las Venturas
- {
- SetPlayerWeather(i, Weather[2]);
- //Las Venturas
- }
- if(IsPlayerInAnyVehicle(i))
- {
- SetSpeed(i); // Um die Geschnwindigkeit zu ermitteln!
- SetHealth(i); // Um den Zustand zu ermitteln!
- SetPunkte(i); // Um den Punkte in SA zu ermitteln!
- SetT(i); // Um den Tüv zu ermitteln!
- }
- if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
- {
- for(new ii = 0; ii < sizeof(SpikeInfo); ii++)
- {
- //22980 if(PlayerToPoint(ii, 3.0, SpikeInfo[ii][sX], SpikeInfo[ii][sY], SpikeInfo[ii][sZ]))
- {
- if(SpikeInfo[ii][sCreated] == 1)
- {
- new panels, doors, lightsss, tires;
- new carid = GetPlayerVehicleID(i);
- GetVehicleDamageStatus(carid, panels, doors, lightsss, tires);
- tires = encode_tires(1, 1, 1, 1);
- UpdateVehicleDamageStatus(carid, panels, doors, lightsss, tires);
- return 0;
- }
- }
- }
- }
- if(PaintballPlayers >= 2 && PaintballRound != 1 && StartingPaintballRound != 1)
- {
- StartingPaintballRound = 1;
- SetTimer("PreparePaintball", 15101, 0);
- }
- if(StartingPaintballRound == 1 && AnnouncedPaintballRound == 0)
- {
- AnnouncedPaintballRound = 1;
- if(PlayerPaintballing[i] != 0)
- {
- SendClientMessage(i, COLOR_YELLOW2, "Das Paintball Spiel startet in kürze . . .");
- }
- }
- new Float:pX,Float:pY,Float:pZ;
- GetPlayerPos(i, pX, pY, pZ);
- if(PlayerToPoint(70, i,2496.5850,2859.1453,10.3927))
- {//Admin radius
- if (pStats[i][pAdminLevel] >= 1)
- {
- }
- else
- {
- SetPlayerHealth(i,1.0);
- PushPlayer(i, pX+5, pY+10);
- GameTextForPlayer(i, "~r~Du bist kein ~w~Administrator!", 3000, 1);
- }
- }
- if(PlayerToPoint(70, i,2573.0884,2616.6218,10.3886))
- {//Admin radius2
- if (pStats[i][pAdminLevel] >= 1)
- {
- }
- else
- {
- SetPlayerHealth(i,0.0);
- PushPlayer(i, pX+5, pY+10);
- GameTextForPlayer(i, "~r~Du bist kein ~w~Administrator!", 3000, 1);
- }
- }
- if(PlayerToPoint(70, i,2495.5486,2771.0313,10.9571))
- {//Admin radius2
- if (pStats[i][pAdminLevel] >= 1)
- {
- }
- else
- {
- SetPlayerHealth(i,0.0);
- PushPlayer(i, pX+5, pY+10);
- GameTextForPlayer(i, "~r~Du bist kein ~w~Administrator!", 3000, 1);
- }
- }
- if(PlayerToPoint(70, i,2750.4521,2706.1936,10.3865))
- {//Admin radius3
- if (pStats[i][pAdminLevel] >= 1)
- {
- }
- else
- {
- SetPlayerHealth(i,1.0);
- PushPlayer(i, pX+5, pY+10);
- GameTextForPlayer(i, "~r~Du bist kein ~w~Administrator!", 3000, 1);
- }
- }
- if(PlayerToPoint(70, i,2705.4180,2858.7109,10.3856))
- {//Admin radius4
- if (pStats[i][pAdminLevel] >= 1)
- {
- }
- else
- {
- SetPlayerHealth(i,1.0);
- PushPlayer(i, pX+5, pY+10);
- GameTextForPlayer(i, "~r~Du bist kein ~w~Administrator!", 3000, 1);
- }
- }
- //Premium Island
- if(PlayerToPoint(21, i,943.1389,-1997.0626,13.1101))
- {//Premium radius
- if (pStats[i][pPremium] > 0)
- {
- }
- else
- {
- SetPlayerPos(i,1037.1064,-2018.4884,13.1491);
- SetPlayerFacingAngle(i,80.6178);
- GameTextForPlayer(i, "~r~Du hast keinen ~w~Premium Account!", 4000, 1);
- }
- }
- if(PlayerToPoint(21, i,903.8989,-1992.2764,13.1101))
- {//Premium radius
- if (pStats[i][pPremium] > 0)
- {
- }
- else
- {
- SetPlayerPos(i,1037.1064,-2018.4884,13.1491);
- SetPlayerFacingAngle(i,80.6178);
- GameTextForPlayer(i, "~r~Du hast keinen ~w~Premium Account!", 4000, 1);
- }
- }
- if(PlayerToPoint(21, i,892.6368,-2073.3718,13.1266))
- {//Premium radius
- if (pStats[i][pPremium] > 0)
- {
- }
- else
- {
- SetPlayerPos(i,1037.1064,-2018.4884,13.1491);
- SetPlayerFacingAngle(i,80.6178);
- GameTextForPlayer(i, "~r~Du hast keinen ~w~Premium Account!", 4000, 1);
- }
- }
- if(PlayerToPoint(21, i,933.2914,-2074.5181,13.2366))
- {//Premium radius
- if (pStats[i][pPremium] > 0)
- {
- }
- else
- {
- SetPlayerPos(i,1037.1064,-2018.4884,13.1491);
- SetPlayerFacingAngle(i,80.6178);
- GameTextForPlayer(i, "~r~Du hast keinen ~w~Premium Account!", 4000, 1);
- }
- }
- //AntiCheat
- if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK && (!noacheat))
- {
- if(pStats[i][pAdminLevel] > 0)
- {
- new string[128];
- if(pStats[i][pAdminLevel] > 0)
- {
- SetPlayerSpecialAction(i,SPECIAL_ACTION_NONE);
- format(string, sizeof(string), "Warnung: %s(%d) ist im Verdacht sich ein Jetpack zu cheaten!", GetName(i), i);
- SendAdminMessage(COLOR_LIGHTRED, string, 0);
- }
- else
- {
- format(string, sizeof(string), "** Anti-Cheat: %s wurde vom Server gebannt. Grund: Jetpack Cheat", GetName(i));
- SendMessageToAll(COLOR_LIGHTRED, string);
- SetPlayerSpecialAction(i,SPECIAL_ACTION_NONE);
- TogglePlayerControllable(i, false);
- BanEx(i, "Jetpack Cheat");
- Kick(i);
- }
- }
- }
- else if(GetPlayerMoney(i) > 0 && (!noacheat))
- {
- new string[128];
- if(pStats[i][pAdminLevel] > 0)
- {
- format(string, sizeof(string), "Warnung: %s(%d) ist im Verdacht Geld zu cheaten! (Summe: %d)", GetName(i), i, GetPlayerMoney(i));
- SendAdminMessage(COLOR_LIGHTRED, string, 0);
- new const old_money = GetPlayerEuros(i);
- ResetPlayerEuro(i), GivePlayerEuro(i, old_money);
- ResetPlayerMoney(i);
- }
- else
- {
- format(string, sizeof(string), "** Anti-Cheat: %s wurde vom Server gebannt. Grund: Geld Cheat | Summe: %d", GetName(i),GetPlayerMoney(i));
- SendMessageToAll(COLOR_LIGHTRED, string);
- new const old_money = GetPlayerEuros(i);
- ResetPlayerEuro(i), GivePlayerEuro(i, old_money);
- ResetPlayerMoney(i);
- TogglePlayerControllable(i, false);
- BanEx(i, "Geld Cheat");
- Kick(i);
- }
- }
- /* else if(pStats[i][pAdminLevel] < 1)
- {
- if(GetPlayerPing(i) > MAX_PING)
- {
- new string[128];
- 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));
- SendMessageToAll(COLOR_LIGHTRED, string);
- SendClientMessage(i,COLOR_WHITE,"Du wurdest wegen zu hohem Ping vom Server gekickt, bitte fixxe dein Ping und komm wieder.");
- TogglePlayerControllable(i, false);
- Kick(i);
- }
- }*/
- //Jailtimer
- if (GetPVarInt(i, "Authentication") == 1)
- {
- if(pStats[i][pJailed] != 0)
- {
- if(pStats[i][pJailTime] > 0)
- {
- pStats[i][pJailTime]--;
- }
- if(pStats[i][pJailTime] <= 0)
- {
- pStats[i][pJailTime] = 0;
- if(pStats[i][pJailed] == 1)
- {
- SetPlayerInterior(i, 0);
- SetPlayerPos(i,1769.4534,-1544.6775,9.7230);
- SetPlayerFacingAngle(i,30.4891);
- }
- new string[140];
- pStats[i][pJailed] = 0;
- pStats[i][pJailTime] = 0;
- SendClientMessage(i, COLOR_YELLOW2,"Du hast deine Haftstrafe abgesessen!");
- format(string, sizeof(string), "~g~Freiheit");
- DeletePVar(i, "JailDM");
- SetPlayerInterior(i, 0);
- SetPlayerPos(i, 1800.7522,-1576.5751,14.0625);
- SetPlayerFacingAngle(i,0625.285);
- GameTextForPlayer(i, string, 5000, 1);
- SetPlayerWorldBounds(i, 20000.0000,-20000.0000, 20000.0000, -20000.0000);
- }
- }
- }
- }
- }
- return 1;
- }
- forward Timer4();
- public Timer4()
- {
- //CNN Abrechnung pro Member
- new geld = cnn*200;
- CnnKasse +=geld;
- foreach(Player, i)
- {
- if (GetPVarInt(i, "Authentication") == 1)
- {
- //Wettersystem
- Weather[0] = WetterRandomLS[random(sizeof(WetterRandomLS))];
- Weather[1] = WetterRandomSF[random(sizeof(WetterRandomSF))];
- Weather[2] = WetterRandomLV[random(sizeof(WetterRandomLV))];
- }
- //Premium System
- if(pStats[i][pPremium] == 1 && pStats[i][pPremiumTage] > 2)
- {
- pStats[i][pPremiumTage] --;
- }
- if(pStats[i][pPremium] == 1 && pStats[i][pPremiumTage] == 1)
- {
- pStats[i][pPremiumTage] --;
- pStats[i][pPremium] = 0;
- SendClientMessage(i,COLOR_WHITE,"Dein Premium Account ist abgelaufen!");
- }
- //Handy System
- if(pStats[i][pHandy] == 1 && pStats[i][pAkku] > 0)
- {
- pStats[i][pAkku]--;
- }
- }
- }
- forward Timer1(playerid);
- public Timer1(playerid)
- {
- //Uhr
- new string[174],year,month,day,hours,minutes,seconds;
- getdate(year, month, day), gettime(hours, minutes, seconds);
- format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
- TextDrawSetString(Datum, string);
- format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
- TextDrawSetString(Uhrzeit, string);
- }
- stock Float:GetVehicleSpeed(vehicleid,UseMPH = 0)
- {
- new Float:speed_x,Float:speed_y,Float:speed_z,Float:temp_speed;
- GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
- if(UseMPH == 0)
- {
- temp_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*136.666667;
- } else {
- temp_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*85.4166672;
- }
- floatround(temp_speed,floatround_round);return temp_speed;
- }
- //Blitzer Timer
- forward Blitzer();
- public Blitzer()
- {
- foreach(Player, a)
- {
- new car = GetPlayerVehicleID(a);
- if(!IsPlayerConnected(a)) continue;
- if(!IsPlayerInAnyVehicle(a)) continue;
- if(!IsACopCar(car) && !IsAPlane(car) && !IsABoat(car) && !IsAFahrrad(car) && !IsAZug(car))
- {
- if(GetPVarInt(a,"PlayerHasBeenFlashed") == 1)
- {
- continue;
- } else if (GetPVarInt(a,"PlayerHasBeenFlashed") == 2)
- {
- DeletePVar(a,"PlayerHasBeenFlashed");
- continue;
- }
- for(new b = 0;b<currentid +1;b++)
- {
- if(SpeedCameras[b][_active] == false) continue;
- if(IsPlayerInRangeOfPoint(a,SpeedCameras[b][_range],SpeedCameras[b][_x],SpeedCameras[b][_y],SpeedCameras[b][_z]))
- {
- new speed = floatround(GetVehicleSpeed(GetPlayerVehicleID(a),SpeedCameras[b][_usemph]));
- new limit = SpeedCameras[b][_limit];
- if(speed > limit)
- {
- TextDrawShowForPlayer(a,flash);
- SetPVarInt(a,"PlayerHasBeenFlashed",1);
- SetTimerEx("RemoveFlash",CAMERA_FLASH_TIME,false,"i",a);
- if(GetPlayerState(a) == PLAYER_STATE_DRIVER)
- {
- if(SpeedCameras[b][_usemph] == 0)
- {
- SendClientMessageEx(a,COLOR_LIGHTRED,"sisis","Du fährst zu schnell! du wurdest geblitzt ",speed," KM/H, erlaubt gewesen wären: ",limit, " KM/H.");
- SendClientMessageEx(a,COLOR_LIGHTRED,"sis","Du musst eine Strafe von $",speed+35," bezahlen.");
- SendClientMessage(a,COLOR_LIGHTRED,"Außerdem hast du einen Punkt in San Andreas dazubekommen!");
- } else {
- SendClientMessageEx(a,0xFF1E00FF,"sisis","Du fährst zu schnell! du wurdest geblitzt",speed,"MP/H wären erlaubt gewesen zu fahren",limit, "MP/H.");
- SendClientMessageEx(a,0xFF1E00FF,"sis","Du musst eine Strafe von $",speed+35,"bezahlen.");
- }
- GivePlayerEuro(a, - speed+15);
- Staatskasse+=speed+35;
- pStats[a][pSap] +=1;
- }
- }
- }
- }
- }
- }
- }
- //Autosystem
- forward CreateServerVehicle(interior,modelid,Float:xxX,Float:y,Float:zzZ,Float:R,color1,color2,jobid,license);
- public CreateServerVehicle(interior,modelid,Float:xxX,Float:y,Float:zzZ,Float:R,color1,color2,jobid,license)
- {
- new v;
- v = CreateVehicle(modelid,Float:xxX,Float:y,Float:zzZ,Float:R,color1,color2,120000000);
- spawncar_job[v] = jobid;
- spawncar_license[v] = license;
- spawncar_interior[v] = interior;
- if(jobid == 94 &&!IsAMotorad(v))
- {
- SetVehicleNumberPlate(v,"Taxi");
- }
- if(jobid == 95 &&!IsAMotorad(v))
- {
- SetVehicleNumberPlate(v,"Autohaus");
- }
- if(jobid == 97 &&!IsAMotorad(v))
- {
- SetVehicleNumberPlate(v,"Fahrschule");
- }
- if(jobid == 99 &&!IsAMotorad(v))
- {
- SetVehicleNumberPlate(v,"Admin");
- }
- if(jobid == 1 &&!IsAMotorad(v))
- {
- SetVehicleNumberPlate(v,"LSPD");
- }
- if(jobid == 6 &&!IsAMotorad(v))
- {
- SetVehicleNumberPlate(v,"San");
- }
- if(IsABoat(v))
- {
- spawncar_license[v] = 4;
- }
- if(IsAPlane(v))
- {
- spawncar_license[v] = 3;
- }
- if(IsAMotorad(v))
- {
- spawncar_license[v] = 2;
- }
- if(interior != 0)
- {
- LinkVehicleToInterior(v, interior);
- }
- return v;
- }
- forward GetBottle(bot,playerid);
- public GetBottle(bot,playerid)
- {
- new geld;
- geld = GetPlayerEuros(playerid);
- if(!strcmp(PlayerOrder[playerid],"bier",true))
- {
- if(geld < 6)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (6€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
- GivePlayerEuro(playerid, -6);
- }
- if(!strcmp(PlayerOrder[playerid],"champagner",true))
- {
- if(geld < 95)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (95€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- GivePlayerEuro(playerid, -95);
- }
- if(!strcmp(PlayerOrder[playerid],"wein",true))
- {
- if(geld < 70)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (70€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- GivePlayerEuro(playerid, -70);
- }
- if(!strcmp(PlayerOrder[playerid],"vodka",true))
- {
- if(geld < 15)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (15€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- GivePlayerEuro(playerid, -15);
- }
- if(!strcmp(PlayerOrder[playerid],"sprunk",true))
- {
- if(geld < 7)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (7€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- GivePlayerEuro(playerid, -7);
- }
- SetPlayerChatBubble(bot,"Mike: {FFFFFF}Hier dein Getränk!",0xFFFF00DD,35.0,3000);
- ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 1);
- BarMenBusy = 0;
- return 1;
- }
- forward GetBottle2(bot,playerid);
- public GetBottle2(bot,playerid)
- {
- new geld;
- geld = GetPlayerMoney(playerid);
- if(!strcmp(PlayerOrder[playerid],"bier",true))
- {
- if(geld < 6)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (6€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
- GivePlayerEuro(playerid, -6);
- }
- if(!strcmp(PlayerOrder[playerid],"champagner",true))
- {
- if(geld < 95)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (95€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- GivePlayerEuro(playerid, -95);
- }
- if(!strcmp(PlayerOrder[playerid],"wein",true))
- {
- if(geld < 70)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (70€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- GivePlayerEuro(playerid, -70);
- }
- if(!strcmp(PlayerOrder[playerid],"vodka",true))
- {
- if(geld < 15)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (15€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- GivePlayerEuro(playerid, -15);
- }
- if(!strcmp(PlayerOrder[playerid],"sprunk",true))
- {
- if(geld < 7)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (7€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- GivePlayerEuro(playerid, -7);
- }
- SetPlayerChatBubble(bot,"Paul: {FFFFFF}Hier dein Getränk!",0xFFFF00DD,35.0,3000);
- ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 1);
- BarMenBusy = 0;
- return 1;
- }
- forward GetBottle3(bot,playerid);
- public GetBottle3(bot,playerid)
- {
- new geld;
- geld = GetPlayerEuros(playerid);
- if(!strcmp(PlayerOrder[playerid],"bier",true))
- {
- if(geld < 6)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (6€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
- GivePlayerEuro(playerid, -6);
- }
- if(!strcmp(PlayerOrder[playerid],"champagner",true))
- {
- if(geld < 95)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (95€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- GivePlayerEuro(playerid, -95);
- }
- if(!strcmp(PlayerOrder[playerid],"wein",true))
- {
- if(geld < 70)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (70€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- GivePlayerEuro(playerid, -70);
- }
- if(!strcmp(PlayerOrder[playerid],"vodka",true))
- {
- if(geld < 15)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (15€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- GivePlayerEuro(playerid, -15);
- }
- if(!strcmp(PlayerOrder[playerid],"sprunk",true))
- {
- if(geld < 7)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (7€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- GivePlayerEuro(playerid, -7);
- }
- SetPlayerChatBubble(bot,"Phillip: {FFFFFF}Hier dein Getränk!",0xFFFF00DD,35.0,3000);
- ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 1);
- BarMenBusy = 0;
- return 1;
- }
- forward GetBottle4(bot,playerid);
- public GetBottle4(bot,playerid)
- {
- new geld;
- geld = GetPlayerEuros(playerid);
- if(!strcmp(PlayerOrder[playerid],"bier",true))
- {
- if(geld < 6)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (6€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
- GivePlayerEuro(playerid, -6);
- }
- if(!strcmp(PlayerOrder[playerid],"champagner",true))
- {
- if(geld < 95)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (95€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- GivePlayerEuro(playerid, -95);
- }
- if(!strcmp(PlayerOrder[playerid],"wein",true))
- {
- if(geld < 70)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (70€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- GivePlayerEuro(playerid, -70);
- }
- if(!strcmp(PlayerOrder[playerid],"vodka",true))
- {
- if(geld < 15)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (15€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- GivePlayerEuro(playerid, -15);
- }
- if(!strcmp(PlayerOrder[playerid],"sprunk",true))
- {
- if(geld < 7)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (7€)!");
- return 1;
- }
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- GivePlayerEuro(playerid, -7);
- }
- SetPlayerChatBubble(bot,"Muimerp: {FFFFFF}Hier dein Getränk!",0xFFFF00DD,35.0,3000);
- ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 1);
- BarMenBusy = 0;
- return 1;
- }
- forward GetBsn(bot,playerid);
- public GetBsn(bot,playerid)
- {
- new Float:Leben;
- GetPlayerHealth(playerid,Leben);
- new geld;
- geld = GetPlayerEuros(playerid);
- if(!strcmp(PlayerOrder[playerid],"KidsMenü",true))
- {
- if(geld < 12)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (12€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -12);
- if(Leben + 12 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_WHITE,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+12);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- if(!strcmp(PlayerOrder[playerid],"MaxiMenü",true))
- {
- if(geld < 16)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (16€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -16);
- if(Leben + 16 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+16);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00} Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- if(!strcmp(PlayerOrder[playerid],"Cheeseburger ohne Cheese",true))
- {
- if(geld < 20)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (20€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -20);
- if(Leben + 20 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+18);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00} Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- if(!strcmp(PlayerOrder[playerid],"Salat",true))
- {
- if(geld < 25)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (25€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -25);
- if(Leben + 25 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+25);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00} Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- if(!strcmp(PlayerOrder[playerid],"KingMenü",true))
- {
- if(geld < 30)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (30€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -30);
- if(Leben + 30 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+30);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- SetPlayerChatBubble(bot,"Julia: {FFFFFF}Hier deine Bestellung!",0xFFFF00DD,35.0,3000);
- ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 0);
- BsnMenBusy = 0;
- return 1;
- }
- forward GetBsn2(bot,playerid);
- public GetBsn2(bot,playerid)
- {
- new Float:Leben;
- GetPlayerHealth(playerid,Leben);
- new geld;
- geld = GetPlayerEuros(playerid);
- if(!strcmp(PlayerOrder[playerid],"KidsMenü",true))
- {
- if(geld < 12)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (12€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -12);
- if(Leben + 12 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+12);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- if(!strcmp(PlayerOrder[playerid],"MaxiMenü",true))
- {
- if(geld < 16)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (16€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -16);
- if(Leben + 16 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+16);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- if(!strcmp(PlayerOrder[playerid],"Cheeseburger ohne Cheese",true))
- {
- if(geld < 18)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (18€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -20);
- if(Leben + 20 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+18);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- if(!strcmp(PlayerOrder[playerid],"Salat",true))
- {
- if(geld < 25)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (25€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -25);
- if(Leben + 25 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+25);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- if(!strcmp(PlayerOrder[playerid],"KingMenü",true))
- {
- if(geld < 30)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (30€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -30);
- if(Leben + 30 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+30);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Burger Shot: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- SetPlayerChatBubble(bot,"Angelina: {FFFFFF}Hier deine Bestellung!",0xFFFF00DD,35.0,3000);
- ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 0);
- BsnMenBusy = 0;
- return 1;
- }
- forward GetCluck(bot,playerid);
- public GetCluck(bot,playerid)
- {
- new Float:Leben;
- GetPlayerHealth(playerid,Leben);
- new geld;
- geld = GetPlayerEuros(playerid);
- if(!strcmp(PlayerOrder[playerid],"ChickenNuggets",true))
- {
- if(geld < 12)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (12€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -12);
- if(Leben + 12 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+12);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- if(!strcmp(PlayerOrder[playerid],"ChickenWings",true))
- {
- if(geld < 16)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (16€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -16);
- if(Leben + 16 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+16);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- if(!strcmp(PlayerOrder[playerid],"Chicken am Stiel",true))
- {
- if(geld < 18)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (18€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -20);
- if(Leben + 20 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+18);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- if(!strcmp(PlayerOrder[playerid],"Chicken Salat",true))
- {
- if(geld < 25)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (25€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -25);
- if(Leben + 25 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+25);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- SetPlayerChatBubble(bot,"David: {FFFFFF}Hier deine Bestellung!",0xFFFF00DD,35.0,3000);
- ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 0);
- CluckMenBusy = 0;
- return 1;
- }
- forward GetPizza(bot,playerid);
- public GetPizza(bot,playerid)
- {
- new Float:Leben;
- GetPlayerHealth(playerid,Leben);
- new geld;
- geld = GetPlayerEuros(playerid);
- if(!strcmp(PlayerOrder[playerid],"Margarita",true))
- {
- if(geld < 12)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (12€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -12);
- if(Leben + 12 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Well Stacked Pizza: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+12);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Cluckin' Bell: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- if(!strcmp(PlayerOrder[playerid],"Salami",true))
- {
- if(geld < 16)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (16€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -16);
- if(Leben + 16 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Well Stacked Pizza: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+16);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Well Stacked Pizza: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- if(!strcmp(PlayerOrder[playerid],"Thunfisch",true))
- {
- if(geld < 18)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (18€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -20);
- if(Leben + 20 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Well Stacked Pizza: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+18);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Well Stacked Pizza: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- if(!strcmp(PlayerOrder[playerid],"Hawaii",true))
- {
- if(geld < 25)
- {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast nicht genug Geld dabei. (25€)!");
- return 1;
- }
- GivePlayerEuro(playerid, -25);
- if(Leben + 25 >=100)
- {
- SetPlayerHealth(playerid,100);
- ApplyAnimation(playerid,"FOOD","EAT_Vomit_P",4.1, 0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Well Stacked Pizza: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SendClientMessage(playerid,COLOR_WHITE,"Du hast zuviel gegessen, und musst dich übergeben!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- else
- {
- SetPlayerHealth(playerid,Leben+25);
- ApplyAnimation(playerid, "FOOD","EAT_Burger",4.0, 0, 1, 1, 1, 0, 0);
- SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}Well Stacked Pizza: {FFFF00}Danke für ihre Bestellung, beehren Sie uns bald wieder!");
- SetTimerEx("ClearBsn",4062,false,"ii",bot,playerid);
- }
- }
- SetPlayerChatBubble(bot,"Peter: {FFFFFF}Hier deine Bestellung!",0xFFFF00DD,35.0,3000);
- ApplyAnimation(bot, "BAR","Barserve_give", 4.0, 0, 1, 1, 1, 0, 0);
- PizzaMenBusy = 0;
- return 1;
- }
- forward ClearBsn(bot,playerid);
- public ClearBsn(bot,playerid)
- {
- ClearAnimations(playerid);
- TogglePlayerControllable(playerid, true);
- }
- forward SpawnKillSchutzende(playerid);
- public SpawnKillSchutzende(playerid)
- {
- if(GetPVarInt(playerid, "Spawnkill") == 1)
- {
- DeletePVar(playerid, "Spawnkill");
- SetPlayerHealth(playerid,100.0);
- Delete3DTextLabel(SpawnKilllabel[playerid]);
- }
- }
- stock GetClosestPlayer(playerid)
- {
- if(IsPlayerConnected(playerid) && IsPlayerConnected(0))
- {
- new closestplayer=0;
- new Float:closestdist=GetDistanceBetweenPlayers(playerid,0);
- for(new playerid2=0; playerid2<MAX_PLAYERS; playerid2++)
- {
- new Float:dist = GetDistanceBetweenPlayers(playerid,playerid2);
- if ((dist < closestdist))
- {
- closestdist = dist;
- closestplayer = playerid;
- }
- }
- return closestplayer;
- }
- return -1;
- }
- forward GetClosestPlayer2(p1);
- public GetClosestPlayer2(p1)
- {
- new Float:dis,Float:dis2,player;
- player = -1;
- dis = 99999.99;
- for(new x = 0; x < GetMaxPlayers(); x++)
- {
- if(GetPVarInt(x, "Authentication") == 1)
- {
- if(x != p1)
- {
- dis2 = GetDistanceBetweenPlayers(x,p1);
- if(dis2 < dis && dis2 != -1.00)
- {
- dis = dis2;
- player = x;
- }
- }
- }
- }
- return player;
- }
- forward Float:GetDistanceBetweenPlayers(p1,p2);
- public Float:GetDistanceBetweenPlayers(p1,p2)
- {
- new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
- if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2))
- {
- return -1.00;
- }
- GetPlayerPos(p1,x1,y1,z1);
- GetPlayerPos(p2,x2,y2,z2);
- return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
- }
- public Audio_OnClientConnect(playerid)
- {
- SetPVarInt(playerid, "AudioClient", 1);
- printf("%s wurde zum AudioClient connectet.",GetName(playerid));
- Audio_TransferPack(playerid);
- return 1;
- }
- public Audio_OnClientDisconnect(playerid)
- {
- DeletePVar(playerid, "AudioClient");
- Audio_Stop(playerid, VMusic[playerid]);
- Audio_Stop(playerid, AMusic[playerid]);
- Audio_Stop(playerid, HMusic[playerid]);
- Audio_Stop(playerid, BMusic[playerid]);
- Audio_Stop(playerid, GMusic[playerid]);
- Audio_Stop(playerid, BUMusic[playerid]);
- return 1;
- }
- public Audio_OnSetPack(audiopack[])
- {
- foreach(Player, i)
- {
- Audio_TransferPack(i);
- }
- }
- forward ProxDetectorS(Float:radi, playerid, targetid);
- public ProxDetectorS(Float:radi, playerid, targetid)
- {
- if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- //radi = 2.0; //Trigger Radius
- GetPlayerPos(targetid, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- }
- return 0;
- }
- forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
- public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- //radi = 2.0; //Trigger Radius
- for(new i = 0; i < GetMaxPlayers(); i++)
- {
- if(IsPlayerConnected(i))
- {
- GetPlayerPos(i, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
- if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
- {
- SendClientMessage(i, col1, string);
- }
- else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
- {
- SendClientMessage(i, col2, string);
- }
- else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
- {
- SendClientMessage(i, col3, string);
- }
- else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
- {
- SendClientMessage(i, col4, string);
- }
- else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- SendClientMessage(i, col5, string);
- }
- }
- else
- {
- SendClientMessage(i, col1, string);
- }
- }
- }//not connected
- return 1;
- }
- forward SetPlayerCriminal(playerid,declare,reason[]);
- public SetPlayerCriminal(playerid,declare,reason[])
- {
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- SetPVarInt(playerid,"Verbrechen",GetPVarInt(playerid,"Verbrechen")+1);
- new turned[MAX_PLAYER_NAME];
- new turner[MAX_PLAYER_NAME];
- new turnmes[128];
- new wantedmes[128], cbjstore[128];
- new wlevel;
- GetPlayerName(playerid, turned, sizeof(turned));
- if (declare == 999)
- {
- format(turner, sizeof(turner), "Anonym");
- }
- if (declare == 110)
- {
- format(turner, sizeof(turner), "Der Staat");
- }
- if (declare == 900)
- {
- format(turner, sizeof(turner), "Bank");
- }
- else
- {
- if(GetPVarInt(declare, "Authentication") == 1)
- {
- GetPlayerName(declare, turner, sizeof(turner));
- }
- }
- format(turnmes, sizeof(turnmes), "Du hast ein Verbrechen begangen! Grund: %s | Zeuge: %s.",reason,turner);
- SendClientMessage(playerid, COLOR_LIGHTRED, turnmes);
- SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid));
- wlevel = GetPlayerWantedLevel(playerid);
- pStats[playerid][pWanted] = wlevel;
- format(wantedmes, sizeof(wantedmes), "Aktuelles Wantedlevel: %d", wlevel);
- SendClientMessage(playerid, COLOR_YELLOW2, wantedmes);
- foreach(Player, i)
- {
- if(GetPVarInt(i, "Authentication") == 1)
- {
- if(IsACop(playerid))
- {
- SendClientMessage(i,COLOR_LIGHTBLUE,"Funk: Es wurde ein neues Verbrechen gemeldet!, over.");
- format(cbjstore, sizeof(turnmes), "Zeuge: %s | Verbrecher: %s | Verbrechen: %s",turner,turned,reason);
- SendClientMessage(i, COLOR_LIGHTBLUE, cbjstore);
- }
- }
- }
- }
- }
- forward SendLevelMessage(level, color, string[]);
- public SendLevelMessage(level, color, string[])
- {
- foreach(Player, i)
- {
- if(GetPVarInt(i, "Authentication") == 1)
- {
- if(pStats[i][pLevel] == level || pStats[i][pAdminLevel] > 0 && GetPVarInt(i, "AdminDuty") == 1)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- forward SendRadioMessage(member, color, string[]);
- public SendRadioMessage(member, color, string[])
- {
- foreach(Player, i)
- {
- if(GetPVarInt(i, "Authentication") == 1)
- {
- if(pStats[i][pMember] == member || pStats[i][pLeader] == member)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- forward IsACop(playerid);
- public IsACop(playerid)
- {
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- new leader = pStats[playerid][pLeader];
- new member = pStats[playerid][pMember];
- if(member==1)
- {
- return 1;
- }
- else if(leader==1)
- {
- return 1;
- }
- }
- return 0;
- }
- forward IsABeamter(playerid);
- public IsABeamter(playerid)
- {
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- new leader = pStats[playerid][pLeader];
- new member = pStats[playerid][pMember];
- if(member==1)
- {
- return 1;
- }
- else if(leader==1)
- {
- return 1;
- }
- }
- return 0;
- }
- forward IsACNN(playerid);
- public IsACNN(playerid)
- {
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- new leader = pStats[playerid][pLeader];
- new member = pStats[playerid][pMember];
- if(member==6)
- {
- return 1;
- }
- else if(leader==6)
- {
- return 1;
- }
- }
- return 0;
- }
- forward Unfreezeply(playerid);
- public Unfreezeply(playerid)
- {
- ClearAnimations(playerid);
- TogglePlayerControllable(playerid, 1);
- }
- forward Selbstschussanlagew(); //Selbstschussanlage
- public Selbstschussanlagew()
- {
- Selbstschussanlage = 0;
- }
- //Tore und Aufzüge
- forward JailAufzugUp(); //Jail Aufzug
- public JailAufzugUp()
- {
- MoveDynamicObject(AufzugJail,1767.286743, -1542.457520, 23.152174,1);
- JailAufzugB = 0;
- }
- forward ZollSchranke1Zu(); //ZOLL LS-LV
- public ZollSchranke1Zu()
- {
- SetObjectRot(ZollSchranke1,-172.747348, 88.521979, -20.626481);
- SetObjectRot(ZollSchranke2,-172.747348, 88.521979, 157.276915);
- ZollSchrankea = 0;
- }
- forward LspdSchrankeZu(); //LSPD Schranke
- public LspdSchrankeZu()
- {
- SetObjectRot(SchrankeLspd,0.0000, 88.5222, 268.8997);
- SchrankeLspdB = 0;
- }
- forward LspdSchrankeZu2(); //LSPD Schranke2
- public LspdSchrankeZu2()
- {
- SetObjectRot(SchrankeLspd2,0.0000, 268.8998, 89.9994);
- SchrankeLspdB2 = 0;
- }
- forward LspdSchrankeZu3(); //LSPD Schranke3
- public LspdSchrankeZu3()
- {
- SetObjectRot(SchrankeLspd3,0.0000, 269.7592, 268.0403);
- SchrankeLspdB3 = 0;
- }
- forward Adminaufzug();
- public Adminaufzug()
- {
- MoveDynamicObject(adminaufzug1, 2500.287354, 2771.257568, 9.868746, 3.0);
- MoveDynamicObject(adminaufzug2, 2494.605957, 2771.261719, 9.897823, 3.0);
- AdminAufzugB = 0;
- return 1;
- }
- //Fahrzeuge
- forward IsAMotorad(carid);
- public IsAMotorad(carid)
- {
- new realcarid;
- realcarid = GetVehicleModel(carid);
- if(realcarid==461||realcarid==463||realcarid==468||realcarid==521||realcarid==522||realcarid==581||realcarid==586||realcarid==471)
- {
- return 1;
- }
- return 0;
- }
- forward IsANotCar(carid);
- public IsANotCar(carid)
- {
- new realcarid;
- realcarid = GetVehicleModel(carid);
- 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)
- {
- return 1;
- }
- return 0;
- }
- forward IsANotSpoilerCar(carid);
- public IsANotSpoilerCar(carid)
- {
- new realcarid;
- realcarid = GetVehicleModel(carid);
- if(realcarid==552)
- {
- return 1;
- }
- return 0;
- }
- forward IsACopCar(carid);
- public IsACopCar(carid)
- {
- if(spawncar_job[carid] == 1)
- {
- return 1;
- }
- return 0;
- }
- forward IsATaxiCar(carid);
- public IsATaxiCar(carid)
- {
- if(spawncar_job[carid] == 94)
- {
- return 1;
- }
- return 0;
- }
- forward IsAFahrschulCar(carid);
- public IsAFahrschulCar(carid)
- {
- if(spawncar_job[carid] == 97)
- {
- return 1;
- }
- return 0;
- }
- forward IsASanCar(carid);
- public IsASanCar(carid)
- {
- if(spawncar_job[carid] == 6)
- {
- return 1;
- }
- return 0;
- }
- forward IsAAdminCar(carid);
- public IsAAdminCar(carid)
- {
- if(spawncar_job[carid] == 99)
- {
- return 1;
- }
- return 0;
- }
- forward IsAFahrrad(carid);
- public IsAFahrrad(carid)
- {
- new model = GetVehicleModel(carid);
- if(model==481||model==509||model==510)
- {
- return 1;
- }
- return 0;
- }
- forward IsAZug(carid);
- public IsAZug(carid)
- {
- new model = GetVehicleModel(carid);
- if(model==537||model==538||model==449)
- {
- return 1;
- }
- return 0;
- }
- forward IsABoat(carid);
- public IsABoat(carid)
- {
- new model = GetVehicleModel(carid);
- if(model==472||model==493||model==473||model==493||model==595||model==484||model==430||model==453||model==446||model==553||model==464)
- {
- return 1;
- }
- return 0;
- }
- forward IsAPlane(carid);
- public IsAPlane(carid)
- {
- new model = GetVehicleModel(carid);
- 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)
- {
- return 1;
- }
- return 0;
- }
- forward IsAPaintjobCar(carid);
- public IsAPaintjobCar(carid)
- {
- new model = GetVehicleModel(carid);
- 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)
- {
- return 1;
- }
- return 0;
- }
- forward IsAWAACar(carid);
- public IsAWAACar(carid)
- {
- new model = GetVehicleModel(carid);
- if(model==562||model==565||model==559||model==561||model==560||model==558)
- {
- return 1;
- }
- return 0;
- }
- forward IsALocoCar(carid);
- public IsALocoCar(carid)
- {
- new model = GetVehicleModel(carid);
- if(model==536||model==575||model==534||model==567||model==535||model==566||model==576||model==412)
- {
- return 1;
- }
- return 0;
- }
- //Nagelband Update
- forward NagelBandUpdate(playerid);
- public NagelBandUpdate(playerid)
- {
- DeletePVar(playerid, "NagelbandGelegt");
- }
- stock SendMessageToAll(color, string[])
- {
- foreach(Player, i)
- {
- if(GetPVarInt(i, "Authentication") != 0)
- {
- SendClientMessage(i, color, string);
- }
- else return 0;
- }
- return 0;
- }
- forward RemoveFlash(playerid);
- public RemoveFlash(playerid)
- {
- TextDrawHideForPlayer(playerid,flash);
- SetPVarInt(playerid,"PlayerHasBeenFlashed",2);
- }
- forward GivePlayerWeaponEx(playerid,weaponid,ammo);
- public GivePlayerWeaponEx(playerid,weaponid,ammo)
- {
- PlayerWeapons[playerid][weaponid]=true; // Player Has the weapon.
- return GivePlayerWeapon(playerid,weaponid,ammo); // To realy give him the weapon.
- }
- forward RealSpawn(playerid);
- public RealSpawn(playerid)
- {
- Spawned[playerid]=true;
- }
- public CheckPlayerText(playerid,string[])
- {
- new countit = 0;
- for(new x=0; x<strlen(string); x++)
- {
- if(string[x] == '.' && string[x+1] <= '9' && string[x+1] >= '0') // Es wurde ein Punkt und eine Zahl dahinter geschrieben!
- {
- countit++;
- }
- else if(string[x] == '.' && string[x+2] <= '9' && string[x+2] >= '0') // Es wurde ein Punkt, Leerzeichen und eine Zahl dahinter geschrieben!
- {
- countit++;
- }
- }
- if(countit >= 3)
- {
- new textstring[128];
- format(textstring,sizeof(textstring),"Warnung: %s wird verdächtigt Serverwerbung zu betreiben!",GetName(playerid));
- SendAdminMessage(COLOR_LIGHTRED,textstring,1);
- format(textstring,sizeof(textstring),"Anti-Cheat: %s: %s",GetName(playerid),string);
- SendAdminMessage(COLOR_BRIGHTRED,textstring,1);
- SendClientMessage(playerid,COLOR_LIGHTRED,"** Anti-Cheat: Serverwerbungen für andere Server sind hier nicht gestattet!");
- pIPWarns[playerid]++;
- if(pIPWarns[playerid] >= 3)
- {
- format(textstring,sizeof(textstring),"** Anti-Cheat: %s wurde vom Server gebannt. Grund: Fremdwerbung!",GetName(playerid));
- SendClientMessageToAll(COLOR_LIGHTRED,textstring);
- TogglePlayerControllable(playerid, false);
- BanEx(playerid,"Fremdwerbung");
- Kick(playerid);
- }
- return 1;
- }
- return 1;
- }
- forward VTicketDraw();
- public VTicketDraw()
- {
- SendMessageToAll(COLOR_YELLOW2,"Die Lottoziehungen beginnen in 5 Minuten, besorge dir einen Lotterieschein,");
- SendMessageToAll(COLOR_YELLOW2,"in der Lotterie in der nähe von der Bank in Los Santos.");
- return 1;
- }
- forward TicketDraw();
- public TicketDraw()
- {
- MakeNumber();
- new Winning[MAX_PLAYERS];
- foreach(Player, i)
- {
- if(HaveTicket[i] == 1)
- {
- for(new n = 0; n < 6; n++)
- {
- if(PlayerNumber[0][i] == Number[n])
- {
- Winning[i]++;
- }
- if(PlayerNumber[1][i] == Number[n])
- {
- Winning[i]++;
- }
- if(PlayerNumber[2][i] == Number[n])
- {
- Winning[i]++;
- }
- if(PlayerNumber[3][i] == Number[n])
- {
- Winning[i]++;
- }
- if(PlayerNumber[4][i] == Number[n])
- {
- Winning[i]++;
- }
- if(PlayerNumber[5][i] == Number[n])
- {
- Winning[i]++;
- }
- }
- new string[256];
- SendClientMessage(i, COLOR_WHITE, "--------> Lotterie 6/47 <--------");
- 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]);
- SendClientMessage(i, COLOR_GREEN, string);
- 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]);
- SendClientMessage(i, COLOR_GREEN, string);
- if(Winning[i] == 0)
- {
- SendClientMessage(i, COLOR_WHITE, "Du hast 0 richtige.");
- SendClientMessage(i, COLOR_YELLOW, "Gewinn: €0");
- }
- if(Winning[i] == 1)
- {
- SendClientMessage(i, COLOR_WHITE, "Du hast 1 richtige.");
- SendClientMessage(i, COLOR_YELLOW, "Gewinn: €5");
- GivePlayerEuro(i, 5);
- }
- if(Winning[i] == 2)
- {
- SendClientMessage(i, COLOR_WHITE, "Du hast 2 richtige.");
- SendClientMessage(i, COLOR_YELLOW, "Gewinn: €10");
- GivePlayerEuro(i, 10);
- }
- if(Winning[i] == 3)
- {
- SendClientMessage(i, COLOR_WHITE, "Du hast 3 richtige.");
- SendClientMessage(i, COLOR_YELLOW, "Gewinn: €63");
- GivePlayerEuro(i, 63);
- }
- if(Winning[i] == 4)
- {
- SendClientMessage(i, COLOR_WHITE, "Du hast 4 richtige.");
- SendClientMessage(i, COLOR_YELLOW, "Gewinn: €1,730");
- GivePlayerEuro(i, 1730);
- }
- if(Winning[i] == 5)
- {
- SendClientMessage(i, COLOR_WHITE, "Du hast 5 richtige.");
- SendClientMessage(i, COLOR_YELLOW, "Gewinn: €65,128");
- GivePlayerEuro(i, 65128);
- }
- if(Winning[i] == 6)
- {
- SendClientMessage(i, COLOR_WHITE, "Du hast 6 richtige.");
- SendClientMessage(i, COLOR_YELLOW, "Gewinn: €1,000,000");
- GivePlayerEuro(i, 1000000);
- }
- HaveTicket[i] = 0;
- }
- }
- }
- // ---------------[Paintball System]--------------- //
- forward PreparePaintball();
- public PreparePaintball()
- {
- foreach(Player, i)
- {
- if(GetPVarInt(i, "Authentication") == 1)
- {
- if(PlayerPaintballing[i] != 0)
- {
- SendClientMessage(i, COLOR_YELLOW2, "Das Paintball Match startet in 30 Sekunden.");
- }
- }
- }
- SetTimer("StartPaintball", 30011, 0);
- return 1;
- }
- forward StartPaintball();
- public StartPaintball()
- {
- PaintballRound = 1;
- StartingPaintballRound = 0;
- PaintballWinner = 999;
- PaintballWinnerKills = 0;
- foreach(Player, i)
- {
- if(GetPVarInt(i, "Authentication") == 1)
- {
- if(PlayerPaintballing[i] != 0)
- {
- TogglePlayerControllable(i, 1);
- SendClientMessage(i, COLOR_YELLOW, "Das Paintball Match startet, 5 Minuten verbleibend.");
- PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
- TextDrawShowForPlayer(i,PBText);
- }
- }
- }
- SetTimer("PaintballEnded", 300044, 0);
- return 1;
- }
- forward PaintballEnded();
- public PaintballEnded()
- {
- new string[52];
- foreach(Player, i)
- {
- if(GetPVarInt(i, "Authentication") == 1)
- {
- if(PlayerPaintballing[i] != 0)
- {
- if(IsPlayerConnected(PaintballWinner))
- {
- format(string,sizeof(string), "** %s hat das Paintballmatch mit %d Kills gewonnen **",GetName(i),PaintballWinnerKills);
- SendClientMessage(i, COLOR_WHITE, string);
- }
- ResetPlayerWeapons(i);
- PlayerPaintballing[i] = 0;
- SetPlayerPos(i,1310.1909,-1369.8401,13.5677);
- SetPlayerFacingAngle(i,179.0102);
- TogglePlayerControllable(i, true);
- SetPlayerVirtualWorld(i, 0);
- pStats[i][pPwaffe] = 0;
- SetPlayerWeather(i, 1);
- SendClientMessage(i,COLOR_YELLOW2,"Das Paintballmatch wurde beendet");
- SetPVarInt(i, "Superfaust", 0);
- SetPlayerWorldBounds(i, 20000.0000,-20000.0000, 20000.0000, -20000.0000);
- PaintballPlayers = 0;
- format(string,124,"Paintball gerade am gewinnen: Keiner.");
- TextDrawSetString(PBText,string);
- TextDrawHideForPlayer(i,PBText);
- }
- }
- }
- AnnouncedPaintballRound = 0;
- PaintballRound = 0;
- return 1;
- }
- // ---------------[San Andreas Newstime System]--------------- //
- forward AddsOn();
- public AddsOn()
- {
- adds=1;
- return 1;
- }
- forward OOCNews(color,const string[]);
- public OOCNews(color,const string[])
- {
- foreach(Player, i)
- {
- if(GetPVarInt(i, "Authentication") == 1)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- forward Closecnna();
- public Closecnna()
- {
- MoveDynamicObject(AufzugCNN,1767.35925300,-1303.63110400,12.18498600, 4.0);
- AufzugCNNa = 0;
- return 1;
- }
- // ---------------[IsAtBar]--------------- //
- forward IsAtBar(playerid);
- public IsAtBar(playerid)
- {
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- if(PlayerToPoint(2.0,playerid,1217.0641,-15.2606,1000.9219) || PlayerToPoint(2.0,playerid,968.8604,-47.2961,1001.1172))
- {//Verwöhnhölle - Adminbase
- return 1;
- }
- else if(PlayerToPoint(2.0,playerid,500.8093,-18.1370,1001.7262) || PlayerToPoint(1.0,playerid,920.7096,-2046.1642,14.6323))
- {//Alhambra - Premium
- return 1;
- }
- }
- return 0;
- }
- // ---------------[IsAtPc]--------------- //
- forward IsAtPC(playerid);
- public IsAtPC(playerid)
- {
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- if(PlayerToPoint(2.0,playerid,847.8422,-1751.1002,22.0964) || PlayerToPoint(2.0,playerid,847.8465,-1754.1320,22.0964))
- {//PC1-2
- return 1;
- }
- else if(PlayerToPoint(2.0,playerid,843.8941,-1754.1415,22.1038) || PlayerToPoint(1.0,playerid,843.8942,-1750.8098,22.0964))
- {//PC3-4
- return 1;
- }
- else if(PlayerToPoint(2.0,playerid,840.9240,-1750.6995,22.1038) || PlayerToPoint(1.0,playerid,840.9237,-1754.0237,22.1038))
- {//PC5-6
- return 1;
- }
- }
- return 0;
- }
- // ---------------[IsAtBsn]--------------- //
- forward IsAtRestaurant(playerid);
- public IsAtRestaurant(playerid)
- {
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- if(PlayerToPoint(playerid,2.0,377.3739,-67.4481,1001.5078)) //Zeile 24985
- {//Burgershot
- return 1;
- }
- }
- return 0;
- }
- // ---------------[IsAtCluck]--------------- //
- forward IsAtCluck(playerid);
- public IsAtCluck(playerid)
- {
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- if(PlayerToPoint(1.5,playerid,369.6640,-6.0200,1001.8589))
- {//Cluckin Bell
- return 1;
- }
- }
- return 0;
- }
- // ---------------[IsAtPizza]--------------- //
- forward IsAtPizza(playerid);
- public IsAtPizza(playerid)
- {
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- if(PlayerToPoint(1.5,playerid,375.7560,-118.8034,1001.4995))
- {//Pizza Laden
- return 1;
- }
- }
- return 0;
- }
- // ---------------[Handy System]--------------- //
- forward BuyHandy(playerid, handyid);
- public BuyHandy(playerid, handyid)
- {
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- TogglePlayerControllable(playerid, true);
- if(handyid == 1)
- {
- if(GetPlayerEuros(playerid) < 100) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (100€)!"); return 1; }
- GivePlayerEuro(playerid,-100);
- SendClientMessage(playerid, COLOR_WHITE, "Glückwunsch, du hast dir erfolgreich ein Nokia 3330 gekauft!");
- SendClientMessage(playerid, COLOR_YELLOW, "Du erhältst außerdem ein Startguthaben von 10€!");
- pStats[playerid][pHandy] = 1;
- pStats[playerid][pGuthaben] = 10;
- pStats[playerid][pAkku] = 10;
- }
- else if(handyid == 2)
- {
- if(GetPlayerEuros(playerid) < 250) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (250€)!"); return 1; }
- GivePlayerEuro(playerid,-250);
- SendClientMessage(playerid, COLOR_WHITE, "Glückwunsch, du hast dir erfolgreich ein 6500 gekauft!");
- SendClientMessage(playerid, COLOR_YELLOW, "Du erhältst außerdem ein Startguthaben von 10€!");
- pStats[playerid][pHandy] = 2;
- pStats[playerid][pGuthaben] = 10;
- pStats[playerid][pAkku] = 10;
- }
- else if(handyid == 3)
- {
- if(GetPlayerEuros(playerid) < 500) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (500€)!"); return 1; }
- GivePlayerEuro(playerid,-500);
- SendClientMessage(playerid, COLOR_WHITE, "Glückwunsch, du hast dir erfolgreich ein Nokia N95 gekauft!");
- SendClientMessage(playerid, COLOR_YELLOW, "Du erhältst außerdem ein Startguthaben von 10€!");
- pStats[playerid][pHandy] = 3;
- pStats[playerid][pGuthaben] = 10;
- pStats[playerid][pAkku] = 10;
- }
- else if(handyid == 4)
- {
- if(GetPlayerEuros(playerid) < 1000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (1000€)!"); return 1; }
- GivePlayerEuro(playerid,-1000);
- SendClientMessage(playerid, COLOR_WHITE, "Glückwunsch, du hast dir erfolgreich ein Sony Ericsson C905 gekauft!");
- SendClientMessage(playerid, COLOR_YELLOW, "Du erhältst außerdem ein Startguthaben von 10€!");
- pStats[playerid][pHandy] = 4;
- pStats[playerid][pGuthaben] = 10;
- pStats[playerid][pAkku] = 10;
- }
- else if(handyid == 5)
- {
- if(GetPlayerEuros(playerid) < 2500) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (2500€)!"); return 1; }
- GivePlayerEuro(playerid,-2500);
- SendClientMessage(playerid, COLOR_WHITE, "Glückwunsch, du hast dir erfolgreich ein Motorola Q9h gekauft!");
- SendClientMessage(playerid, COLOR_YELLOW, "Du erhältst außerdem ein Startguthaben von 10€!");
- pStats[playerid][pHandy] = 5;
- pStats[playerid][pGuthaben] = 10;
- pStats[playerid][pAkku] = 10;
- }
- else if(handyid == 6)
- {
- if(GetPlayerEuros(playerid) < 4000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (4000€)!"); return 1; }
- GivePlayerEuro(playerid,-4000);
- SendClientMessage(playerid, COLOR_WHITE, "Glückwunsch, du hast dir erfolgreich ein BlackBerry BOLD gekauft!");
- SendClientMessage(playerid, COLOR_YELLOW, "Du erhältst außerdem ein Startguthaben von 10€!");
- pStats[playerid][pHandy] = 6;
- pStats[playerid][pGuthaben] = 10;
- pStats[playerid][pAkku] = 10;
- }
- else if(handyid == 7)
- {
- if(GetPlayerEuros(playerid) < 6500) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (6500€)!"); return 1; }
- GivePlayerEuro(playerid,-6500);
- SendClientMessage(playerid, COLOR_WHITE, "Glückwunsch, du hast dir erfolgreich ein iPhone gekauft!");
- SendClientMessage(playerid, COLOR_YELLOW, "Du erhältst außerdem ein Startguthaben von 10€!");
- pStats[playerid][pHandy] = 7;
- pStats[playerid][pGuthaben] = 10;
- pStats[playerid][pAkku] = 10;
- }
- }
- return 1;
- }
- forward SellHandy(playerid, handyid);
- public SellHandy(playerid, handyid)
- {
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- TogglePlayerControllable(playerid, true);
- if(handyid == 1)
- {
- GivePlayerEuro(playerid,100/2);
- SendClientMessage(playerid, COLOR_WHITE, "Du hast dein Nokia 3310 erfolgreich für 50€ verkauft!");
- pStats[playerid][pHandy] = 0;
- }
- else if(handyid == 2)
- {
- GivePlayerEuro(playerid,250/2);
- SendClientMessage(playerid, COLOR_WHITE, "Du hast dein Nokia 6500 erfolgreich für 125€ verkauft!");
- pStats[playerid][pHandy] = 2;
- }
- else if(handyid == 3)
- {
- GivePlayerEuro(playerid,500/2);
- SendClientMessage(playerid, COLOR_WHITE, "Du hast dein Nokia N95 erfolgreich für 250€ verkauft!");
- pStats[playerid][pHandy] = 0;
- }
- else if(handyid == 4)
- {
- GivePlayerEuro(playerid,1000/2);
- SendClientMessage(playerid, COLOR_WHITE, "Du hast dein Sony Ericsson C905 erfolgreich für 500€ verkauft!");
- pStats[playerid][pHandy] = 0;
- }
- else if(handyid == 5)
- {
- GivePlayerEuro(playerid,2500/2);
- SendClientMessage(playerid, COLOR_WHITE, "Du hast dein Motorola Q9h erfolgreich für 1250€ verkauft!");
- pStats[playerid][pHandy] = 0;
- }
- else if(handyid == 6)
- {
- GivePlayerEuro(playerid,4000/2);
- SendClientMessage(playerid, COLOR_WHITE, "Du hast dein Blackbarry BOLD erfolgreich für 2000€ verkauft!");
- pStats[playerid][pHandy] = 0;
- }
- else if(handyid == 7)
- {
- GivePlayerEuro(playerid,8500/2);
- SendClientMessage(playerid, COLOR_WHITE, "Du hast dein iPhone erfolgreich für 4250€ verkauft!");
- pStats[playerid][pHandy] = 0;
- }
- }
- return 1;
- }
- forward GetTon(playerid, handyid);
- public GetTon(playerid, handyid)
- {
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- TogglePlayerControllable(playerid, true);
- if(handyid == 1)
- {
- if(GetPlayerEuros(playerid) < 1000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (1000€)!"); return 1; }
- GivePlayerEuro(playerid,-1000);
- SendClientMessage(playerid, COLOR_WHITE, "Du hast erfolgreich den Klingelton Crank ausgewählt!");
- pStats[playerid][pRingTone] = 1;
- }
- else if(handyid == 2)
- {
- if(GetPlayerEuros(playerid) < 1000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (1000€)!"); return 1; }
- GivePlayerEuro(playerid,-1000);
- SendClientMessage(playerid, COLOR_WHITE, "Du hast erfolgreich den Klingelton Higher ausgewählt!");
- pStats[playerid][pRingTone] = 2;
- }
- else if(handyid == 3)
- {
- if(GetPlayerEuros(playerid) < 1000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (1000€)!"); return 1; }
- GivePlayerEuro(playerid,-1000);
- SendClientMessage(playerid, COLOR_WHITE, "Du hast erfolgreich den Klingelton Dynamite ausgewählt!");
- pStats[playerid][pRingTone] = 3;
- }
- else if(handyid == 4)
- {
- if(GetPlayerEuros(playerid) < 1000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (1000€)!"); return 1; }
- GivePlayerEuro(playerid,-1000);
- SendClientMessage(playerid, COLOR_WHITE, "Du hast erfolgreich den Klingelton CallMyName ausgewählt!");
- pStats[playerid][pRingTone] = 4;
- }
- else if(handyid == 5)
- {
- if(GetPlayerEuros(playerid) < 1000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (1000€)!"); return 1; }
- GivePlayerEuro(playerid,-1000);
- SendClientMessage(playerid, COLOR_WHITE, "Du hast erfolgreich den Klingelton Never Say Never ausgewählt!");
- pStats[playerid][pRingTone] = 5;
- }
- else if(handyid == 6)
- {
- if(GetPlayerEuros(playerid) < 1000) { SendClientMessage(playerid, COLOR_BRIGHTRED, "Du hast nicht genug Geld dabei (1000€)!"); return 1; }
- GivePlayerEuro(playerid,-1000);
- SendClientMessage(playerid, COLOR_WHITE, "Du hast erfolgreich den Klingelton Don´t Stop the Party ausgewählt!");
- pStats[playerid][pRingTone] = 6;
- }
- }
- return 1;
- }
- forward GetGps(playerid);
- public GetGps(playerid)
- {
- ClearChat(playerid);
- TogglePlayerControllable(playerid, true);
- pStats[playerid][pGPS] = 1;
- SendClientMessage(playerid,COLOR_WHITE,"Das GPS App wurde erfolgreich auf dein Handy transferiert.");
- SendClientMessage(playerid,COLOR_YELLOW2,"Du kannst dieses nun mit /gps benutzen!");
- }
- forward AkkuLaden(playerid);
- public AkkuLaden(playerid)
- {
- ClearChat(playerid);
- TogglePlayerControllable(playerid, true);
- pStats[playerid][pAkku] = 10;
- SendClientMessage(playerid,COLOR_YELLOW2,"Dein Akku wurde erfolgreich aufgeladen!");
- }
- forward PlaySMSTone(playerid);
- public PlaySMSTone(playerid)
- {
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- if(GetPVarInt(playerid, "AudioClient") == 1)
- {
- Audio_Play(playerid, 99, false, false, false);
- }
- }
- }
- forward PlayRingTone(playerid);
- public PlayRingTone(playerid)
- {
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- if(GetPVarInt(playerid, "AudioClient") == 1)
- {
- if(pStats[playerid][pPremium] > 0)
- {
- if(pStats[playerid][pRingTone] > 0)
- {
- if(pStats[playerid][pRingTone] == 1)
- {
- HMusic[playerid] = Audio_Play(playerid, 1, false, false, false);
- return 1;
- }
- if(pStats[playerid][pRingTone] == 2)
- {
- HMusic[playerid] = Audio_Play(playerid, 2, false, false, false);
- return 1;
- }
- if(pStats[playerid][pRingTone] == 3)
- {
- HMusic[playerid] = Audio_Play(playerid, 3, false, false, false);
- return 1;
- }
- if(pStats[playerid][pRingTone] == 4)
- {
- HMusic[playerid] = Audio_Play(playerid, 4, false, false, false);
- return 1;
- }
- if(pStats[playerid][pRingTone] == 5)
- {
- HMusic[playerid] = Audio_Play(playerid, 5, false, false, false);
- return 1;
- }
- if(pStats[playerid][pRingTone] == 6)
- {
- HMusic[playerid] = Audio_Play(playerid, 6, false, false, false);
- return 1;
- }
- }
- }
- }
- }
- return 1;
- }
- forward StopRingTone(playerid);
- public StopRingTone(playerid)
- {
- if(GetPVarInt(playerid, "Authentication") == 1)
- {
- if(GetPVarInt(playerid, "AudioClient") == 1)
- {
- if(pStats[playerid][pPremium] > 0)
- {
- if(pStats[playerid][pRingTone] > 0)
- {
- Audio_Stop(playerid, HMusic[playerid]);
- }
- }
- }
- }
- }
- forward ClearHandy(playerid);
- public ClearHandy(playerid)
- {
- SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
- Audio_Stop(playerid, HMusic[playerid]);
- }
- forward Anruf(playerid);
- public Anruf(playerid)
- {
- if(GetPVarInt(playerid, "Anrufen") == 1)
- {
- DeletePVar(playerid, "Anrufen");
- SendClientMessage(playerid,COLOR_YELLOW,"Dein Anruf wurde abgebrochen, da sich keiner gemeldet hat!");
- SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
- Audio_Stop(playerid, HMusic[playerid]);
- }
- if(GetPVarInt(playerid, "Anrufen") == 2)
- {
- SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
- wirdangerufen[playerid] = -1;
- DeletePVar(playerid, "Anrufen");
- Audio_Stop(playerid, HMusic[playerid]);
- }
- }
- // ---------------[Tuninggarage]--------------- //
- forward IsPlayerInInvalidNosVehicle(playerid);
- public IsPlayerInInvalidNosVehicle(playerid)
- {
- new carid = GetPlayerVehicleID(playerid);
- new carmodel = GetVehicleModel(carid);
- for (new i=0; i<sizeof(InvalidNosVehicles); i++)
- {
- if (carmodel == InvalidNosVehicles[i]) return 1;
- }
- return 0;
- }
- // ---------------[Premium System]--------------- //
- forward Closeptor();
- public Closeptor()
- {
- MoveDynamicObject(ptor, 946.042603, -2004.170654, 14.882845, 3.0);
- PremiumB = 0;
- return 1;
- }
- // ---------------[Banksystem]--------------- //
- forward SetBankRaub();
- public SetBankRaub()
- {
- BankRaub = 1;
- }
- forward BankRaub2(playerid);
- public BankRaub2(playerid)
- {
- new string[150];
- SetPVarInt(playerid, "Bankraub", 1);
- ClearChat(playerid);
- ClearAnimations(playerid);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid, COLOR_RED, " |___________________________________| Banküberfall |___________________________________|");
- SendClientMessage(playerid, COLOR_YELLOW2, "Du hast die Bank überfallen! ");
- SendClientMessage(playerid, COLOR_YELLOW2, "Du hast nun Wanted Lvl. 6 und musst vor dem Staat flüchten! ");
- SendClientMessage(playerid, COLOR_YELLOW2, "ausloggen bringt dir nichts, beim nächsten Login wird jede Sicherheitskraft benachrichtigt!");
- SendClientMessage(playerid, COLOR_LIGHTRED, "INFO: Gehe nun zum roten Punkt nach Las Venturas und lasse das Geld waschen!");
- SendClientMessage(playerid, COLOR_RED, "|______________________________________________________________________________________|");
- TogglePlayerControllable(playerid, true);
- ClearAnimations(playerid);
- SetPlayerWantedLevel(playerid,6);
- pStats[playerid][pWanted] = 6;
- SetPlayerCriminal(playerid,900, "Bankräuber");
- format(string, sizeof(string), "Der Spieler %s[%d] hat die Bank in Los Santos überfallen!", GetName(playerid), playerid);
- SendRadioMessage(1, COLOR_LIGHTBLUE, string);
- 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
- foreach(Player, i)
- {
- if(IsPlayerNPC(i))
- {
- new npcname[MAX_PLAYER_NAME];
- GetPlayerName(i, npcname, sizeof(npcname));
- if(!strcmp(npcname, "Lissa", true))
- {
- ClearAnimations(i);
- SetPlayerChatBubble(i,"Lissa: HILFFEEEEEEEEEE!",COLOR_BRIGHTRED,35.0,6000);
- }
- }
- }
- SetPlayerCheckpoint(playerid, 1026.5580,2365.8740,10.8203, 2.0); //Geld Wäsche
- FscheinCP[playerid] = 66;
- }
- forward SetBotAnimation(playerid);
- public SetBotAnimation(playerid)
- {
- ApplyAnimation(playerid, "ON_LOOKERS","point_loop", 4.0, 0, 1, 1, 1, 0, 0);
- foreach(Player, i)
- {
- if(IsPlayerNPC(i))
- {
- new npcname[MAX_PLAYER_NAME];
- GetPlayerName(i, npcname, sizeof(npcname));
- if(!strcmp(npcname, "Lissa", true))
- {
- ApplyAnimation(i, "ROB_BANK","SHP_HandsUp_Scr", 4.0, 0, 1, 1, 1, 0, 0);
- }
- }
- }
- }
- //GetNearestBot
- stock GetNearestBot(playerid, Float:abstand)
- {
- new Float:pX, Float:pY, Float:pZ, Float:vX, Float:vZ, Float:vY;
- GetPlayerPos(playerid, pX, pY, pZ);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerNPC(i))
- {
- GetPlayerPos(i, vX, vY, vZ);
- if(floatabs(pX-vX) < abstand && floatabs(pY-vY) < abstand && floatabs(pZ-vZ) < abstand && i != playerid)
- {
- return i;
- }
- }
- }
- return 9999;
- }
- forward Kilometer(vehicleid);
- public Kilometer(vehicleid)
- {
- foreach(Player, i)
- {
- new speed = floatround(GetVehicleSpeed(GetPlayerVehicleID(i),0));
- static string[27];
- if(speed > 10)
- {
- Metros[vehicleid] += floatround(floatdiv(GetVehicleSpeed(vehicleid), 60.0));
- }
- if(Metros[vehicleid] > 9)
- {
- Kilometros[vehicleid] += 1;
- Metros[vehicleid] = 0;
- }
- if(arrlen(Kilometros[vehicleid]) == 1)
- {
- format(string, 27, "Kilometer: 0000%d~g~%d", Kilometros[vehicleid], Metros[vehicleid]);
- TextDrawSetString(Speedo2[vehicleid], string);
- }
- else if(arrlen(Kilometros[vehicleid]) == 2)
- {
- format(string, 27, "Kilometer: 000%d~g~%d", Kilometros[vehicleid], Metros[vehicleid]);
- TextDrawSetString(Speedo2[vehicleid], string);
- }
- else if(arrlen(Kilometros[vehicleid]) == 3)
- {
- format(string, 27, "Kilometer: 00%d~g~%d", Kilometros[vehicleid], Metros[vehicleid]);
- TextDrawSetString(Speedo2[vehicleid], string);
- }
- else if(arrlen(Kilometros[vehicleid]) == 4)
- {
- format(string, 27, "Kilometer: 0%d~y~%d", Kilometros[vehicleid], Metros[vehicleid]);
- TextDrawSetString(Speedo2[vehicleid], string);
- }
- else if(arrlen(Kilometros[vehicleid]) == 5)
- {
- format(string, 27, "Kilometer: %d~r~%d", Kilometros[vehicleid], Metros[vehicleid]);
- TextDrawSetString(Speedo2[vehicleid], string);
- }
- }
- return 1;
- }
- forward Taxameter(vehicleid);
- public Taxameter(vehicleid)
- {
- foreach(Player, i)
- {
- if(spawncar_job[vehicleid] == 94)
- {
- new iSeat = GetPlayerVehicleSeat(i);
- new speed = floatround(GetVehicleSpeed(GetPlayerVehicleID(i),0));
- new preis;
- static string[70];
- if(iSeat == 0)
- {
- preis = GetPVarInt(i, "Taxipreis");
- }
- if(iSeat == 1)
- {
- if(speed > 10)
- {
- Sekunden[vehicleid] += 1;
- if(Sekunden[vehicleid] == 15)
- {
- Euro[vehicleid] +=preis;
- }
- if(Sekunden[vehicleid] == 30)
- {
- Euro[vehicleid] +=preis;
- }
- if(Sekunden[vehicleid] == 45)
- {
- Euro[vehicleid] +=preis;
- }
- if(Sekunden[vehicleid] == 60)
- {
- Euro[vehicleid] +=preis;
- }
- }
- if(arrlen(Minuten[vehicleid]) == 1)
- {
- 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]);
- TextDrawSetString(Taxa2[vehicleid], string);
- }
- if(arrlen(Minuten[vehicleid]) == 2)
- {
- format(string, 70, "Taxameter: ~g~0%d%ds ~r~E0~n~ ~g~0s ~r~E0 ~g~0s ~r~E0", Minuten[vehicleid], Sekunden[vehicleid]);
- TextDrawSetString(Taxa2[vehicleid], string);
- }
- if(arrlen(Minuten[vehicleid]) == 3)
- {
- format(string, 70, "Taxameter: ~g~%d%ds ~r~E0~n~ ~g~0s ~r~E0 ~g~0s ~r~E0", Minuten[vehicleid], Sekunden[vehicleid]);
- TextDrawSetString(Taxa2[vehicleid], string);
- }
- }
- }
- }
- }
- // ---------------[Autohaus]--------------- //
- public SetCarSpawn(playerid,carslot,Autohaus)
- {
- PlayerCar[playerid][carslot][cPos_x] = AutoHausPlatze[Autohaus][AutoHausZaehler[Autohaus]][0];
- PlayerCar[playerid][carslot][cPos_y] = AutoHausPlatze[Autohaus][AutoHausZaehler[Autohaus]][1];
- PlayerCar[playerid][carslot][cPos_z] = AutoHausPlatze[Autohaus][AutoHausZaehler[Autohaus]][2];
- PlayerCar[playerid][carslot][cRotate] = AutoHausPlatze[Autohaus][AutoHausZaehler[Autohaus]][3];
- PlayerCar[playerid][carslot][cLock] = 1;
- AutoHausZaehler[Autohaus] ++;
- if(AutoHausZaehler[Autohaus] >= 5) {AutoHausZaehler[Autohaus] = 0;}
- return 1;
- }
- public SpawnCar(playerid,carslot)
- {
- new model = PlayerCar[playerid][carslot][cModel];
- if(model >= 400 && model <= 611)
- {
- 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);
- if(PlayerCar[playerid][carslot][cPj] >= 0) {ChangeVehiclePaintjob(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cPj]);}
- if(PlayerCar[playerid][carslot][cMod1] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod1]);}
- if(PlayerCar[playerid][carslot][cMod2] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod2]);}
- if(PlayerCar[playerid][carslot][cMod3] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod3]);}
- if(PlayerCar[playerid][carslot][cMod4] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod4]);}
- if(PlayerCar[playerid][carslot][cMod5] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod5]);}
- if(PlayerCar[playerid][carslot][cMod6] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod6]);}
- if(PlayerCar[playerid][carslot][cMod7] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod7]);}
- if(PlayerCar[playerid][carslot][cMod8] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod8]);}
- if(PlayerCar[playerid][carslot][cMod9] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod9]);}
- if(PlayerCar[playerid][carslot][cMod10] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod10]);}
- if(PlayerCar[playerid][carslot][cMod11] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod11]);}
- if(PlayerCar[playerid][carslot][cMod12] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod12]);}
- if(PlayerCar[playerid][carslot][cMod13] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod13]);}
- if(PlayerCar[playerid][carslot][cMod14] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod14]);}
- if(PlayerCar[playerid][carslot][cMod15] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod15]);}
- if(PlayerCar[playerid][carslot][cMod16] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod16]);}
- if(PlayerCar[playerid][carslot][cMod17] != 0) {AddVehicleComponent(PlayerCar[playerid][carslot][cId],PlayerCar[playerid][carslot][cMod17]);}
- }
- }
- public UpdatePlayerCar(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(pStats[playerid][pCars] != 0)
- {
- for(new i = 0;i<pStats[playerid][pCars];i++)
- {
- new string3[150];
- new playername3[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername3, sizeof(playername3));
- format(string3, sizeof(string3), "/Autos/%s%d.glcar", playername3,i);
- new File: hFile = fopen(string3, io_write);
- if (hFile)
- {
- new var[32];
- format(var, 32, "Id=%d\n",PlayerCar[playerid][i][cId]);fwrite(hFile, var);
- format(var, 32, "Model=%d\n",PlayerCar[playerid][i][cModel]);fwrite(hFile, var);
- format(var, 32, "C1=%d\n",PlayerCar[playerid][i][cC1]);fwrite(hFile, var);
- format(var, 32, "C2=%d\n",PlayerCar[playerid][i][cC2]);fwrite(hFile, var);
- format(var, 32, "Pj=%d\n",PlayerCar[playerid][i][cPj]);fwrite(hFile, var);
- format(var, 32, "Preis=%d\n",PlayerCar[playerid][i][cPreis]);fwrite(hFile, var);
- format(var, 32, "Pos_x=%.3f\n",PlayerCar[playerid][i][cPos_x]);fwrite(hFile, var);
- format(var, 32, "Pos_y=%.3f\n",PlayerCar[playerid][i][cPos_y]);fwrite(hFile, var);
- format(var, 32, "Pos_z=%.3f\n",PlayerCar[playerid][i][cPos_z]);fwrite(hFile, var);
- format(var, 32, "Rotate=%.3f\n",PlayerCar[playerid][i][cRotate]);fwrite(hFile, var);
- format(var, 32, "Mod1=%d\n",PlayerCar[playerid][i][cMod1]);fwrite(hFile, var);
- format(var, 32, "Mod2=%d\n",PlayerCar[playerid][i][cMod2]);fwrite(hFile, var);
- format(var, 32, "Mod3=%d\n",PlayerCar[playerid][i][cMod3]);fwrite(hFile, var);
- format(var, 32, "Mod4=%d\n",PlayerCar[playerid][i][cMod4]);fwrite(hFile, var);
- format(var, 32, "Mod5=%d\n",PlayerCar[playerid][i][cMod5]);fwrite(hFile, var);
- format(var, 32, "Mod6=%d\n",PlayerCar[playerid][i][cMod6]);fwrite(hFile, var);
- format(var, 32, "Mod7=%d\n",PlayerCar[playerid][i][cMod7]);fwrite(hFile, var);
- format(var, 32, "Mod8=%d\n",PlayerCar[playerid][i][cMod8]);fwrite(hFile, var);
- format(var, 32, "Mod9=%d\n",PlayerCar[playerid][i][cMod9]);fwrite(hFile, var);
- format(var, 32, "Mod10=%d\n",PlayerCar[playerid][i][cMod10]);fwrite(hFile, var);
- format(var, 32, "Mod11=%d\n",PlayerCar[playerid][i][cMod11]);fwrite(hFile, var);
- format(var, 32, "Mod12=%d\n",PlayerCar[playerid][i][cMod12]);fwrite(hFile, var);
- format(var, 32, "Mod13=%d\n",PlayerCar[playerid][i][cMod13]);fwrite(hFile, var);
- format(var, 32, "Mod14=%d\n",PlayerCar[playerid][i][cMod14]);fwrite(hFile, var);
- format(var, 32, "Mod15=%d\n",PlayerCar[playerid][i][cMod15]);fwrite(hFile, var);
- format(var, 32, "Mod16=%d\n",PlayerCar[playerid][i][cMod16]);fwrite(hFile, var);
- format(var, 32, "Mod17=%d\n",PlayerCar[playerid][i][cMod17]);fwrite(hFile, var);
- format(var, 32, "Lock=%d\n",PlayerCar[playerid][i][cLock]);fwrite(hFile, var);
- format(var, 32, "Gesperrt=%d\n",PlayerCar[playerid][i][cGesperrt]);fwrite(hFile, var);
- format(var, 32, "OPos_x=%.3f\n",PlayerCar[playerid][i][cOPos_x]);fwrite(hFile, var);
- format(var, 32, "OPos_y=%.3f\n",PlayerCar[playerid][i][cOPos_y]);fwrite(hFile, var);
- format(var, 32, "OPos_z=%.3f\n",PlayerCar[playerid][i][cOPos_z]);fwrite(hFile, var);
- format(var, 32, "ORotate=%.3f\n",PlayerCar[playerid][i][cORotate]);fwrite(hFile, var);
- fclose(hFile);
- }
- }
- }
- }
- }
- public LoadPlayerCar(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(pStats[playerid][pCars] != 0)
- {
- for(new i = 0;i<pStats[playerid][pCars];i++)
- {
- new string2[64];
- new playername2[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername2, sizeof(playername2));
- format(string2, sizeof(string2), "/Autos/%s%d.glcar", playername2,i);
- new File: UserFile = fopen(string2, io_read);
- if ( UserFile )
- {
- new key[ 256 ] , val[ 256 ];
- new Data[ 256 ];
- while ( fread( UserFile , Data , sizeof( Data ) ) )
- {
- key = ini_GetKey( Data );
- if( strcmp( key , "Model" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cModel] = strval( val ); }
- if( strcmp( key , "C1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cC1] = strval( val ); }
- if( strcmp( key , "C2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cC2] = strval( val ); }
- if( strcmp( key , "Pj" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cPj] = strval( val ); }
- if( strcmp( key , "Preis" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cPreis] = strval( val ); }
- if( strcmp( key , "Pos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cPos_x] = floatstr( val ); }
- if( strcmp( key , "Pos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cPos_y] = floatstr( val ); }
- if( strcmp( key , "Pos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cPos_z] = floatstr( val ); }
- if( strcmp( key , "Rotate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cRotate] = floatstr( val ); }
- if( strcmp( key , "Mod1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod1] = strval( val ); }
- if( strcmp( key , "Mod2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod2] = strval( val ); }
- if( strcmp( key , "Mod3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod3] = strval( val ); }
- if( strcmp( key , "Mod4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod4] = strval( val ); }
- if( strcmp( key , "Mod5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod5] = strval( val ); }
- if( strcmp( key , "Mod6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod6] = strval( val ); }
- if( strcmp( key , "Mod7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod7] = strval( val ); }
- if( strcmp( key , "Mod8" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod8] = strval( val ); }
- if( strcmp( key , "Mod9" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod9] = strval( val ); }
- if( strcmp( key , "Mod10" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod10] = strval( val ); }
- if( strcmp( key , "Mod11" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod11] = strval( val ); }
- if( strcmp( key , "Mod12" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod12] = strval( val ); }
- if( strcmp( key , "Mod13" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod13] = strval( val ); }
- if( strcmp( key , "Mod14" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod14] = strval( val ); }
- if( strcmp( key , "Mod15" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod15] = strval( val ); }
- if( strcmp( key , "Mod16" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod16] = strval( val ); }
- if( strcmp( key , "Mod17" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cMod17] = strval( val ); }
- if( strcmp( key , "Lock" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cLock] = strval( val ); }
- if( strcmp( key , "Gesperrt" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cGesperrt] = strval( val ); }
- if( strcmp( key , "OPos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cOPos_x] = floatstr( val ); }
- if( strcmp( key , "OPos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cOPos_y] = floatstr( val ); }
- if( strcmp( key , "OPos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cOPos_z] = floatstr( val ); }
- if( strcmp( key , "ORotate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][i][cRotate] = floatstr( val ); }
- }
- fclose(UserFile);//close the file after everything has been read in the while
- SpawnCar(playerid,i);
- }
- }
- }
- }
- }
- forward bombtor();
- public bombtor()
- {
- foreach(Player, i)
- {
- SendClientMessage(i, COLOR_YELLOW, "Die Atomschutzbunker Türen werden jetzt geschlossen!");
- MoveDynamicObject(atomgate,-469.86840820313, 1462.0517578125, 22.695581436157,0.5);
- }
- }
- forward bombexplode(playerid);
- public bombexplode(playerid)
- {
- DestroyDynamicObject(Abombeo);
- CreateExplosion(PlayerExplosionX[1], PlayerExplosionY[1], PlayerExplosionZ[1], 10, 0);
- SendClientMessage(playerid, COLOR_YELLOW, "Deine Atombombe ist explodiert!");
- SendClientMessageToAll(COLOR_CNN, "San Andreas Newstime: Eine Atombombe ist explodiert!");
- new Float:pX,Float:pY;
- foreach(Player,i)
- {
- if (PlayerToPoint(99999, i, PlayerExplosionX[1],PlayerExplosionY[1], PlayerExplosionZ[1]) && pStats[playerid][pTutorial] == 1)
- {
- SendClientMessage(i,COLOR_LIGHTRED,"Du wurdest von der Schallwelle der Atombombe getroffen!");
- PushPlayer(i, pX+5, pY+80);
- Audio_Stop(playerid, HMusic[i]);
- }
- }
- Abombe=0;
- }
- // ---------------[Speicherung von allem]--------------- //
- forward SaveAll();
- public SaveAll()
- {
- new string[128];
- foreach(Player, i)
- {
- UpdatePlayerCar(i);
- SaveStatus(i);
- }
- format(string, sizeof(string), "Server: Es wurden alle Accounts,Autos und Häuser gespeichert!");
- SendAdminMessage(COLOR_LIGHTRED, string, 0);
- }
- // ---------------[Split]--------------- //
- forward split(const strsrc[], strdest[][], delimiter);
- public split(const strsrc[], strdest[][], delimiter)
- {
- new i, li;
- new aNum;
- new len;
- while(i <= strlen(strsrc)){
- if(strsrc[i]==delimiter || i==strlen(strsrc)){
- len = strmid(strdest[aNum], strsrc, li, i, 128);
- strdest[aNum][len] = 0;
- li = i+1;
- aNum++;
- }
- i++;
- }
- return 1;
- }
- // ---------------[Login System]--------------- //
- forward SaveStatus(playerid);
- public SaveStatus(playerid)
- {
- if(IsPlayerNPC(playerid)) return 1;
- new file[128];
- format(file,sizeof(file),"Spieler/%s.txt",GetName(playerid));
- if(fexist(file))
- {
- new INI:Acc = INI_Open(file);
- GetPlayerIp(playerid,rip[playerid],16);
- INI_WriteString(Acc,"IP",rip[playerid]);
- INI_WriteInt(Acc,"Score",GetPlayerScore(playerid));
- INI_WriteInt(Acc,"Geld",GetPlayerEuros(playerid));
- INI_WriteInt(Acc,"Tode",pStats[playerid][pDeaths]);
- INI_WriteInt(Acc,"Kills",pStats[playerid][pKills]);
- INI_WriteInt(Acc,"Logins",pStats[playerid][pLogins]);
- INI_WriteInt(Acc,"Skin",GetPlayerSkin(playerid));
- INI_WriteInt(Acc,"Geschlecht",pStats[playerid][pSex]);
- INI_WriteInt(Acc,"Alter",pStats[playerid][pAge]);
- INI_WriteInt(Acc,"Level",pStats[playerid][pLevel]);
- INI_WriteInt(Acc,"FightStyle",GetPlayerFightingStyle(playerid));
- INI_WriteInt(Acc,"AdminLevel",pStats[playerid][pAdminLevel]);
- INI_WriteInt(Acc,"Level",pStats[playerid][pLevel]);
- INI_WriteInt(Acc,"Tutorial",pStats[playerid][pTutorial]);
- INI_WriteInt(Acc,"Quest",pStats[playerid][pQuest]);
- INI_WriteInt(Acc,"WantedLevel",pStats[playerid][pWanted]);
- INI_WriteFloat(Acc,"Leben",pStats[playerid][pHealth]);
- INI_WriteFloat(Acc,"Schutz",pStats[playerid][pArmour]);
- INI_WriteFloat(Acc,"PosX",pStats[playerid][pPosX]);
- INI_WriteFloat(Acc,"PosY",pStats[playerid][pPosY]);
- INI_WriteFloat(Acc,"PosZ",pStats[playerid][pPosZ]);
- INI_WriteInt(Acc,"Interior",pStats[playerid][pInt]);
- INI_WriteInt(Acc,"GameCrash",pStats[playerid][pGameCrash]);
- INI_WriteInt(Acc,"Sfpass",pStats[playerid][pSfpass]);
- INI_WriteInt(Acc,"Lvpass",pStats[playerid][pLvpass]);
- INI_WriteInt(Acc,"Rvpass",pStats[playerid][pRvpass]);
- INI_WriteInt(Acc,"Handy",pStats[playerid][pHandy]);
- INI_WriteInt(Acc,"Guthaben",pStats[playerid][pGuthaben]);
- INI_WriteInt(Acc,"Akku",pStats[playerid][pAkku]);
- INI_WriteInt(Acc,"Klingelton",pStats[playerid][pRingTone]);
- INI_WriteInt(Acc,"Vertrag",pStats[playerid][pVertrag]);
- INI_WriteInt(Acc,"AppGps",pStats[playerid][pGPS]);
- INI_WriteInt(Acc,"Telefonbuch",pStats[playerid][pTelefonBuch]);
- INI_WriteInt(Acc,"Nummer",pStats[playerid][pnumber]);
- INI_WriteInt(Acc,"Aver",pStats[playerid][pAver]);
- INI_WriteInt(Acc,"Kver",pStats[playerid][pKver]);
- INI_WriteInt(Acc,"TragbareNews",pStats[playerid][ptnews]);
- INI_WriteInt(Acc,"Premium",pStats[playerid][pPremium]);
- INI_WriteInt(Acc,"PremiumTage",pStats[playerid][pPremiumTage]);
- INI_WriteInt(Acc,"Helm",pStats[playerid][pHelm]);
- INI_WriteInt(Acc,"Autos",pStats[playerid][pCars]);
- INI_WriteInt(Acc,"Wetter",pStats[playerid][pWetter]);
- INI_WriteInt(Acc,"PMStatus",pStats[playerid][pPMStatus]);
- INI_WriteInt(Acc,"Haus",pStats[playerid][pHaus]);
- INI_WriteInt(Acc,"Konto",pStats[playerid][pKonto]);
- INI_WriteInt(Acc,"Karte",pStats[playerid][pKarte]);
- INI_WriteInt(Acc,"Pin",pStats[playerid][pPin]);
- INI_WriteInt(Acc,"Personalausweis",pStats[playerid][pPersonalausweis]);
- INI_WriteInt(Acc,"ArbeitslosenGeld",pStats[playerid][pArbeitslosengeld]);
- INI_WriteInt(Acc,"Mob",pStats[playerid][pMob]);
- INI_WriteInt(Acc,"Sap",pStats[playerid][pSap]);
- INI_WriteInt(Acc,"Supportsperre",pStats[playerid][pSupportsperre]);
- INI_WriteInt(Acc,"Fschein",pStats[playerid][pCarLic]);
- INI_WriteInt(Acc,"Member",pStats[playerid][pMember]);
- INI_WriteInt(Acc,"Leader",pStats[playerid][pLeader]);
- INI_WriteInt(Acc,"Rank",pStats[playerid][pRank]);
- INI_WriteInt(Acc,"Job",pStats[playerid][pJob]);
- INI_WriteInt(Acc,"JobTime",pStats[playerid][pJobTime]);
- INI_WriteInt(Acc,"ServerPunkte",pStats[playerid][pSpunkte]);
- INI_WriteInt(Acc,"ServerPunkteB",pStats[playerid][pSpunkteb]);
- INI_WriteInt(Acc,"Jailed",pStats[playerid][pJailed]);
- INI_WriteInt(Acc,"JailedTime",pStats[playerid][pJailTime]);
- INI_WriteInt(Acc,"NewsSkill",pStats[playerid][pNewsSkill]);
- INI_WriteInt(Acc,"PaintballKills",pStats[playerid][pPkills]);
- INI_WriteInt(Acc,"PaintballTode",pStats[playerid][pPdeaths]);
- INI_WriteInt(Acc,"PaintballWaffe",pStats[playerid][pPwaffe]);
- INI_WriteInt(Acc,"PaintballPunkte",pStats[playerid][pPpunkte]);
- INI_WriteInt(Acc,"Warnungen",pStats[playerid][pWarns]);
- INI_WriteString(Acc,"Warnung1",pStats[playerid][pWarning1]);
- INI_WriteString(Acc,"Warnung2",pStats[playerid][pWarning2]);
- INI_WriteString(Acc,"Warnung3",pStats[playerid][pWarning3]);
- INI_Close(Acc);
- }
- return 1;
- }
- forward LoadSpieler(playerid);
- public LoadSpieler(playerid)
- {
- if(IsPlayerNPC(playerid)) return 1;
- OnPlayerLogin(playerid);
- new file[128];
- ResetPlayerMoney(playerid);
- ResetPlayerEuro(playerid);
- format(file,sizeof(file),"Spieler/%s.txt",GetName(playerid));
- if(fexist(file))
- {
- SetPlayerWantedLevel(playerid,GetPVarInt(playerid, "WantedLevel"));
- SetPlayerFightingStyle(playerid,GetPVarInt(playerid, "FightingStyle"));
- SetPlayerScore(playerid,GetPVarInt(playerid, "Score"));
- GivePlayerEuro(playerid,GetPVarInt(playerid, "Geld"));
- pStats[playerid][pAdminLevel] = GetPVarInt(playerid, "AdminLevel");
- pStats[playerid][pDeaths] = GetPVarInt(playerid, "Tode");
- pStats[playerid][pKills] = GetPVarInt(playerid, "Kills");
- pStats[playerid][pLogins] = GetPVarInt(playerid, "Login");
- pStats[playerid][pSex] = GetPVarInt(playerid, "Geschlecht");
- pStats[playerid][pAge] = GetPVarInt(playerid, "Alter");
- pStats[playerid][pLevel] = GetPVarInt(playerid, "Level");
- pStats[playerid][pTutorial] = GetPVarInt(playerid, "Tutorial");
- pStats[playerid][pQuest] = GetPVarInt(playerid, "Quest");
- pStats[playerid][pWanted] = GetPVarInt(playerid, "WantedLevel");
- pStats[playerid][pHealth] = GetPVarInt(playerid, "Leben");
- pStats[playerid][pArmour] = GetPVarInt(playerid, "Schutz");
- pStats[playerid][pPosX] = GetPVarInt(playerid, "PosX");
- pStats[playerid][pPosY] = GetPVarInt(playerid, "PosY");
- pStats[playerid][pPosZ] = GetPVarInt(playerid, "PosZ");
- pStats[playerid][pInt] = GetPVarInt(playerid, "Interior");
- pStats[playerid][pGameCrash] = GetPVarInt(playerid, "GameCrash");
- pStats[playerid][pSfpass] = GetPVarInt(playerid, "Sfpass");
- pStats[playerid][pLvpass] = GetPVarInt(playerid, "Lvpass");
- pStats[playerid][pRvpass] = GetPVarInt(playerid, "Rvpass");
- pStats[playerid][pHandy] = GetPVarInt(playerid, "WantedLevel");
- pStats[playerid][pGuthaben] = GetPVarInt(playerid, "Guthaben");
- pStats[playerid][pAkku] = GetPVarInt(playerid, "Akku");
- pStats[playerid][pRingTone] = GetPVarInt(playerid, "Klingelton");
- pStats[playerid][pVertrag] = GetPVarInt(playerid, "Vertrag");
- pStats[playerid][pGPS] = GetPVarInt(playerid, "AppGps");
- pStats[playerid][pTelefonBuch] = GetPVarInt(playerid, "TelefonBuch");
- pStats[playerid][pnumber] = GetPVarInt(playerid, "Nummber");
- pStats[playerid][ptnews] = GetPVarInt(playerid, "TragbareNews");
- pStats[playerid][pAver] = GetPVarInt(playerid, "Aver");
- pStats[playerid][pKver] = GetPVarInt(playerid, "Kver");
- pStats[playerid][pPremium] = GetPVarInt(playerid, "Premium");
- pStats[playerid][pPremiumTage] = GetPVarInt(playerid, "PremiumTage");
- pStats[playerid][pHelm] = GetPVarInt(playerid, "Helm");
- pStats[playerid][pCars] = GetPVarInt(playerid, "Autos");
- pStats[playerid][pWetter] = GetPVarInt(playerid, "Wetter");
- pStats[playerid][pPMStatus] = GetPVarInt(playerid, "PMStatus");
- pStats[playerid][pHaus] = GetPVarInt(playerid, "Haus");
- pStats[playerid][pKonto] = GetPVarInt(playerid, "Konto");
- pStats[playerid][pKarte] = GetPVarInt(playerid, "Karte");
- pStats[playerid][pPin] = GetPVarInt(playerid, "Pin");
- pStats[playerid][pPersonalausweis] = GetPVarInt(playerid, "Personalausweis");
- pStats[playerid][pArbeitslosengeld] = GetPVarInt(playerid, "Arbeitslosengeld");
- pStats[playerid][pMob] = GetPVarInt(playerid, "Mob");
- pStats[playerid][pSap] = GetPVarInt(playerid, "Sap");
- pStats[playerid][pSupportsperre] = GetPVarInt(playerid, "SupportSperre");
- pStats[playerid][pCarLic] = GetPVarInt(playerid, "Fschein");
- pStats[playerid][pMember] = GetPVarInt(playerid, "Member");
- pStats[playerid][pLeader] = GetPVarInt(playerid, "Leader");
- pStats[playerid][pRank] = GetPVarInt(playerid, "Rank");
- pStats[playerid][pJob] = GetPVarInt(playerid, "Job");
- pStats[playerid][pJobTime] = GetPVarInt(playerid, "JobTime");
- pStats[playerid][pSpunkte] = GetPVarInt(playerid, "ServerPunkte");
- pStats[playerid][pSpunkteb] = GetPVarInt(playerid, "ServerPunkteb");
- pStats[playerid][pJailed] = GetPVarInt(playerid, "Jailed");
- pStats[playerid][pJailTime] = GetPVarInt(playerid, "JailTime");
- pStats[playerid][pNewsSkill] = GetPVarInt(playerid, "NewsSkill");
- pStats[playerid][pPkills] = GetPVarInt(playerid, "PaintballKills");
- pStats[playerid][pPdeaths] = GetPVarInt(playerid, "PaintballTode");
- pStats[playerid][pPwaffe] = GetPVarInt(playerid, "PaintballWaffe");
- pStats[playerid][pPpunkte] = GetPVarInt(playerid, "PaintballPunkte");
- pStats[playerid][pWarns] = GetPVarInt(playerid, "Warnungen");
- pStats[playerid][pWarning1] = GetPVarInt(playerid, "Warnung1");
- pStats[playerid][pWarning2] = GetPVarInt(playerid, "Warnung2");
- pStats[playerid][pWarning3] = GetPVarInt(playerid, "Warnung3");
- }
- //Gamecrash
- if(pStats[playerid][pTutorial] == 1 && pStats[playerid][pGameCrash] == 1)
- {
- ShowPlayerDialog(playerid,DIALOG_GAMECRASH,DIALOG_STYLE_MSGBOX,"Gamecrash Wiederhersteller","{FFFFFF}Du hattest einen {FFFF00}Gamecrash{FFFFFF} soll deine Statistik wiederhergestellt werden?","Ja","Nein");
- }
- //Motd Anzeigen
- if(pStats[playerid][pTutorial] == 1 && pStats[playerid][pGameCrash] == 0)
- {
- 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","");
- }
- return 1;
- }
- forward LoadUser(playerid, name[], value[]);
- public LoadUser(playerid, name[], value[])
- {
- if(IsPlayerNPC(playerid)) return 1;
- if(!strcmp(name, "AdminLevel"))SetPVarInt(playerid,"AdminLevel", strval(value ));
- if(!strcmp(name, "Score"))SetPVarInt(playerid,"Score", strval(value ));
- if(!strcmp(name, "Geld"))SetPVarInt(playerid,"Geld", strval(value ));
- if(!strcmp(name, "Tode"))SetPVarInt(playerid,"Tode", strval(value ));
- if(!strcmp(name, "Kills"))SetPVarInt(playerid,"Kills", strval(value ));
- if(!strcmp(name, "Login"))SetPVarInt(playerid,"Login", strval(value ));
- if(!strcmp(name, "Skin"))SetPVarInt(playerid,"Skin", strval(value ));
- if(!strcmp(name, "Geschlecht"))SetPVarInt(playerid,"Geschlecht", strval(value ));
- if(!strcmp(name, "Alter"))SetPVarInt(playerid,"Alter", strval(value ));
- if(!strcmp(name, "FightStyle"))SetPVarInt(playerid,"FightStyle", strval(value ));
- if(!strcmp(name, "Level"))SetPVarInt(playerid,"Level", strval(value ));
- if(!strcmp(name, "Tutorial"))SetPVarInt(playerid,"Tutorial", strval(value ));
- if(!strcmp(name, "Quest"))SetPVarInt(playerid,"Quest", strval(value ));
- if(!strcmp(name, "WantedLevel"))SetPVarInt(playerid,"WantedLevel", strval(value ));
- if(!strcmp(name, "Leben"))SetPVarInt(playerid,"Leben", strval(value ));
- if(!strcmp(name, "Schutz"))SetPVarInt(playerid,"Schutz", strval(value ));
- if(!strcmp(name, "PosX"))SetPVarInt(playerid,"PosX", strval(value ));
- if(!strcmp(name, "PosY"))SetPVarInt(playerid,"PosY", strval(value ));
- if(!strcmp(name, "PosZ"))SetPVarInt(playerid,"PosZ", strval(value ));
- if(!strcmp(name, "Interior"))SetPVarInt(playerid,"Interior", strval(value ));
- if(!strcmp(name, "GameCrash"))SetPVarInt(playerid,"GameCrash", strval(value ));
- if(!strcmp(name, "Sfpass"))SetPVarInt(playerid,"Sfpass", strval(value ));
- if(!strcmp(name, "Lvpass"))SetPVarInt(playerid,"Lvpass", strval(value ));
- if(!strcmp(name, "Rvpass"))SetPVarInt(playerid,"Rvpass", strval(value ));
- if(!strcmp(name, "Handy"))SetPVarInt(playerid,"Handy", strval(value ));
- if(!strcmp(name, "Guthaben"))SetPVarInt(playerid,"Guthaben", strval(value ));
- if(!strcmp(name, "Akku"))SetPVarInt(playerid,"Akku", strval(value ));
- if(!strcmp(name, "Klingelton"))SetPVarInt(playerid,"Klingelton", strval(value ));
- if(!strcmp(name, "Vertrag"))SetPVarInt(playerid,"Vertrag", strval(value ));
- if(!strcmp(name, "AppGps"))SetPVarInt(playerid,"AppGps", strval(value ));
- if(!strcmp(name, "TelefonBuch"))SetPVarInt(playerid,"TelefonBuch", strval(value ));
- if(!strcmp(name, "Nummer"))SetPVarInt(playerid,"Nummer", strval(value ));
- if(!strcmp(name, "Aver"))SetPVarInt(playerid,"Aver", strval(value ));
- if(!strcmp(name, "Kver"))SetPVarInt(playerid,"Kver", strval(value ));
- if(!strcmp(name, "TragbareNews"))SetPVarInt(playerid,"TragbareNews", strval(value ));
- if(!strcmp(name, "Premium"))SetPVarInt(playerid,"Premium", strval(value ));
- if(!strcmp(name, "PremiumTage"))SetPVarInt(playerid,"PremiumTage", strval(value ));
- if(!strcmp(name, "Helm"))SetPVarInt(playerid,"Helm", strval(value ));
- if(!strcmp(name, "Autos"))SetPVarInt(playerid,"Autos", strval(value ));
- if(!strcmp(name, "Wetter"))SetPVarInt(playerid,"Wetter", strval(value ));
- if(!strcmp(name, "PMStatus"))SetPVarInt(playerid,"PMStatus", strval(value ));
- if(!strcmp(name, "Haus"))SetPVarInt(playerid,"Haus", strval(value ));
- if(!strcmp(name, "Konto"))SetPVarInt(playerid,"Konto", strval(value ));
- if(!strcmp(name, "Karte"))SetPVarInt(playerid,"Karte", strval(value ));
- if(!strcmp(name, "Pin"))SetPVarInt(playerid,"Pin", strval(value ));
- if(!strcmp(name, "Personalausweis"))SetPVarInt(playerid,"Personalausweis", strval(value ));
- if(!strcmp(name, "Arbeitslosengeld"))SetPVarInt(playerid,"Arbeitslosengeld", strval(value ));
- if(!strcmp(name, "Mob"))SetPVarInt(playerid,"Mob", strval(value ));
- if(!strcmp(name, "Sap"))SetPVarInt(playerid,"Sap", strval(value ));
- if(!strcmp(name, "SupportSperre"))SetPVarInt(playerid,"SupportSperre", strval(value ));
- if(!strcmp(name, "Fschein"))SetPVarInt(playerid,"Fschein", strval(value ));
- if(!strcmp(name, "Member"))SetPVarInt(playerid,"Member", strval(value ));
- if(!strcmp(name, "Leader"))SetPVarInt(playerid,"Leader", strval(value ));
- if(!strcmp(name, "Rank"))SetPVarInt(playerid,"Rank", strval(value ));
- if(!strcmp(name, "Job"))SetPVarInt(playerid,"Job", strval(value ));
- if(!strcmp(name, "ServerPunkte"))SetPVarInt(playerid,"ServerPunkte", strval(value ));
- if(!strcmp(name, "ServerPunkteb"))SetPVarInt(playerid,"ServerPunkteb", strval(value ));
- if(!strcmp(name, "Jailed"))SetPVarInt(playerid,"Jailed", strval(value ));
- if(!strcmp(name, "JailTime"))SetPVarInt(playerid,"JailTime", strval(value ));
- if(!strcmp(name, "NewsSkill"))SetPVarInt(playerid,"NewsSkill", strval(value ));
- if(!strcmp(name, "PaintballKills"))SetPVarInt(playerid,"PaintballKills", strval(value ));
- if(!strcmp(name, "PaintballTode"))SetPVarInt(playerid,"PaintballTode", strval(value ));
- if(!strcmp(name, "PaintballWaffe"))SetPVarInt(playerid,"PaintballWaffe", strval(value ));
- if(!strcmp(name, "PaintballPunkte"))SetPVarInt(playerid,"PaintballPunkte", strval(value ));
- if(!strcmp(name, "Warnungen"))SetPVarInt(playerid,"Warnungen", strval(value ));
- if(!strcmp(name, "Warnung1"))SetPVarInt(playerid,"Warnung1", strval(value ));
- if(!strcmp(name, "Warnung2"))SetPVarInt(playerid,"Warnung2", strval(value ));
- if(!strcmp(name, "Warnung3"))SetPVarInt(playerid,"Warnung3", strval(value ));
- return 1;
- }
- forward PlayerAdminLevel(playerid, name[], value[]);
- public PlayerAdminLevel(playerid, name[], value[])
- {
- if(!strcmp(name, "AdminLevel"))SetPVarInt(playerid,"AdminLevel", strval(value ));
- }
- forward OnPlayerLogin(playerid);
- public OnPlayerLogin(playerid)
- {
- if(IsPlayerNPC(playerid)) return 1;
- SetPVarInt(playerid, "Authentication", 1);
- SetPVarInt(playerid, "JustLogged", 1);
- DeletePVar(playerid, "Newbie");
- DeletePVar(playerid, "Garage");
- RemovePlayerAttachedObject(playerid,0);
- pStats[playerid][pLogins] += 1;
- LoadPlayerCar(playerid);
- Handy[playerid][Nummer] = pStats[playerid][pnumber];
- Handy[playerid][Akku] = pStats[playerid][pAkku];
- Handy[playerid][HatHandy] = 0;
- SetPVarInt(playerid, "HandyStatus", 1);
- wirdangerufen[playerid] = -1;
- Anderer[playerid] = 0-1;
- //Untere Leiste
- TextDrawHideForPlayer(playerid,Stats0[playerid]);
- TextDrawHideForPlayer(playerid,Stats1[playerid]);
- TextDrawHideForPlayer(playerid,Stats2[playerid]);
- TextDrawHideForPlayer(playerid,Stats3[playerid]);
- TextDrawHideForPlayer(playerid,Stats4[playerid]);
- UpdateStats(playerid);
- new string[100];
- new tmp2[70];
- ClearChat(playerid);
- format(string, sizeof(string), "* Willkommen zurück, %s.", GetName(playerid));
- SendClientMessage(playerid,COLOR_YELLOW, string);
- format(tmp2, sizeof(tmp2), "~b~Willkommen~n~~y~ %s", GetName(playerid));
- GameTextForPlayer(playerid, tmp2, 5000, 1);
- SpawnPlayer(playerid);
- return 1;
- }
- forward PlayerPassword(playerid, name[], value[]);
- public PlayerPassword(playerid, name[], value[])
- {
- if (!strcmp( name, "Password" ) )
- {
- SetPVarString(playerid, "pPass", value);
- }
- }
- // ---------------[Taxisystem]--------------- //
- forward Closettor();
- public Closettor()
- {
- MoveDynamicObject(taxitor, 1805.054321, -1890.907959, 14.005671, 3.0);
- taxitoro = 0;
- return 1;
- }
- forward closetaxiaufzug();
- public closetaxiaufzug()
- {
- MoveDynamicObject(taxiaufzug,1756.080688, -1919.567383, 20.266584, 4.0);
- taxiaufzugo = 0;
- return 1;
- }
- // ---------------[Clear Chat]--------------- //
- stock ClearChat(playerid)
- {
- for(new i = 1; i != 60; i++)
- {
- SendClientMessage(playerid, COLOR_GREY, "");
- }
- return 1;
- }
- // ---------------[Garsino's "CarMenu" FS]--------------- //
- stock IsVehicleOccupied(vehicleid)
- {
- foreach(Player, i)
- {
- if(GetPlayerState(i) == PLAYER_STATE_DRIVER || GetPlayerState(i) == PLAYER_STATE_PASSENGER)
- {
- if(GetPlayerVehicleID(i) == vehicleid)
- {
- return 1;
- }
- }
- }
- return 0;
- }
- stock CreateVehicleEx(playerid, modelid, Float:posX, Float:posY, Float:posZ, Float:angle, Colour1, Colour2, respawn_delay)
- {
- new world = GetPlayerVirtualWorld(playerid);
- new interior = GetPlayerInterior(playerid);
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- DestroyVehicle(GetPlayerVehicleID(playerid));
- GetPlayerPos(playerid, posX, posY, posZ);
- GetPlayerFacingAngle(playerid, angle);
- CurrentSpawnedVehicle[playerid] = CreateVehicle(modelid, posX, posY, posZ, angle, Colour1, Colour2, respawn_delay);
- LinkVehicleToInterior(CurrentSpawnedVehicle[playerid], interior);
- SetVehicleVirtualWorld(CurrentSpawnedVehicle[playerid], world);
- SetVehicleZAngle(CurrentSpawnedVehicle[playerid], angle);
- PutPlayerInVehicle(playerid, CurrentSpawnedVehicle[playerid], 0);
- }
- if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
- {
- if(!IsVehicleOccupied(CurrentSpawnedVehicle[playerid])) DestroyVehicle(CurrentSpawnedVehicle[playerid]);
- GetPlayerPos(playerid, posX, posY, posZ);
- GetPlayerFacingAngle(playerid, angle);
- CurrentSpawnedVehicle[playerid] = CreateVehicle(modelid, posX, posY, posZ, angle, Colour1, Colour2, respawn_delay);
- LinkVehicleToInterior(CurrentSpawnedVehicle[playerid], interior);
- SetVehicleVirtualWorld(CurrentSpawnedVehicle[playerid], world);
- SetVehicleZAngle(CurrentSpawnedVehicle[playerid], angle);
- PutPlayerInVehicle(playerid, CurrentSpawnedVehicle[playerid], 0);
- SetPlayerInterior(playerid, interior);
- }
- return 1;
- }
- Float:DistanceCameraTargetToLocation(Float:CamX, Float:CamY, Float:CamZ, Float:ObjX, Float:ObjY, Float:ObjZ, Float:FrX, Float:FrY, Float:FrZ)
- {
- new Float:TGTDistance;
- // get distance from camera to target
- TGTDistance = floatsqroot((CamX - ObjX) * (CamX - ObjX) + (CamY - ObjY) * (CamY - ObjY) + (CamZ - ObjZ) * (CamZ - ObjZ));
- new Float:tmpX, Float:tmpY, Float:tmpZ;
- tmpX = FrX * TGTDistance + CamX;
- tmpY = FrY * TGTDistance + CamY;
- tmpZ = FrZ * TGTDistance + CamZ;
- return floatsqroot((tmpX - ObjX) * (tmpX - ObjX) + (tmpY - ObjY) * (tmpY - ObjY) + (tmpZ - ObjZ) * (tmpZ - ObjZ));
- }
- stock IsPlayerAimingAt(playerid, Float:x, Float:y, Float:z, Float:radius)
- {
- new Float:cx,Float:cy,Float:cz,Float:fx,Float:fy,Float:fz;
- GetPlayerCameraPos(playerid, cx, cy, cz);
- GetPlayerCameraFrontVector(playerid, fx, fy, fz);
- return (radius >= DistanceCameraTargetToLocation(cx, cy, cz, x, y, z, fx, fy, fz));
- }
- // --------------------[Nagelbänder]-------------------- //
- stock CreateStrip(Float:x,Float:y,Float:z,Float:Angles)
- {
- for(new i = 0; i < sizeof(SpikeInfo); i++)
- {
- if(SpikeInfo[i][sCreated] == 0)
- {
- SpikeInfo[i][sCreated]=1;
- SpikeInfo[i][sX]=x;
- SpikeInfo[i][sY]=y;
- SpikeInfo[i][sZ]=z-0.7;
- SpikeInfo[i][sObject] = CreateDynamicObject(2899, x, y, z-0.9, 0, 0, Angles-90);
- nagelband +=1;
- return 1;
- }
- }
- return 0;
- }
- stock DeleteAllStrip()
- {
- for(new i = 0; i < sizeof(SpikeInfo); i++)
- {
- if(SpikeInfo[i][sCreated] == 1)
- {
- SpikeInfo[i][sCreated]=0;
- SpikeInfo[i][sX]=0.0;
- SpikeInfo[i][sY]=0.0;
- SpikeInfo[i][sZ]=0.0;
- DestroyDynamicObject(SpikeInfo[i][sObject]);
- nagelband =0;
- }
- }
- return 0;
- }
- stock DeleteClosestStrip(playerid)
- {
- for(new i = 0; i < sizeof(SpikeInfo); i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, SpikeInfo[i][sX], SpikeInfo[i][sY], SpikeInfo[i][sZ]))
- {
- if(SpikeInfo[i][sCreated] == 1)
- {
- SpikeInfo[i][sCreated]=0;
- SpikeInfo[i][sX]=0.0;
- SpikeInfo[i][sY]=0.0;
- SpikeInfo[i][sZ]=0.0;
- DestroyDynamicObject(SpikeInfo[i][sObject]);
- nagelband -=1;
- return 1;
- }
- }
- }
- return 0;
- }
- encode_tires(tires1, tires2, tires3, tires4) {
- return tires1 | (tires2 << 1) | (tires3 << 2) | (tires4 << 3);
- }
- // --------------------[Blitzer]-------------------- //
- stock CreateSpeedCam(Float:x,Float:y,Float:z,Float:rot,range,limit,fine)
- {
- if(currentid +1 > CAMERA_LIMIT)
- {
- print("Error! Das maximum an Blitzern wurde erreicht!");
- return -1;
- }
- currentid++;
- SpeedCameras[currentid][_x] = x;
- SpeedCameras[currentid][_y] = y;
- SpeedCameras[currentid][_z] = z;
- SpeedCameras[currentid][_rot] = rot;
- SpeedCameras[currentid][_range] = range;
- SpeedCameras[currentid][_limit] = limit;
- SpeedCameras[currentid][_fine] = fine;
- SpeedCameras[currentid][_usemph] = 0;
- SpeedCameras[currentid][_objectid] = CreateDynamicObject(18880,x,y,z-1,0,0,rot+180);
- SpeedCameras[currentid][_active] = true;
- return currentid;
- }
- stock DestroySpeedCam(cameraid)
- {
- SpeedCameras[cameraid][_active] = false;
- DestroyObject(SpeedCameras[cameraid][_objectid]);
- return 1;
- }
- stock SetSpeedCamRange(cameraid,limit)
- {
- SpeedCameras[cameraid][_limit] = limit;
- return 1;
- }
- stock SetSpeedCamFine(cameraid,fine)
- {
- SpeedCameras[cameraid][_fine] = fine;
- return 1;
- }
- // --------------------[Geschwindigkeits Messung]-------------------- //
- stock SendClientMessageEx(playerid,color,type[],{Float,_}:...)
- {
- new string[128];
- for(new i = 0;i<numargs() -2;i++)
- {
- switch(type[i])
- {
- case 's':
- {
- new result[128];
- for(new a= 0;getarg(i +3,a) != 0;a++)
- {
- result[a] = getarg(i +3,a);
- }
- if(!strlen(string))
- {
- format(string,sizeof string,"%s",result);
- } else format(string,sizeof string,"%s%s",string,result);
- }
- case 'i':
- {
- new result = getarg(i +3);
- if(!strlen(string))
- {
- format(string,sizeof string,"%i",result);
- } else format(string,sizeof string,"%s%i",string,result);
- }
- case 'f':
- {
- new Float:result = Float:getarg(i +3);
- if(!strlen(string))
- {
- format(string,sizeof string,"%f",result);
- } else format(string,sizeof string,"%s%f",string,result);
- }
- }
- }
- SendClientMessage(playerid,color,string);
- return 1;
- }
- // --------------------[PushPlayer]-------------------- //
- stock PushPlayer(playerid, Float:X1, Float:Y2)
- {
- new
- Float:pX1,
- Float:pY2;
- GetPlayerPos(playerid, X1, Y2); //Zeile 26344
- new Float:ang = (-acos((X1 - pX1) / floatsqroot((X1 - pX1)*(X1 - pX1) + (Y2 - pY2)*(Y2 - pY2))) - 90.0);
- pX1 = (-3 * floatsin(-ang, degrees));
- pY2= (-3 * floatcos(-ang, degrees));
- if(GetPlayerState(playerid) == 2)
- {
- SetVehicleVelocity(GetPlayerVehicleID(playerid), pX1+5, pY2+5, 100.0);
- SetVehicleHealth(GetPlayerVehicleID(playerid), 15.0);
- }
- else if(GetPlayerState(playerid) == 1)
- {
- SetPlayerVelocity(playerid, pX1+5, pY2+5,100.0);
- }
- SetPlayerHealth(playerid, 15.0);
- return 0;
- }
- // --------------------[Geld System]-------------------- //
- stock GivePlayerEuro(playerid,euros)
- {
- SetPVarInt(playerid,"Euros",GetPVarInt(playerid,"Euros")+euros);
- new cashtext[64];
- format(cashtext,64,"%d Euro",GetPVarInt(playerid,"Euros"));
- TextDrawSetString(Money2[playerid],cashtext);
- }
- stock EnoughEuro(playerid,euros)
- {
- if(GetPVarInt(playerid,"Euros") > euros) return 1;
- else if((GetPVarInt(playerid,"Euros") == euros)) return 1;
- else return 0;
- }
- stock ResetPlayerEuro(playerid)
- {
- SetPVarInt(playerid,"Euros",0);
- GivePlayerEuro(playerid,0);
- }
- stock GetPlayerEuros(playerid)
- {
- return GetPVarInt(playerid,"Euros");
- }
- stock SetPlayerEuro(playerid,euros)
- {
- SetPVarInt(playerid,"Euros",0);
- GivePlayerEuro(playerid,euros);
- }
- // --------------------[Waffen Anti System]-------------------- //
- stock GetWeaponModel(weaponid) // credits Double-O-Seven
- {
- switch(weaponid)
- {
- case 1:
- return 331;
- case 2..8:
- return weaponid+331;
- case 9:
- return 341;
- case 10..15:
- return weaponid+311;
- case 16..18:
- return weaponid+326;
- case 22..29:
- return weaponid+324;
- case 30,31:
- return weaponid+325;
- case 32:
- return 372;
- case 33..45:
- return weaponid+324;
- case 46:
- return 371;
- }
- return 0;
- }
- // --------------------[Facing Player]-------------------- //
- stock IsPlayerFacingPlayer(playerid, targetid, Float:dOffset)
- {
- new
- Float:pX,
- Float:pY,
- Float:pZ,
- Float:pA,
- Float:X,
- Float:Y,
- Float:Z,
- Float:ang;
- if(!IsPlayerConnected(playerid) || !IsPlayerConnected(targetid)) return 0;
- GetPlayerPos(targetid, pX, pY, pZ);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, pA);
- if( Y > pY ) ang = (-acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
- else if( Y < pY && X < pX ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 450.0);
- else if( Y < pY ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
- return AngleInRangeOfAngle(-ang, pA, dOffset);
- }
- // --------------------[AngleinRangeofRangle]-------------------- //
- stock AngleInRangeOfAngle(Float:a1, Float:a2, Float:range)
- {
- a1 -= a2;
- if((a1 < range) && (a1 > -range)) return true;
- return false;
- }
- // --------------------[Lotto System]-------------------- //
- stock MakeNumber()
- {
- Number[0] = random(99);
- Number[1] = random(99);
- Number[2] = random(99);
- Number[3] = random(99);
- Number[4] = random(99);
- Number[5] = random(99);
- }
- stock MakePlayerNumber(playerid)
- {
- PlayerNumber[0][playerid] = random(99);
- PlayerNumber[1][playerid] = random(99);
- PlayerNumber[2][playerid] = random(99);
- PlayerNumber[3][playerid] = random(99);
- PlayerNumber[4][playerid] = random(99);
- PlayerNumber[5][playerid] = random(99);
- }
- // --------------------[PlayerToPlayer]-------------------- //
- stock PlayerToPlayer(playerid,targetid,Float:distance)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid,x,y,z);
- if(IsPlayerInRangeOfPoint(targetid,distance,x,y,z))
- {
- return true;
- }
- return false;
- }
- // --------------------[PlayerToPoint]-------------------- //
- PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- return 0;
- }
- // --------------------[Tuningarage]-------------------- //
- stock StartGarage(playerid)
- {
- SetPVarInt(playerid, "Garage", 1);
- TogglePlayerControllable(playerid, false);
- 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");
- }
- stock StopGarage(playerid)
- {
- TogglePlayerControllable(playerid, true);
- TgateB = 0;
- SendClientMessage(playerid,COLOR_WHITE,"{FFFF00}Tuninggarage: {FFFFFF}Beehren Sie uns bald wieder!");
- MoveDynamicObject(tgate0,1518.26220700,-1476.00231900,7.48960700,2);
- MoveDynamicObject(tgate,1529.72448700,-1474.88757300,8.53587000 ,2);
- MoveDynamicObject(tgate1,1518.25378400,-1474.64648400,7.46458500 ,2);
- MoveDynamicObject(tgate2,1520.91699200,-1475.98803700,7.48958300 ,2);
- MoveDynamicObject(tgate3,1520.91577100,-1474.64892600,7.48958300 ,2);
- MoveDynamicObject(tgate4,1523.55273400,-1475.99853500,7.48960800 ,2);
- MoveDynamicObject(tgate5,1523.57202100,-1474.65380900,7.48960800 ,2);
- MoveDynamicObject(tgate6,1518.24743700,-1473.30639600,7.46460800 ,2);
- MoveDynamicObject(tgate7,1520.91491700,-1473.30334500,7.46460800 ,2);
- MoveDynamicObject(tgate8,1523.57458500,-1473.29760700,7.46460800 ,2);
- MoveDynamicObject(tgate9,1516.72961400,-1476.32873500,8.60031800 ,2);
- MoveDynamicObject(tgate10,1517.60376000,-1476.72082500,9.29875500 ,2);
- MoveDynamicObject(tgate11,1517.60107400,-1472.48510700,9.24875500 ,2);
- SetPVarInt(playerid, "Garage", 0);
- }
- stock UpdateStats(playerid)
- {
- new string[150];
- new jtext[25];
- if(pStats[playerid][pJob] == 0) { jtext = "Arbeitslos"; }
- else if(pStats[playerid][pJob] == 1) { jtext = "Mechatroniker"; }
- else if(pStats[playerid][pJob] == 2) { jtext = "Taxifahrer"; }
- else if(pStats[playerid][pJob] > 2) { jtext = "Arbeitslos"; }
- else if(pStats[playerid][pJob] == 99) { jtext = "Hartz IV"; }
- format(string, sizeof(string),"Level: ~r~%d",pStats[playerid][pLevel]);
- TextDrawSetString(Stats4[playerid],string); // Level Update
- format(string, sizeof(string),"Job: ~r~%s",jtext);
- TextDrawSetString(Stats2[playerid],string); // Job Update
- format(string, sizeof(string),"Spielpunkte : ~r~%d/%d",pStats[playerid][pSpunkte],pStats[playerid][pSpunkteb]);
- TextDrawSetString(Stats3[playerid],string); // Punkte Update
- }
- // --------------------[Helmsystem]-------------------- //
- stock SetPlayerHelm(playerid)
- {
- if(pStats[playerid][pHelm] == 1)
- {
- SendClientMessage(playerid,COLOR_WHITE,"Du hast dir deinen Helm erfolgreich aufgesetzt!");
- SetPlayerAttachedObject(playerid, 1, 18645, 2, 0.07, 0.0, 0.0, 88, 75, 0);
- SetPVarInt(playerid, "Helm", 1);
- }
- if(pStats[playerid][pHelm] == 2)
- {
- SendClientMessage(playerid,COLOR_WHITE,"Du hast dir deinen Helm erfolgreich aufgesetzt!");
- SetPlayerAttachedObject(playerid, 1, 18976, 2, 0.07, 0.0, 0.0, 88, 75, 0);
- SetPVarInt(playerid, "Helm", 1);
- }
- if(pStats[playerid][pHelm] == 3)
- {
- SendClientMessage(playerid,COLOR_WHITE,"Du hast dir deinen Helm erfolgreich aufgesetzt!");
- SetPlayerAttachedObject(playerid, 1, 18977, 2, 0.07, 0.0, 0.0, 88, 75, 0);
- SetPVarInt(playerid, "Helm", 1);
- }
- if(pStats[playerid][pHelm] == 4)
- {
- SendClientMessage(playerid,COLOR_WHITE,"Du hast dir deinen Helm erfolgreich aufgesetzt!");
- SetPlayerAttachedObject(playerid, 1, 18978, 2, 0.07, 0.0, 0.0, 88, 75, 0);
- }
- if(pStats[playerid][pHelm] == 5)
- {
- SendClientMessage(playerid,COLOR_WHITE,"Du hast dir deinen Helm erfolgreich aufgesetzt!");
- SetPlayerAttachedObject(playerid, 1, 18979, 2, 0.07, 0.0, 0.0, 88, 75, 0);
- SetPVarInt(playerid, "Helm", 1);
- }
- }
- // --------------------[ReturnUser]-------------------- //
- stock ReturnUser(text[], playerid = INVALID_PLAYER_ID)
- {
- new pos = 0;
- while (text[pos] < 0x21) // Strip out leading spaces
- {
- if (text[pos] == 0) return INVALID_PLAYER_ID; // No passed text
- pos++;
- }
- new userid = INVALID_PLAYER_ID;
- if (IsNumeric(text[pos])) // Check whole passed string
- {
- // If they have a numeric name you have a problem (although names are checked on id failure)
- userid = strval(text[pos]);
- if (userid >=0 && userid < MAX_PLAYERS)
- {
- if(!IsPlayerConnected(userid))
- {
- /*if (playerid != INVALID_PLAYER_ID)
- {
- SendClientMessage(playerid, 0xFF0000AA, "User not connected");
- }*/
- userid = INVALID_PLAYER_ID;
- }
- else
- {
- return userid; // A player was found
- }
- }
- /*else
- {
- if (playerid != INVALID_PLAYER_ID)
- {
- SendClientMessage(playerid, 0xFF0000AA, "Invalid user ID");
- }
- userid = INVALID_PLAYER_ID;
- }
- return userid;*/
- // Removed for fallthrough code
- }
- // They entered [part of] a name or the id search failed (check names just incase)
- new len = strlen(text[pos]);
- new count = 0;
- new name[MAX_PLAYER_NAME];
- foreach(Player, i)
- {
- if (IsPlayerConnected(i))
- {
- GetPlayerName(i, name, sizeof (name));
- if (strcmp(name, text[pos], true, len) == 0) // Check segment of name
- {
- if (len == strlen(name)) // Exact match
- {
- return i; // Return the exact player on an exact match
- // Otherwise if there are two players:
- // Me and MeYou any time you entered Me it would find both
- // And never be able to return just Me's id
- }
- else // Partial match
- {
- count++;
- userid = i;
- }
- }
- }
- }
- if (count != 1)
- {
- if (playerid != INVALID_PLAYER_ID)
- {
- if (count)
- {
- SendClientMessage(playerid, 0xFF0000AA, "Multiple users found, please narrow earch");
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000AA, "No matching user found");
- }
- }
- userid = INVALID_PLAYER_ID;
- }
- return userid; // INVALID_USER_ID for bad return
- }
- // --------------------[IsNumeric]-------------------- //
- stock IsNumeric(const string[])
- {
- for (new i = 0, j = strlen(string); i < j; i++)
- {
- if (string[i] > '9' || string[i] < '0') return 0;
- }
- return 1;
- }
- // --------------------[Internetcafe]-------------------- //
- stock StartBot(playerid)
- {
- new cartyp = GetPVarInt(playerid, "Car");
- leihcar[playerid] = CreateServerVehicle(0,cartyp,417.9730,-1818.5844,5.2867,0.6873,1,1,0,0);
- SetVehicleNumberPlate(leihcar[playerid], GetName(playerid));
- SetPVarInt(playerid, "Car", 0);
- leihcar[playerid] = leihcar[playerid];
- foreach(Player, i)
- {
- if(IsPlayerNPC(i))
- {
- new npcname[MAX_PLAYER_NAME];
- GetPlayerName(i, npcname, sizeof(npcname));
- if(!strcmp(npcname, "Ralle", true))
- {
- IsLogged[i] = 1;
- PutPlayerInVehicle(i, leihcar[playerid], 0);
- SetPlayerChatBubble(i,"Ralle: {FFFFFF}So dann fahren wir mal zum Internetcafe!",0xFFFF00DD,35.0,6000);
- }
- }
- }
- }
- stock ShowEmail(playerid)
- {
- new string[128],
- name[MAX_PLAYER_NAME],
- inbox,
- outbox;
- GetPlayerName(playerid,name,MAX_PLAYER_NAME);
- format(string,sizeof(string),"SELECT `New` FROM `emails` WHERE `Reciever`='%s@"#EMAIL_NAME"' AND `New`=1",name);
- QUERY(string);
- STORE;
- inbox = ROWS;
- FREE;
- format(string,sizeof(string),"SELECT `New` FROM `emails` WHERE `Sender`='%s@"#EMAIL_NAME"' AND `New`=1",name);
- QUERY(string);
- STORE;
- outbox = ROWS;
- FREE;
- format(string,sizeof(string),"{FFFFFF}\
- Eingang({FF0000}%i{FFFFFF} Neu)\n\
- Ausgang({FF0000}%i{FFFFFF} Ungelesen)\n\
- Email Erstellen",inbox,outbox);
- ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST,"E-Mail",string,"OK","Zurück");
- return 1;
- }
- // --------------------[Speedometer]-------------------- //
- stock SetT(playerid)
- {
- new car = GetPlayerVehicleID(playerid);
- new string[90];
- if(IsAAdminCar(car) || IsACopCar(car) || IsASanCar(car) || IsAFahrschulCar(car) || IsATaxiCar(car))
- {
- format(string, sizeof(string), "Tuev: ~g~%gueltig");
- TextDrawSetString(Speedo5[playerid],string);
- }
- if(IsAFahrrad(car))
- {
- format(string, sizeof(string), "Tuev: ~g~- - - - - -");
- TextDrawSetString(Speedo5[playerid],string);
- }
- if(IsABoat(car)|| IsAPlane(car))
- {
- format(string, sizeof(string), "Tuev: ~g~- - - - - -");
- TextDrawSetString(Speedo5[playerid],string);
- }
- if(car == gangstercar)
- {
- format(string, sizeof(string), "Tuev: ~g~%gueltig");
- TextDrawSetString(Speedo5[playerid],string);
- }
- if(!IsAAdminCar(car) && !IsACopCar(car) && !IsASanCar(car) && !IsAFahrrad(car) && !IsAFahrschulCar(car) && !IsATaxiCar(car) && car != gangstercar)
- {
- format(string, sizeof(string), "Tuev: ~r~%ungueltig");
- TextDrawSetString(Speedo5[playerid],string);
- }
- }
- stock SetPunkte(playerid)
- {
- new string[90];
- new punkte = pStats[playerid][pSap];
- if(punkte < 8)
- {
- format(string, sizeof(string), "Punkte in SA: ~g~%d", punkte);
- TextDrawSetString(Speedo4[playerid],string);
- }
- if(punkte > 8)
- {
- format(string, sizeof(string), "Punkte in SA: ~y~%d", punkte);
- TextDrawSetString(Speedo4[playerid],string);
- }
- if(punkte > 10)
- {
- format(string, sizeof(string), "Punkte in SA: ~r~%d", punkte);
- TextDrawSetString(Speedo4[playerid],string);
- }
- if(punkte >= 12)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- RemovePlayerFromVehicle(playerid);
- pStats[playerid][pSap] = 0;
- pStats[playerid][pCarLic] = 0;
- format(string, sizeof(string), "Punkte in SA: ~r~%d", punkte);
- TextDrawSetString(Speedo4[playerid],string);
- SendClientMessage(playerid,COLOR_YELLOW,"Du hattest 12 Punkte in San Andreas, dein Führerschein wurde dir abgenommen.");
- SendClientMessage(playerid,COLOR_YELLOW,"Gehe zur Fahrschule in Los Santos und lasse dir einen neuen erstellen!");
- SendClientMessage(playerid,COLOR_LIGHTRED,"Deine Punkte in San Andreas wurden auf 0 gesetzt!");
- }
- }
- }
- stock SetHealth(playerid) // Danke an Sniper für seine Zustand berechnung.
- {
- new string[90];
- new Float:CarHealth;
- GetVehicleHealth(GetPlayerVehicleID(playerid),CarHealth);
- CarHealth = CarHealth - 250;
- CarHealth = CarHealth /10;
- CarHealth = CarHealth /75;
- CarHealth = CarHealth *100;
- new CarHealthIni =floatround(CarHealth,floatround_floor);
- if(CarHealthIni < 0){CarHealthIni = 0;}
- if(CarHealthIni > 50)
- {
- format(string, sizeof(string), "Zustand: ~g~%d%", CarHealthIni);
- TextDrawSetString(Speedo3[playerid],string);
- }
- if(CarHealthIni < 50)
- {
- format(string, sizeof(string), "Zustand: ~y~%d%", CarHealthIni);
- TextDrawSetString(Speedo3[playerid],string);
- }
- if(CarHealthIni < 25)
- {
- format(string, sizeof(string), "Zustand: ~r~%d%", CarHealthIni);
- TextDrawSetString(Speedo3[playerid],string);
- }
- }
- stock SetSpeed(playerid)
- {
- for(new b = 0;b<currentid +1;b++)
- {
- new speed = floatround(GetVehicleSpeed(GetPlayerVehicleID(playerid),SpeedCameras[b][_usemph]));
- new string[140];
- if(speed < 100)
- {
- format(string, sizeof(string), "Tempo: ~g~%d KM/h", speed);
- TextDrawSetString(Speedo0[playerid],string);
- }
- if(speed > 100)
- {
- format(string, sizeof(string), "Tempo: ~y~%d KM/h", speed);
- TextDrawSetString(Speedo0[playerid],string);
- }
- if(speed > 119)
- {
- format(string, sizeof(string), "Tempo: ~r~%d KM/h", speed);
- TextDrawSetString(Speedo0[playerid],string);
- }
- }
- }
- /*stock mktime(hour,minute,second,day,month,year) {
- new timestamp2;
- timestamp2 = second + (minute * 60) + (hour * 3600);
- new days_of_month[12];
- if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) ) {
- days_of_month = {31,29,31,30,31,30,31,31,30,31,30,31}; // Schaltjahr
- } else {
- days_of_month = {31,28,31,30,31,30,31,31,30,31,30,31}; // keins
- }
- new days_this_year = 0;
- days_this_year = day;
- if(month > 1) { // No January Calculation, because its always the 0 past months
- for(new i=0; i<month-1;i++) {
- days_this_year += days_of_month[i];
- }
- }
- timestamp2 += days_this_year * 86400;
- for(new j=1970;j<year;j++) {
- timestamp2 += 31536000;
- if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) ) timestamp2 += 86400; // Schaltjahr + 1 Tag
- }
- return timestamp2;
- }*/
- /*stock ValidEmail2(email[]) {
- new len=strlen(email);
- new cstate=0;
- new i;
- for(i=0;i<len;i++) {
- if ((cstate==0 || cstate==1) && (email[i]>='A' && email[i]<='Z') || (email[i]>='a' && email[i]<='z') || (email[i]=='.') || (email[i]=='-') || (email[i]=='_'))
- {
- } else {
- // Ok no A..Z,a..z,_,.,-
- if ((cstate==0) &&(email[i]=='@')) {
- // its an @ after the name, ok state=1;
- cstate=1;
- } else {
- // Its stuff which is not allowed
- return false;
- }
- }
- }
- if (cstate<1) return false;
- if (len<6) return false;
- // A toplevel domain has only 3 to 4 signs :-)
- if ((email[len-3]=='.') || (email[len-4]=='.') || (email[len-5]=='.')) return true;
- return false;
- }*/
- stock arrlen(&constinteger)
- {
- new tmp[12];
- format(tmp, 12, "%i", constinteger);
- return strlen(tmp);
- }
- stock PlaySoundCool(playerid)
- {
- new Float:px,Float:py,Float:pz;
- GetPlayerPos(playerid, px, py, pz);
- foreach(Player,i)
- {
- if(PlayerToPoint(5.0,i,px,py,pz))
- {
- GMusic[i] = Audio_Play(i, 97, false, false, false);
- Audio_SetVolume(i, GMusic[playerid], 100);
- }
- }
- }
- // --------------------[Autohaus]-------------------- //
- InitComponents(componentid)
- {
- new i;
- for(i=0; i<20; i++)
- {
- if(spoiler[i][0]==componentid) { return 1; }
- }
- for(i=0; i<3; i++)
- {
- if(nitro[i][0]==componentid) { return 2; }
- }
- for(i=0; i<23; i++)
- {
- if(fbumper[i][0]==componentid) { return 3; }
- }
- for(i=0; i<22; i++)
- {
- if(rbumper[i][0]==componentid) { return 4; }
- }
- for(i=0; i<28; i++)
- {
- if(exhaust[i][0]==componentid) { return 5; }
- }
- for(i=0; i<2; i++)
- {
- if(bventr[i][0]==componentid) { return 6; }
- }
- for(i=0; i<2; i++)
- {
- if(bventl[i][0]==componentid) { return 7; }
- }
- for(i=0; i<4; i++)
- {
- if(bscoop[i][0]==componentid) { return 8; }
- }
- for(i=0; i<13; i++)
- {
- if(rscoop[i][0]==componentid) { return 9; }
- }
- for(i=0; i<21; i++)
- {
- if(SlideL[i][0]==componentid) { return 10; }
- }
- for(i=0; i<21; i++)
- {
- if(SlideR[i][0]==componentid) { return 11; }
- }
- if(hydraulics[0][0]==componentid) { return 12; }
- if(base[0][0]==componentid) { return 13; }
- for(i=0; i<2; i++)
- {
- if(rbbars[i][0]==componentid) { return 14; }
- }
- for(i=0; i<2; i++)
- {
- if(fbbars[i][0]==componentid) { return 15; }
- }
- for(i=0; i<17; i++)
- {
- if(wheels[i][0]==componentid) { return 16; }
- }
- for(i=0; i<2; i++)
- {
- if(lights[i][0]==componentid) { return 17; }
- }
- return 0;
- }
- stock ini_GetKey( line[] )
- {
- new keyRes[256];
- keyRes[0] = 0;
- if ( strfind( line , "=" , true ) == -1 ) return keyRes;
- strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
- return keyRes;
- }
- stock ini_GetValue( line[] )
- {
- new valRes[256];
- valRes[0]=0;
- if ( strfind( line , "=" , true ) == -1 ) return valRes;
- strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
- return valRes;
- }
- // --------------------[Log Files]-------------------- //
- stock ServerLog(adminname[], playername[], action[], reason[]) // Kicks, bans, warns, slaps, etc.
- {
- new hour, minute, second, year, month, day;
- getdate(year, month, day);
- gettime(hour, minute, second);
- 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);
- mysql_query(Query);
- }
- stock AdminLog(adminname[], action[])
- {
- new hour, minute, second, year, month, day;
- getdate(year, month, day);
- gettime(hour, minute, second);
- 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);
- mysql_query(Query);
- }
- stock CNNLog(adminname[], playername[], action[], reason[])
- {
- new hour, minute, second, year, month, day;
- getdate(year, month, day);
- gettime(hour, minute, second);
- 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);
- mysql_query(Query);
- }
- // --------------------[AntiDeAmx]-------------------- //
- AntiDeAMX()
- {
- new a[][] =
- {
- "Unarmed (Fist)",
- "Brass K"
- };
- #pragma unused a
- } //Zeile 27083
Add Comment
Please, Sign In to add comment