Guten Abend,
Ich hoffe mir kann einer helfen bei meinen Problemen
Problem 1:
Nach dem kill kommt direkt das Loginfenster, weiß einer warum ?
public OnPlayerSpawn(playerid)
{
SetPlayerMapIcon(playerid, 1, 1544.4790,-1673.6595,13.5585, 30, GELB); // LSPD
SetPlayerMapIcon(playerid, 2, 1480.9323,-1767.7324,18.7958, 38, GELB); // Stadthalle
SetPlayerMapIcon(playerid, 3, 1176.0037,-1326.3264,13.9999, 22, GELB); // Krankenhaus
SetPlayerMapIcon(playerid, 5, 1003.2296,-936.9583,42.3354, 42, GELB); // BSN Tanke
SetPlayerMapIcon(playerid, 6, -91.6243,-1170.1760,2.4145, 42, GELB); // LS-SF Tanke
SetPlayerMapIcon(playerid, 7, -2025.4976,156.6423,28.8359, 42, GELB); // SF Hafen Tanke
SetPlayerMapIcon(playerid, 8, 2115.7598,920.4518,10.8203, 42, GELB); // LV Ammu Tanke
SetPlayerMapIcon(playerid, 9, 655.1419,-564.7432,16.3359, 42, GELB); // Dillmore Tanke
SetPlayerMapIcon(playerid, 10, 1596.0321,2198.6726,10.5256, 42, GELB); // LV Tanke
SetPlayerMapIcon(playerid, 11, 1114.9974,-1297.4119,13.7144, 42, GELB); //KH Tanke
SetPlayerMapIcon(playerid, 12, -1628.0029,651.6329,6.8932, 42, GELB); //SFPD Tanke
SetPlayerMapIcon(playerid, 13, 1543.9258,-1609.9548,12.9464, 42, GELB); // LSPD Tanke
SetPlayerMapIcon(playerid, 14, -1327.9417,2677.3276,49.7678, 42, GELB); // LV Tanke
SetPlayerMapIcon(playerid, 15, 1366.3171,-1279.6683,13.5469, 18, GELB); //Waffenladen
SetPlayerMapIcon(playerid, 16, 1464.0879,-1031.8586,23.8922, 52, GELB); //LS Bank
SetPlayerMapIcon(playerid, 17, 2061.2505,-1886.8424,16.8752, 36, GELB); //Fahrschule
SetPlayerMapIcon(playerid, 19, 70.4484,1219.2515,18.5172, 42, GELB); //Tanke außerhalb von LS
SetPlayerMapIcon(playerid, 20, 1381.8209,462.8659,19.8424, 42, GELB); //Tanke in LV
SetPlayerMapIcon(playerid, 21, -1347.2850,459.4279,6.7522, 42, GELB); //Army Tanke
SetPlayerMapIcon(playerid, 22, -1676.1210,412.5870,6.9054, 42, GELB); //Tanke gegenüber von Army
SetPlayerMapIcon(playerid, 23, 776.3939,-1351.9756,13.2436, 55, GELB); //Billigautohaus
SetPlayerMapIcon(playerid, 24, 2127.9531,-1127.1896,25.2422, 55, GELB); //Bikeautohaus
SetPlayerMapIcon(playerid, 25, -1973.4039,284.3802,34.8771, 55, GELB); //Luxusautohaus
SetPlayerMapIcon(playerid, 26, 2796.9365,-1943.7969,13.5469, 27, GELB); //Tüv
SetPlayerMapIcon(playerid, 27, -2056.6167,454.3479,35.1719, 52, GELB); //SF Bank
SetPlayerMapIcon(playerid, 28, 2273.7500,2450.3140,46.9766, 30, GELB); //LVPD
SetPlayerMapIcon(playerid, 29, -1607.9067,681.0796,-5.2422, 30, GELB); //SFPD
SetPlayerMapIcon(playerid, 30, -2661.3589,622.8655,14.4531, 22, GELB); //SF Krankenhaus
SetPlayerMapIcon(playerid, 31, -2766.5366,375.5697,6.3347, 38, GELB); //SF Stadthalle
SetPlayerMapIcon(playerid, 32, -2519.4587,1215.5695,37.4283, 36, GELB); //SF Fahrschule
SetPlayerMapIcon(playerid, 33, 962.2885,1735.0990,8.6484, 36, GELB); //LV Fahrschule
SetPlayerMapIcon(playerid, 34, 2375.8191,2308.9973,8.1406, 38, GELB); //LV Stadthalle
SetPlayerMapIcon(playerid, 35, 2447.6890,2376.0242,12.1635, 52, GELB); //LV Bank
GangZoneShowForPlayer(playerid,NoDMSH,ROT);
GangZoneShowForPlayer(playerid,NoDMNoob,ROT);
GangZoneShowForPlayer(playerid,NoDMSHLV,ROT);
GangZoneShowForPlayer(playerid,NoDMNoobSf,ROT);
GangZoneShowForPlayer(playerid,NoDMNoobLV,ROT);
GangZoneShowForPlayer(playerid,NoDMSFSH,ROT);
GangZoneShowForPlayer(playerid,GSZone,GRÜN);
GangZoneShowForPlayer(playerid,VZone,GELB);
GangZoneShowForPlayer(playerid,BZone,LILA);
new Spieler[64];
new Sname[MAX_PLAYER_NAME];
GetPlayerName(playerid,Sname,sizeof(Sname));
format(Spieler,sizeof(Spieler),"/Accounts/%s.ini",Sname);
SetPlayerSkin(playerid,dini_Int(Spieler,"Skin"));
if(sSpieler[playerid][Geschlecht] == 1)
{
sSpieler[playerid][Skin] = 29;
SetPlayerSkin(playerid,29);
SetPlayerColor(playerid,WEIS);
}
else if(sSpieler[playerid][Geschlecht] == 2)
{
sSpieler[playerid][Skin] = 211;
SetPlayerSkin(playerid,211);
SetPlayerColor(playerid,WEIS);
}
if(sSpieler[playerid][Neu] == 0)
{
StopAudioStreamForPlayer(playerid);
SetPlayerPos(playerid,1727.6650,-1912.0194,13.5635);
SetCameraBehindPlayer(playerid);
SetPlayerFacingAngle(playerid,86.7942);
TogglePlayerControllable(playerid, true);
}
if(sSpieler[playerid][Paintball] == 1 && PlayerSpieltPaintball[playerid] == 1)
{
SetPlayerPos(playerid,-975.975708,1060.983032,1345.671875);
SetPlayerInterior(playerid,10);
GivePlayerWeapon(playerid,24,100);
GivePlayerWeapon(playerid,25,100);
GivePlayerWeapon(playerid,34,100);
}
if(sSpieler[playerid][Gangjail] == 1)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -230.5179,1506.8551,75.5625);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, BLAU, " Du befindest dich noch im GangJail!");
}
/*if(sSpieler[playerid][Tutorial] == 1 && sSpieler[playerid][Hotel] == 0 && PlayerSpieltPaintball[playerid] == 0 && sSpieler[playerid][Knast] == 0 && sSpieler[playerid][Prison] == 0 )
{
SetFraktionsSpawn(playerid);
}*/
if(pFirstLog[playerid] == true || sSpieler[playerid][Tut] < 1)
{
SetPlayerPos(playerid,839.3776,-2062.0535,12.8672); // Tutorial Position
SetPlayerCameraPos(playerid,794.2142,-2184.9741,31.8352);
SetPlayerCameraLookAt(playerid,839.3776,-2062.0535,12.8672);
SetPlayerFacingAngle(playerid,179.0452);
TogglePlayerControllable(playerid,false);
TutTime[playerid] = 1;
TutTimer[playerid] = SetTimerEx("Tutorial",1000,1,"i",playerid);
}
else if(Frei[playerid] != -1)
{
new rand = random(sizeof(KnastSpawn));
SetPlayerPos(playerid, KnastSpawn[rand][0], KnastSpawn[rand][1], KnastSpawn[rand][2]);
SetPlayerFacingAngle(playerid,KnastSpawn[rand][3]);
SendClientMessage(playerid,ROT,"Haftstrafe noch nicht abgessen!");
SetPlayerPos(playerid,197.8290,161.8141,1003.0300);
SetPlayerInterior(playerid,3);
ResetPlayerWeapons(playerid);
SetTimerEx("Gefaengnis",60000,0,"i",playerid);
}
if(sSpieler[playerid][Prison] == 1)
{
SendClientMessage(playerid,ROT,"Prisonzeit noch nicht abgessen!");
SetPlayerPos(playerid, 271.1351,1858.3071,8.7578);
SetPlayerInterior(playerid,0);
ResetPlayerWeapons(playerid);
SetTimerEx("Prisonzeit",60000,0,"i",playerid);
}
if(sSpieler[playerid][Leader] == 12 || sSpieler[playerid][Member] == 12) //Taxifahrer
{
SetPlayerPos(playerid,2581.6182,1062.2375,11.1817);
SetPlayerFacingAngle(playerid,355.1775);
SetCameraBehindPlayer(playerid);
SetPlayerColor(playerid,GELB);
SetPlayerSkin(playerid,189);
GivePlayerWeapon(playerid,3,1);
return 1;
}
if(sSpieler[playerid][Leader] == 17) //LVRD
{
if(sSpieler[playerid][Rank] == 13 && sSpieler[playerid][Rank] == 12)
{
SetPlayerColor(playerid,ROT);
SetPlayerSkin(playerid,70);
SetPlayerPos(playerid,1606.6323,1818.2062,10.8203);
SetPlayerFacingAngle(playerid,358.7478);
SetCameraBehindPlayer(playerid);
GivePlayerWeapon(playerid,41,500);
return 1;
}
}
if(sSpieler[playerid][Leader] == 16) //SFRD
{
if(sSpieler[playerid][Rank] == 13 && sSpieler[playerid][Rank] == 12)
{
SetPlayerColor(playerid,ROT);
SetPlayerSkin(playerid,70);
SetPlayerPos(playerid,-2667.5745,637.6201,14.4531);
SetPlayerFacingAngle(playerid,178.1983);
SetCameraBehindPlayer(playerid);
GivePlayerWeapon(playerid,41,500);
return 1;
}
}
if(sSpieler[playerid][Leader] == 6) //LSRD
{
if(sSpieler[playerid][Rank] == 13 || sSpieler[playerid][Rank] == 12)
{
SetPlayerColor(playerid,ROT);
SetPlayerSkin(playerid,70);
SetPlayerPos(playerid,1130.8488,-1329.1471,13.6333);
SetPlayerFacingAngle(playerid,353.6780);
SetCameraBehindPlayer(playerid);
GivePlayerWeapon(playerid,41,500);
return 1;
}
}
if(sSpieler[playerid][Member] == 6) //LSRD
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerSkin(playerid,274);
SetPlayerColor(playerid,ROT);
SetPlayerPos(playerid,1130.8488,-1329.1471,13.6333);
SetPlayerFacingAngle(playerid,353.6780);
SetCameraBehindPlayer(playerid);
GivePlayerWeapon(playerid,41,500);
return 1;
}
if(sSpieler[playerid][Rank] == 2)
{
SetPlayerSkin(playerid,275);
SetPlayerColor(playerid,ROT);
SetPlayerPos(playerid,1130.8488,-1329.1471,13.6333);
SetPlayerFacingAngle(playerid,353.6780);
SetCameraBehindPlayer(playerid);
GivePlayerWeapon(playerid,41,500);
return 1;
}
}
if(sSpieler[playerid][Leader] == 1) //LSPD
{
if(sSpieler[playerid][Rank] == 13)
{
SetPlayerColor(playerid,BLAU);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,219.0447,69.7077,1005.0391);
SetPlayerFacingAngle(playerid,268.3077);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid,283);
SetPlayerInterior(playerid,6);
return 1;
}
if(sSpieler[playerid][Rank] == 12)
{
SetPlayerSkin(playerid, 288);
SetPlayerInterior(playerid,6);
SetPlayerColor(playerid,BLAU);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,219.0447,69.7077,1005.0391);
SetPlayerFacingAngle(playerid,268.3077);
SetCameraBehindPlayer(playerid);
return 1;
}
}
if(sSpieler[playerid][Member] == 1) //LSPD
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerSkin(playerid, 281);
SetPlayerInterior(playerid,6);
SetPlayerColor(playerid,BLAU);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,219.0447,69.7077,1005.0391);
SetPlayerFacingAngle(playerid,268.3077);
SetCameraBehindPlayer(playerid);
return 1;
}
if(sSpieler[playerid][Rank] == 2)
{
SetPlayerSkin(playerid, 280);
SetPlayerInterior(playerid,6);
SetPlayerColor(playerid,BLAU);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,219.0447,69.7077,1005.0391);
SetPlayerFacingAngle(playerid,268.3077);
SetCameraBehindPlayer(playerid);
return 1;
}
if(sSpieler[playerid][Rank] == 3)
{
SetPlayerSkin(playerid, 267);
SetPlayerInterior(playerid,6);
SetPlayerColor(playerid,BLAU);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,219.0447,69.7077,1005.0391);
SetPlayerFacingAngle(playerid,268.3077);
SetCameraBehindPlayer(playerid);
return 1;
}
}
if(sSpieler[playerid][Leader] == 5 || sSpieler[playerid][Member] == 5) //San News
{
SetPlayerColor(playerid,ORANGE);
GivePlayerWeapon(playerid,43,9999);
SetPlayerSkin(playerid,187);
SetPlayerPos(playerid,996.7645,-1460.3590,13.5469);
SetPlayerFacingAngle(playerid,276.9659);
SetCameraBehindPlayer(playerid);
return 1;
}
if(sSpieler[playerid][Leader] == 9 && sSpieler[playerid][Rank] == 13) //Grove Street
{
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
SetPlayerSkin(playerid,269);
SetPlayerPos(playerid,2495.8521,-1709.1996,1014.7422);
SetPlayerFacingAngle(playerid,4.4102);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,3);
return 1;
}
if(sSpieler[playerid][Leader] == 9 && sSpieler[playerid][Rank] == 12) //Grove Street
{
SetPlayerPos(playerid,2495.8521,-1709.1996,1014.7422);
SetPlayerFacingAngle(playerid,4.4102);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,3);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
SetPlayerSkin(playerid, 270);
return 1;
}
if(sSpieler[playerid][Member] == 9) //Grove Street
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerSkin(playerid, 105);
SetPlayerPos(playerid,2495.8521,-1709.1996,1014.7422);
SetPlayerFacingAngle(playerid,4.4102);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,3);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
return 1;
}
if(sSpieler[playerid][Rank] == 2)
{
SetPlayerSkin(playerid, 106);
SetPlayerPos(playerid,2495.8521,-1709.1996,1014.7422);
SetPlayerFacingAngle(playerid,4.4102);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,3);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
return 1;
}
if(sSpieler[playerid][Rank] == 3)
{
SetPlayerPos(playerid,2495.8521,-1709.1996,1014.7422);
SetPlayerFacingAngle(playerid,4.4102);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,3);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
SetPlayerSkin(playerid, 107);
return 1;
}
if(sSpieler[playerid][Rank] == 4)
{
SetPlayerPos(playerid,2495.8521,-1709.1996,1014.7422);
SetPlayerFacingAngle(playerid,4.4102);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,3);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
SetPlayerSkin(playerid, 270);
return 1;
}
if(sSpieler[playerid][Geschlecht] == 2)
{
SetPlayerPos(playerid,2495.8521,-1709.1996,1014.7422);
SetPlayerFacingAngle(playerid,4.4102);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,3);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
return 1;
}
}
else if(sSpieler[playerid][Leader] == 8 && sSpieler[playerid][Rank] == 13 && sSpieler[playerid][Rank] == 12) //Ballas
{
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
SetPlayerSkin(playerid,103);
SetPlayerPos(playerid,2817.0981,-1165.9849,1029.1719);
SetPlayerFacingAngle(playerid,106.6972);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,8);
return 1;
}
else if(sSpieler[playerid][Member] == 8) //Ballas
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerPos(playerid,2817.0981,-1165.9849,1029.1719);
SetPlayerFacingAngle(playerid,106.6972);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,8);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
SetPlayerSkin(playerid,66);
return 1;
}
if(sSpieler[playerid][Rank] == 2)
{
SetPlayerPos(playerid,2817.0981,-1165.9849,1029.1719);
SetPlayerFacingAngle(playerid,106.6972);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,8);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
SetPlayerSkin(playerid,102);
return 1;
}
if(sSpieler[playerid][Rank] == 3)
{
SetPlayerSkin(playerid,104);
SetPlayerPos(playerid,2817.0981,-1165.9849,1029.1719);
SetPlayerFacingAngle(playerid,106.6972);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,8);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
return 1;
}
if(sSpieler[playerid][Rank] == 4)
{
SetPlayerPos(playerid,2817.0981,-1165.9849,1029.1719);
SetPlayerFacingAngle(playerid,106.6972);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,8);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
SetPlayerSkin(playerid, 176);
return 1;
}
if(sSpieler[playerid][Geschlecht] == 2)
{
SetPlayerPos(playerid,2817.0981,-1165.9849,1029.1719);
SetPlayerFacingAngle(playerid,106.6972);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,8);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
SetPlayerSkin(playerid,103);
return 1;
}
}
if(sSpieler[playerid][Leader] == 11 && sSpieler[playerid][Rank] == 13) //Hitman
{
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
GivePlayerWeapon(playerid,34,150);
SetPlayerSkin(playerid,165);
SetPlayerPos(playerid,2448.7378,-1689.4907,1013.5078);
SetPlayerFacingAngle(playerid,180.1451);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,2);
return 1;
}
if(sSpieler[playerid][Leader] == 11 && sSpieler[playerid][Rank] == 12) //Hitman
{
SetPlayerPos(playerid,2448.7378,-1689.4907,1013.5078);
SetPlayerFacingAngle(playerid,180.1451);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,2);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
GivePlayerWeapon(playerid,34,150);
SetPlayerSkin(playerid,166);
return 1;
}
if(sSpieler[playerid][Member] == 11) //Hitman
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerPos(playerid,2448.7378,-1689.4907,1013.5078);
SetPlayerFacingAngle(playerid,180.1451);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,2);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
GivePlayerWeapon(playerid,34,150);
SetPlayerSkin(playerid,122);
return 1;
}
if(sSpieler[playerid][Rank] == 2)
{
SetPlayerPos(playerid,2448.7378,-1689.4907,1013.5078);
SetPlayerFacingAngle(playerid,180.1451);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,2);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
GivePlayerWeapon(playerid,34,150);
SetPlayerSkin(playerid,117);
return 1;
}
if(sSpieler[playerid][Rank] == 3)
{
SetPlayerPos(playerid,2448.7378,-1689.4907,1013.5078);
SetPlayerFacingAngle(playerid,180.1451);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,2);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
GivePlayerWeapon(playerid,34,150);
SetPlayerSkin(playerid,120);
return 1;
}
if(sSpieler[playerid][Rank] == 4)
{
SetPlayerPos(playerid,2448.7378,-1689.4907,1013.5078);
SetPlayerFacingAngle(playerid,180.1451);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,2);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
GivePlayerWeapon(playerid,34,150);
SetPlayerSkin(playerid,164);
return 1;
}
}
if(sSpieler[playerid][Leader] == 10 && sSpieler[playerid][Rank] == 13) //Los Santos Vagos
{
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,24,50);
SetPlayerSkin(playerid,109);
SetPlayerPos(playerid,322.9197,1119.7819,1083.8828);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
return 1;
}
if(sSpieler[playerid][Leader] == 10 && sSpieler[playerid][Rank] == 12) //Los Sanots Vagos
{
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,31,999);
GivePlayerWeapon(playerid,29,999);
SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
SetPlayerSkin(playerid,110);
return 1;
}
if(sSpieler[playerid][Member] == 10)
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerSkin(playerid,30);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,31,999);
GivePlayerWeapon(playerid,29,999);
SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
return 1;
}
if(sSpieler[playerid][Rank] == 2)
{
SetPlayerSkin(playerid,108);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,31,999);
GivePlayerWeapon(playerid,29,999);
SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
return 1;
}
if(sSpieler[playerid][Rank] == 3)
{
SetPlayerSkin(playerid,292);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,31,999);
GivePlayerWeapon(playerid,29,999);
SetPlayerPos(playerid,1290.2834,-797.2609,1089.9375);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
return 1;
}
}
if(sSpieler[playerid][Leader] == 4 && sSpieler[playerid][Rank] == 13 && sSpieler[playerid][Rank] == 12) //Präsident
{
SetPlayerColor(playerid,WEIS);
SetPlayerSkin(playerid,295);
GivePlayerWeapon(playerid,31,999);
GivePlayerWeapon(playerid,29,999);
SetPlayerPos(playerid,1290.8909,-789.0549,1089.9375);
SetPlayerFacingAngle(playerid,172.6718);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
return 1;
}
if(sSpieler[playerid][Member] == 4)
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,31,999);
GivePlayerWeapon(playerid,29,999);
SetPlayerPos(playerid,1290.8909,-789.0549,1089.9375);
SetPlayerFacingAngle(playerid,172.6718);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
SetPlayerSkin(playerid,163);
return 1;
}
if(sSpieler[playerid][Rank] == 2)
{
SetPlayerSkin(playerid,166);
SetPlayerColor(playerid,WEIS);
GivePlayerWeapon(playerid,31,999);
GivePlayerWeapon(playerid,29,999);
SetPlayerPos(playerid,1290.8909,-789.0549,1089.9375);
SetPlayerFacingAngle(playerid,172.6718);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,5);
return 1;
}
}
if(sSpieler[playerid][Leader] == 7 || sSpieler[playerid][Member] == 7) //Oamt
{
SetPlayerColor(playerid,HELLBLAU);
GivePlayerWeapon(playerid,41,2000);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,324.3147,306.2791,999.1484);
SetPlayerFacingAngle(playerid,91.8310);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid,71);
SetPlayerInterior(playerid,5);
return 1;
}
if(sSpieler[playerid][Leader] == 2 || sSpieler[playerid][Rank] == 13 || sSpieler[playerid][Rank] == 12) //SFPD
{
SetPlayerColor(playerid,WEIS);
SetPlayerSkin(playerid,301);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,216.0463,113.4957,1003.2188);
SetPlayerFacingAngle(playerid,270.4093);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,10);
return 1;
}
if(sSpieler[playerid][Member] == 2)
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerColor(playerid,WEIS);
SetPlayerSkin(playerid,267);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,216.0463,113.4957,1003.2188);
SetPlayerFacingAngle(playerid,270.4093);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,10);
return 1;
}
if(sSpieler[playerid][Rank] == 2)
{
SetPlayerColor(playerid,WEIS);
SetPlayerSkin(playerid,266);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,216.0463,113.4957,1003.2188);
SetPlayerFacingAngle(playerid,270.4093);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,10);
return 1;
}
if(sSpieler[playerid][Rank] == 3)
{
SetPlayerColor(playerid,WEIS);
SetPlayerSkin(playerid,265);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerPos(playerid,216.0463,113.4957,1003.2188);
SetPlayerFacingAngle(playerid,270.4093);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,10);
return 1;
}
}
if(sSpieler[playerid][Leader] == 3 && sSpieler[playerid][Member] == 3) //Army
{
SetPlayerColor(playerid,GRÜN);
SetCameraBehindPlayer(playerid);
SetPlayerPos(playerid,-1346.0912,492.1238,11.2027);
SetPlayerFacingAngle(playerid,359.3823);
SetPlayerInterior(playerid,0);
GivePlayerWeapon(playerid,24,500);
GivePlayerWeapon(playerid,31,500);
GivePlayerWeapon(playerid,29,500);
SetPlayerSkin(playerid,287);
return 1;
}
if(sSpieler[playerid][Leader] == 14 || sSpieler[playerid][Member] == 14) //Tuev
{
SetPlayerPos(playerid,2785.6055,-1930.2949,13.5469);
SetPlayerFacingAngle(playerid,270.0651);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid,50);
SetPlayerInterior(playerid,0);
return 1;
}
if(sSpieler[playerid][Leader] == 13 || sSpieler[playerid][Rank] == 13 || sSpieler[playerid][Rank] == 12) //Spedition
{
SetPlayerPos(playerid,-49.7469,-270.1691,6.6332);
SetPlayerFacingAngle(playerid,189.6376);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid,34);
GivePlayerWeapon(playerid,25,30);
SetPlayerInterior(playerid,0);
return 1;
}
if(sSpieler[playerid][Member] == 13)
{
SetPlayerPos(playerid,-49.7469,-270.1691,6.6332);
SetPlayerFacingAngle(playerid,189.6376);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid,44);
GivePlayerWeapon(playerid,25,30);
SetPlayerInterior(playerid,0);
return 1;
}
if(sSpieler[playerid][Leader] == 15 && sSpieler[playerid][Rank] == 13 && sSpieler[playerid][Rank] == 12) //LVPD
{
SetPlayerPos(playerid,219.0003,184.5267,1003.0313);
SetPlayerFacingAngle(playerid,180.4584);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid,288);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerInterior(playerid,3);
SetPlayerVirtualWorld(playerid,4);
SetPlayerColor(playerid,BLAU);
return 1;
}
if(sSpieler[playerid][Member] == 15)
{
if(sSpieler[playerid][Rank] == 1)
{
SetPlayerPos(playerid,219.0003,184.5267,1003.0313);
SetPlayerFacingAngle(playerid,180.4584);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid,311);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerInterior(playerid,3);
SetPlayerVirtualWorld(playerid,1);
SetPlayerColor(playerid,BLAU);
return 1;
}
if(sSpieler[playerid][Rank] == 2)
{
SetPlayerPos(playerid,219.0003,184.5267,1003.0313);
SetPlayerFacingAngle(playerid,180.4584);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid,310);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerInterior(playerid,3);
SetPlayerVirtualWorld(playerid,1);
SetPlayerColor(playerid,BLAU);
return 1;
}
if(sSpieler[playerid][Rank] == 3)
{
SetPlayerPos(playerid,219.0003,184.5267,1003.0313);
SetPlayerFacingAngle(playerid,180.4584);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid,302);
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,3,0);
SetPlayerInterior(playerid,3);
SetPlayerVirtualWorld(playerid,1);
SetPlayerColor(playerid,BLAU);
return 1;
}
}
if(sSpieler[playerid][Hotel] > 0)
{
SetHotelSpawn(playerid);
}
if(FirstSpawn[playerid] == 1)
{
SetPlayerCameraPos(playerid, 1200.0189,-1349.9330,17.1927);//,24.2789);
SetPlayerCameraLookAt(playerid,1178.6764,-1324.9622,14.1318);
ResetPlayerWeapons(playerid);
SendClientMessage(playerid,BLAU,"Willkommen im Krankenhaus, deine Wunden werden geheilt!");
SendClientMessage(playerid,BLAU,"Nach 2 Minuten wirst du aus dem Krankenhaus entlassen.");
Krankenhaus[playerid] = 1;
SetTimerEx("KrankenhausSpawn", 120000, false, "i", playerid);
TogglePlayerControllable(playerid,0);
SetPlayerPos(playerid,1162.871704, -1339.109619, 14.297291);
}
return 1;
}
public KrankenhausSpawn(playerid)
{
if(IsPlayerConnected(playerid))
{
new Spieler[64];
if(Krankenhaus[playerid] == 1)
{
if(sSpieler[playerid][Krankenhausversicherung] == 1)
{
SendClientMessage(playerid,BLAU,"Du wurdest aus dem Krankenhaus entlassen.");
SendClientMessage(playerid,BLAU,"Behandlungskosten: 0$");
Krankenhaus[playerid] = 0;
SetPlayerPos(playerid,1178.7200,-1325.1553,14.1340);
SetPlayerFacingAngle(playerid,266.2853); //hier setzt er die Position am Krankenhaus
SetPlayerHealth(playerid,100);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid,1);
SetPlayerSkin(playerid,dini_Int(Spieler,"Skin"));
}
else if(sSpieler[playerid][Krankenhausversicherung] == 0)
{
SendClientMessage(playerid,BLAU,"Du wurdest aus dem Krankenhaus entlassen.");
SendClientMessage(playerid,BLAU,"Behandlungskosten: 500$");
Krankenhaus[playerid] = 0;
SetPlayerPos(playerid,1178.7200,-1325.1553,14.1340);
SetPlayerFacingAngle(playerid,266.2853); //hier setzt er die Position am Krankenhaus
SetPlayerHealth(playerid,100);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid,1);
GivePlayerMoneyEx(playerid, -500);
SetPlayerSkin(playerid,dini_Int(Spieler,"Skin"));
}
}
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(FirstSpawn[playerid] == 0 || PlayerSpieltPaintball[playerid] == 0)
{
FirstSpawn[playerid] = 1;
}
if(high[playerid] == 1)
{
DrugsOff(playerid);
KillTimer(drugtimer[playerid]);
}
DisablePlayerCheckpoint(playerid);
pizzen[playerid] = 0;
if(sSpieler[playerid][Auftrag] > 0)
{
if(IsPlayerConnected(killerid))
{
if(sSpieler[killerid][Member] == 11 || sSpieler[killerid][Leader] == 11)
{
if(GoChase[killerid] == playerid)
{
new string[128];
new killer[MAX_PLAYER_NAME];
new name[MAX_PLAYER_NAME];
GetPlayerName(killerid, killer, sizeof(killer));
new fkasse = sSpieler[playerid][Auftrag]/2;
HitmanK += fkasse;
GivePlayerMoneyEx(killerid, sSpieler[playerid][Auftrag]/2);
format(string,128,"Hitman %s hat den Auftrag an %s erfüllt und bekommt: $%d",killer,name,sSpieler[playerid][Auftrag]/2);
SendClientMessageToAll(GELB, string);
sSpieler[playerid][Auftrag] = 0;
GotHit[playerid] = 0;
GetChased[playerid] = 999;
GoChase[killerid] = 999;
}
}
}
}
if(high[playerid] == 1)
{
DrugsOff(playerid);
KillTimer(drugtimer[playerid]);
}
if(mission[playerid] != 0)
{
GameTextForPlayer(playerid,"~r~Mission Fehlgeschlagen", 2000, 0);
StartmissionCP[playerid] = 0;
Startmission[playerid] = 0;
DisablePlayerCheckpoint(playerid);
mission[playerid] = 0;
}
if(sSpieler[playerid][Wanteds] > 0)
{
if(IsACop(playerid))
{
new killstring[264],string[128];
if(sSpieler[playerid][Leader] == 1 || sSpieler[playerid][Member] == 1)
{
format(killstring,sizeof(killstring),"LS-Officer %s hat den Verbrecher %s getötet.",SpielerName(killerid),SpielerName(playerid));
SendClientMessageToAll(GRÜN,killstring);
format(string, sizeof(string), "Gesuchten getötet! + 400$");
GameTextForPlayer(killerid, string, 5000, 1);
SetTimerEx("Gefaengnis",60000,0,"i",playerid);
sSpieler[playerid][Preamie] += 400;
SendClientMessage(playerid,GELB,"Am Zahltag bekommst du deine Belohnung!");
}
if(sSpieler[playerid][Leader] == 2 || sSpieler[playerid][Member] == 2)
{
format(killstring,sizeof(killstring),"SFPD-Officer %s hat den Verbrecher %s getötet.",SpielerName(killerid),SpielerName(playerid));
SendClientMessageToAll(GRÜN,killstring);
format(string, sizeof(string), "Gesuchten getötet! + 400$");
GameTextForPlayer(killerid, string, 5000, 1);
SetTimerEx("Gefaengnis",60000,0,"i",playerid);
sSpieler[playerid][Preamie] += 400;
SendClientMessage(playerid,GELB,"Am Zahltag bekommst du deine Belohnung!");
}
if(sSpieler[playerid][Leader] == 3 || sSpieler[playerid][Member] == 3)
{
format(killstring,sizeof(killstring),"Soldat %s hat den Verbrecher %s getötet.",SpielerName(killerid),SpielerName(playerid));
SendClientMessageToAll(GRÜN,killstring);
format(string, sizeof(string), "Gesuchten getötet! + 400$");
GameTextForPlayer(killerid, string, 5000, 1);
sSpieler[playerid][Preamie] += 400;
SetTimerEx("Gefaengnis",60000,0,"i",playerid);
SendClientMessage(playerid,GELB,"Am Zahltag bekommst du deine Belohnung!");
}
}
}
if(!IsACop(killerid))
{
new str[128],str1[128],pname[MAX_PLAYER_NAME];
new wantedlevel = GetPlayerWantedLevel(killerid);
GetPlayerName(playerid,pname,sizeof(pname));
format(str,sizeof(str),"Du hast einen Verbrechen begangen (Vorsätzlicher Mord). Zeuge: Niemand", pname);
SendClientMessage(killerid,ORANGE,str);
format(str1,sizeof(str1),"Dein Aktuelles WantedLevel: %d",sSpieler[killerid][Wanteds]);
SendClientMessage(killerid,GELB,str1);
SetPlayerWantedLevel(killerid, wantedlevel + 2);
}
new string[35];
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid, pX, pY, pZ);
TotenKopf[playerid] = CreatePickup(1254,1, pX, pY, pZ);
SetTimerEx("tot", 90000, false, "d", playerid);
new Float:x, Float:y, Float:z, nome1[MAX_PLAYER_NAME];
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
GetPlayerName(playerid, nome1, sizeof(nome1));
format(string, sizeof(string), "%s", nome1);
DeathText[playerid] = Create3DTextLabel(string,0xFFFFFFAA, Float:x, Float:y, Float:z, 10.0, 0);
sSpieler[playerid][Deaths] ++;
sSpieler[killerid][Kills] ++;
PaintballKills[killerid]++;
if(sSpieler[killerid][Paintball] == 1)
{
SetPlayerWantedLevel(killerid,0);
}
if(sSpieler[playerid][Paintball] >= 1)
{
new nachricht[128];
format(nachricht,sizeof(nachricht),"Du hast einen Spieler getötet. Dein Paintballscore beträgt nun: %d",PaintballKills[killerid]);
SendClientMessage(killerid,GELB,nachricht);
return 1;
}
return 1;
}
Problem 2:
Nach dem Freikaufen beim Ordnungsamt habe ich 2 Fahrzeuge stehen anstatt nur eins ?
Ich habe mehrere Fotos gemacht.
if(strcmp(cmdtext,"/opark",true,10)==0)
{
if(IsPlayerConnected(playerid))
{
if(sSpieler[playerid][Leader] == 7 || sSpieler[playerid][Member] == 7)
{
for(new z = 0; z < MAX_PLAYERS;z++)
{
for(new i = 0; i < MAX_PLAYER_CARS;i++)
{
if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
SendClientMessage(playerid, GRAU, "An deinem Abschleppwagen ist kein Auto angehängt!");
return 1;
}
new vehicle = GetPlayerVehicleID(playerid);
new Float:xrate, Float:yrate, Float:zrate, Float:arate;
new Car[128];
format(Car,sizeof(Car),"/Auto/%s's Auto %d.txt",SpielerName(z),i);
{
GetVehiclePos(vehicle,xrate,yrate,zrate);
GetVehicleZAngle(vehicle, arate);
Auto[playerid][i][Park_x] = xrate;
Auto[playerid][i][Park_y] = yrate;
Auto[playerid][i][Park_z] = zrate;
Auto[playerid][i][Park_rot] = arate;
Auto[playerid][i][Abgeschleppt] = 1;
SendClientMessage(playerid, GRÜN, "Das Fahrzeug wurde erfolgreich auf dem Verwahrplatz geparkt !");
DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
sSpieler[playerid][Preamie] += 500;
SendClientMessage(playerid,GELB,"Du bekommst ein Bonus von 500$ am Payday pro Abgeschlepptes Fahrzeug!");
return 1;
}
}
}
}
else
{
SendClientMessage(playerid,GRAU,"Du bist kein Oamt Mitglied!");
}
}
return 1;
}
if(strcmp(cmdtext,"/freikaufen",true) == 0)
{
for(new z = 0; z<MAX_PLAYERS; z++)
{
for(new i = 0; i < MAX_PLAYER_CARS;i++)
{
if(IsPlayerConnected(playerid))
{
new string[128];
if(IsPlayerInRangeOfPoint(playerid,4.0,1459.0216,-1507.1311,13.5469))
{
if(Auto[playerid][i][Abgeschleppt] != 0)
{
if(GetPlayerMoney(playerid) < 4000)
{
SendClientMessage(playerid,ROT,"Du hast nich genug Geld dabei! (( 4.000$ ))");
return 1;
}
format(string,sizeof(string),"Du hast deinen %s für 4.000$ wieder frei gekauft. Hoffentlich kommt das nicht noch einmal vor.",Fahrzeugnamen[Auto[playerid][i][modelid] -400]);
SendClientMessage(playerid,HELLBLAU,string);
SendClientMessage(playerid,GELB,"[Mitarbeiter]: Achja Denk daran dein Privatfahrzeug neu zu parken!");
if(sSpieler[i][Leader] == 7 || sSpieler[i][Member] == 7)
{
format(string,sizeof(string),"%s hat sein Fahrzeug (%s) für 4.000$ freigekauft. Das Geld wurde in die Fraktionskasse überwiesen.",SpielerName(playerid),Fahrzeugnamen[Auto[playerid][i][modelid] -400]);
SendClientMessage(i,HELLBLAU,string);
}
GivePlayerMoneyEx(playerid, -4000);
OamtK += 4000;
OamtSpeichern();
Auto[playerid][i][Abgeschleppt] = 0;
Auto[playerid][i][Park_x] = 1440.2405;
Auto[playerid][i][Park_y] = -1494.6765;
Auto[playerid][i][Park_z] = 13.5469;
Auto[playerid][i][Park_rot] = 170.4242;
meinauto[playerid][i] = CreateVehicle(Auto[playerid][i][modelid],Auto[playerid][i][Park_x],Auto[playerid][i][Park_y],Auto[playerid][i][Park_z],Auto[playerid][i][Park_rot],Auto[playerid][i][Farbe1],Auto[playerid][i][Farbe2],-1);
return 1;
}
else
{
SendClientMessage(playerid,GRAU,"Es ist kein Fahrzeug gesperrt!");
}
}
else
{
SendClientMessage(playerid,GRAU,"Du bist nicht in der Nähe!");
}
}
}
}
return 1;
}
Danke für die Hilfe und Frohe Weihnachten wünsche ich allen!!