Fraktionen spawnen falsch?

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hey, also das Problem bei mir ist, dass manche Fraktion (ca. 5) bei der Fraktion mit der ID 6 spawnen. Also z.B. ich mach /makeleader ID 2 (2=FraktionsID) und anschließend noch /sethp ID 0 und dann spawn ich mit der Fraktion 2 immer da wo die Fraktion 6 auch spawnt. Die Koordinaten der jeweiligen Fraktionen unterscheiden sich natürlich. Die Fraktion 6 spawnt übrigens richtig.
    Das komische ist, wenn ich den Spawn der Fraktion 6 rausnehme, dann spawnen alle Fraktionen wieder richtig. Das Problem war noch nicht immer, sprich es hat schonmal alles wunderbar funktioniert.


    Hier nochmal der Code:
    if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//Spawn der Fraktion 6
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, -2121.7014,-256.1168,35.3203);
    GivePlayerWeapon(playerid, 8, 1);
    GivePlayerWeapon(playerid, 24, 250);
    GivePlayerWeapon(playerid, 29, 1000);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    Und:
    if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) //Spawn der Fraktion 2, die gleich wie Fraktion 6 spawnt
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid, 6);
    SetPlayerPos(playerid, 256.0672,66.5179,1003.6406);
    GivePlayerWeapon(playerid, 3, 1);
    GivePlayerWeapon(playerid, 41, 5000);
    PlayerInfo[playerid][pInt] = 0;
    }

  • Ok, sry dass ich solange nicht geantwortet habe:


    public SetPlayerSpawn(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pTut] == 0)
    {
    gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
    TogglePlayerControllable(playerid, 0);
    RegistrationStep[playerid] = 1;
    SendClientMessage(playerid, COLOR_YELLOW, "Willkommen auf unserem Godfather Server, bitte gib uns noch ein paar Infos um fortzufahren.");
    SendClientMessage(playerid, COLOR_LIGHTRED, "Bist du 'männlich' oder 'weiblich'?");
    }
    new rand;
    new house = PlayerInfo[playerid][pPhousekey];
    if(PlayerPaintballing[playerid] != 0)
    {
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 29, 999);
    rand = random(sizeof(PaintballSpawns));
    SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
    return 1;
    }
    if(PlayerInfo[playerid][pJailed] == 1)
    {
    SetPlayerInterior(playerid, 6);
    SetPlayerPos(playerid,264.6288,77.5742,1001.0391);
    SendClientMessage(playerid, COLOR_LIGHTRED, "Incomplete Jail Sentence, back to jail.");
    return 1;
    }
    if(PlayerInfo[playerid][pJailed] == 2)
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,268.5777,1857.9351,9.8133);
    SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
    return 1;
    }
    if(house !=255)
    {
    if(SpawnChange[playerid]) //If 1, then you get to your house, else spawn somewhere else
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid,HouseInfo[house][hInt]);
    SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
    PlayerInfo[playerid][pLocal] = house;
    PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
    return 0;
    }
    }
    if(PlayerInfo[playerid][pLeader] == 7)//Mayor spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid, 3);
    SetPlayerPos(playerid, 356.2998,151.9914,1025.7891);
    PlayerInfo[playerid][pInt] = 3;
    PlayerInfo[playerid][pLocal] = 241;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//Police Force spawn
    {
    SetPlayerToTeamColor(playerid);
    rand = random(sizeof(gCopPlayerSpawns));
    SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerInterior(playerid,0);
    GivePlayerWeapon(playerid, 3, 1);
    GivePlayerWeapon(playerid, 41, 5000);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//National Guard spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 217.1627,1822.9811,6.4141);
    GivePlayerWeapon(playerid, 3, 1);
    GivePlayerWeapon(playerid, 41, 5000);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//Fire/Ambulance spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, -2656.0393,635.0596,14.4531);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//LaCosaNostra spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid, 18);
    SetPlayerPos(playerid, 1727.3701,-1667.6963,22.4386);
    GivePlayerWeapon(playerid, 4, 1);
    GivePlayerWeapon(playerid, 24, 250);
    GivePlayerWeapon(playerid, 29, 1000);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//Yakuza spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid, 3);
    SetPlayerPos(playerid, -2653.3035,1391.1240,918.3582);
    GivePlayerWeapon(playerid, 8, 1);
    GivePlayerWeapon(playerid, 24, 250);
    GivePlayerWeapon(playerid, 29, 1000);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) //Hitman spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid, 1102.7017,-299.0774,73.9922);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //News spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid, -2050.8962,460.0262,35.1719);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) //Taxi Cab Company spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid, 1225.6559,-1644.4022,11.7969);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pLeader] == 2) //FBI Spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid, 6);
    SetPlayerPos(playerid, 256.0672,66.5179,1003.6406);
    GivePlayerWeapon(playerid, 3, 1);
    GivePlayerWeapon(playerid, 41, 5000);
    PlayerInfo[playerid][pInt] = 0;
    }
    if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12) //Grove Street Spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid, 3);
    SetPlayerPos(playerid, 2493.9543,-1710.2955,1014.7422);
    GivePlayerWeapon(playerid, 24, 250);
    GivePlayerWeapon(playerid, 29, 1000);
    PlayerInfo[playerid][pInt] = 0;
    }
    if(IsAnInstructor(playerid)) //Driving/Flying School spawn
    {
    if(SchoolSpawn[playerid] == 0)
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid, -2032.6810,-117.4816,1035.1719);
    SetPlayerFacingAngle(playerid, 275.1114);
    SetPlayerInterior(playerid,3);
    PlayerInfo[playerid][pInt] = 3;
    }
    else if(SchoolSpawn[playerid] == 1)
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid, 414.4144,2531.9580,19.1565);
    SetPlayerFacingAngle(playerid, 4.6505);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    }
    }
    if ((gTeam[playerid]) == 1)
    {
    SetPlayerToTeamColor(playerid);
    rand = random(sizeof(gMedPlayerSpawns));
    SetPlayerPos(playerid, gMedPlayerSpawns[rand][0], gMedPlayerSpawns[rand][1], gMedPlayerSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    if(PlayerInfo[playerid][pFMember] != 255)
    {
    new family = PlayerInfo[playerid][pFMember];
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid, FamilyInfo[family][FamilyInterior]);
    SetPlayerPos(playerid, FamilyInfo[family][FamilySpawn][0],FamilyInfo[family][FamilySpawn][1],FamilyInfo[family][FamilySpawn][2]);
    SetPlayerFacingAngle(playerid, FamilyInfo[family][FamilySpawn][3]);
    return 1;
    }
    }
    return 1;
    }



    Das meinst du, oder?


    Mfg