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
  • Guten Tag Community,


    Ich habe ein das meiner Meinung nach unverständlich ist und zwar:


    Wenn man Army ist, und sich einloggt spawnt man ganz normal in der Army-Base.
    Aber wenn ich beispiel den Tod vortäuse mit /sethp [ID] 0
    Spawn man dort wo man auch nach dem tod spawnt auch (Noobspawn) genannt.


    Das verwunderliche daran ist aber wenn ich mich Grove Street (Leader) mache und /sethp [ID] 0 mache,
    Spawne ich wieder da wo ich nach login spawne


    Das Problem mit dem falschen spawnen ist nicht nur bei der Army sondern auch einigen weiter Fraktionen.


    Ich benutze folgenden Script: http://forum.sa-mp.com/index.php?topic=138237.0


    Ich weiß nicht welche Zeilen ich posten soll...
    Sagt mir einfach welche dann poste ich sie ;)

  • public OnPlayerSpawn(playerid)
    {
    InitLockDoors(playerid);
    STDPlayer[playerid] = 0;
    gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Set the Team
    if (gTeam[playerid] == 4) //medic / criminal reset team
    {
    gTeam[playerid] = 3;
    }
    if(gPlayerLogged[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_LIGHTRED, "** Du musst dich erst einloggen bevor du spawnst (Du wurdest gekickt) **");
    KickPlayer[playerid] = 1;
    }
    if(gTeam[playerid] == 11 && PlayerInfo[playerid][pLeader] < 1)
    {
    MedicBill[playerid] = 0;
    new rand = random(sizeof(CIV));
    SendClientMessage(playerid, COLOR_LIGHTRED, "You are not an Approved Leader, you are now a Civilian !");
    PlayerInfo[playerid][pTeam] = 3;
    gTeam[playerid] = 3;
    SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    PlayerInfo[playerid][pModel] = CIV[rand];
    SpawnPlayer(playerid);
    }
    if(gTeam[playerid] == 5)
    {
    if(PlayerInfo[playerid][pMember] < 1)
    {
    MedicBill[playerid] = 0;
    new rand = random(sizeof(CIV));
    SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist nun kein Fraktionsmember mehr! Du bist nun ein Zivi");
    PlayerInfo[playerid][pTeam] = 3;
    gTeam[playerid] = 3;
    SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    PlayerInfo[playerid][pModel] = CIV[rand];
    SpawnPlayer(playerid);
    }
    }
    if(gTeam[playerid] == 10)
    {
    if(PlayerInfo[playerid][pMember] != 8)
    {
    MedicBill[playerid] = 0;
    new rand = random(sizeof(CIV));
    SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist nun kein Fraktionsmember mehr! Du bist nun ein Zivi");
    PlayerInfo[playerid][pTeam] = 3;
    gTeam[playerid] = 3;
    SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    PlayerInfo[playerid][pModel] = CIV[rand];
    SpawnPlayer(playerid);
    }
    }
    if(gTeam[playerid] == 2 && PlayerInfo[playerid][pMember] > 3)
    {
    MedicBill[playerid] = 0;
    new rand = random(sizeof(CIV));
    SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist nun kein Fraktionsmember mehr! Du bist nun ein Zivi");
    PlayerInfo[playerid][pTeam] = 3;
    gTeam[playerid] = 3;
    SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    PlayerInfo[playerid][pModel] = CIV[rand];
    SpawnPlayer(playerid);
    }
    if(gTeam[playerid] == 3)
    {
    if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pLeader] > 0)
    {
    SendClientMessage(playerid, COLOR_LIGHTRED, "You are part of a Family/Force, you've been forced to the right Class + Char !");
    MedicBill[playerid] = 0;
    new model = PlayerInfo[playerid][pChar];
    if(PlayerInfo[playerid][pMember] == 1) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pMember] == 2) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pMember] == 3) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pMember] == 4) { SetSpawnInfo(playerid, 1, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pMember] == 5) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
    //else if(PlayerInfo[playerid][pMember] == 6) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pMember] == 7) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pMember] == 8) { SetSpawnInfo(playerid, 10, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10; gTeam[playerid] = 10; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pMember] == 9) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pMember] == 10) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
    //else if(PlayerInfo[playerid][pMember] == 11) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pMember] == 14) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pMember] == 15) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pMember] == 16) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pLeader] == 1) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pLeader] == 2) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pLeader] == 3) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pLeader] == 4) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pLeader] == 5) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    //else if(PlayerInfo[playerid][pLeader] == 6) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pLeader] == 7) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pLeader] == 8) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pLeader] == 9) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pLeader] == 10) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pLeader] == 11) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    //else if(PlayerInfo[playerid][pLeader] == 14) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    //else if(PlayerInfo[playerid][pLeader] == 15) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    else if(PlayerInfo[playerid][pLeader] == 16) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
    //SetSpawnInfo(playerid, team, model,0.0,0.0,0.0,0,0,0,0,0,0,0);
    SpawnPlayer(playerid);
    }
    }
    if(PlayerInfo[playerid][pChar] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]); }
    else { SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); }
    SetPlayerWeapons(playerid);
    SetPlayerSpawn(playerid);
    SetPlayerToTeamColor(playerid);
    PlayerFixRadio(playerid);
    for(new i = 0; i < sizeof(Turfs); i++)
    {
    GangZoneShowForPlayer(playerid, i, TurfInfo[i][zColor]);
    //GangZoneShowForPlayer(playerid, surenos, 0x4C5386AA);
    //GangZoneShowForPlayer(playerid, black_yakuza, 0x000000C2);
    //GangZoneShowForPlayer(playerid, nortenos, 0x9D000096);
    //GangZoneShowForPlayer(playerid, street_zone, 0x33AA33AA);
    //GangZoneShowForPlayer(playerid, jefferson_saints, 0xD900D3C8);
    return 1;
    }
    if(MapIconsShown[playerid] != 1)
    {
    MapIconsShown[playerid] = 1;
    for(new i = 0; i < sizeof(BizzInfo); i++)
    {
    SetPlayerMapIcon(playerid,i + 1,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ],36,COLOR_LIGHTRED);
    }
    for(new i = 0; i < sizeof(SBizzInfo); i++)
    {
    SetPlayerMapIcon(playerid,i + 20,SBizzInfo[i][sbEntranceX],SBizzInfo[i][sbEntranceY],SBizzInfo[i][sbEntranceZ],36,COLOR_LIGHTRED);
    }
    }
    return 1;
    }

  • public SetPlayerSpawn(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
    if(PlayerInfo[playerid][pTut] == 0)
    {
    TextDrawShowForPlayer(playerid,lbt);
    TextDrawShowForPlayer(playerid,lbb);
    gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
    SetPlayerInterior(playerid, 3);
    PlayerInfo[playerid][pInt] = 3;
    SetPlayerPos(playerid, 330.6825,163.6688,1014.1875);
    SetPlayerFacingAngle(playerid, 280);
    TogglePlayerControllable(playerid, 0);
    RegistrationStep[playerid] = 1;
    ClearChatbox(playerid, 10);
    SendClientMessage(playerid, COLOR_GREEN, "----------------------------------------------------------------");
    SendClientMessage(playerid, COLOR_GREY, "Willkommen! Du wirst nun eingebürgert.");
    SendClientMessage(playerid, COLOR_WHITE, "1. Bist du männlich oder weiblich? (Tippe ein was du bist).");
    SendClientMessage(playerid, COLOR_GREEN, "----------------------------------------------------------------");
    ClearChatbox(playerid, 2);
    return 1;
    }
    if(AdminSpec[playerid] == 1)
    {
    return 1;
    }
    new rand;
    new house = PlayerInfo[playerid][pPhousekey];
    if(PlayerPaintballing[playerid] != 0)
    {
    SafeResetPlayerWeapons(playerid);
    SafeGivePlayerWeapon(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);
    PlayerInfo[playerid][pInt] = 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);
    PlayerInfo[playerid][pInt] = 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(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0)
    {
    if(FirstSpawn[playerid] != 1)
    {
    //new string[256];
    new cut = deathcost;
    SafeGivePlayerMoney(playerid, -cut);
    MedicBill[playerid] = 0;
    MedicTime[playerid] = 0;
    NeedMedicTime[playerid] = 0;
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid,1612.3240,-2330.1670,14.5469);
    SetPlayerFacingAngle(playerid, 0);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    /*SetPlayerHealth(playerid, 50.0);
    PlayerInfo[playerid][pDeaths] += 1;
    SetPlayerInterior(playerid, 3);
    PlayerInfo[playerid][pInt] = 3;
    rand = random(sizeof(gMedicSpawns));
    SetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(playerid, 0);
    TogglePlayerControllable(playerid, 0);
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~You need to rest now ...", 30000, 3);
    JustDied[playerid] = 1;
    MedicTime[playerid] = 1;
    ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
    if(PlayerInfo[playerid][pDonateRank] > 0)
    {
    NeedMedicTime[playerid] = 30;
    }
    else
    {
    NeedMedicTime[playerid] = 40;
    }
    PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);*/
    return 1;
    }
    }
    if(PlayerInfo[playerid][pCrashed] == 1)
    {
    if(TutTime[playerid] == 0 && PlayerInfo[playerid][pTut] == 1 && RegistrationStep[playerid] == 0 && AfterTutorial[playerid] == 0 && FirstSpawn[playerid] == 1)
    {
    SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pVirWorld]);
    SetPlayerInterior(playerid,PlayerInfo[playerid][pInt]);
    SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
    //SendClientMessage(playerid, COLOR_WHITE, "Crashed, returning where you been.");
    //GameTextForPlayer(playerid, "~p~Crashed~n~~w~returning where you been", 5000, 1);
    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]);
    SetPlayerVirtualWorld(playerid,HouseInfo[house][hWorld]);
    SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
    PlayerInfo[playerid][pLocal] = house;
    HouseEntered[playerid] = house;
    PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
    return 1;
    }
    }
    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);
    SetPlayerInterior(playerid,6);
    rand = random(sizeof(gCopPlayerSpawns));
    SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(playerid, 270.0);
    PlayerInfo[playerid][pInt] = 6;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)//FBI spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid,3);
    SetPlayerPos(playerid, 299.7097,183.1322,1007.1719);
    SetPlayerFacingAngle(playerid, 90);
    PlayerInfo[playerid][pInt] = 3;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//National Guard spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 2779.7129,-2436.8120,13.6356);
    SetPlayerFacingAngle(playerid, 90.6142);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }


    Etwas zu lang rest poste ich ->

  • Hmm bei mir ist das so:


    if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//National Guard spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, -1346.2050,492.3983,11.2027);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }


    Ich weiß nicht ob deine Coords richtig sind für Army.

  • Am Anfang (Nach /login ) spawnt man ja richtig bloß nicht nach dem Sterben ^^