Nach Login an dem Punkt Spawnen wo man sich ausgeloggt hat.

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
  • Hallo,


    ich habe das zwar schon mal eingebaut, allerdings will ich diese Funktion nun etwas erweitern.


    Meine Idee bzw. Problem besteht darin, dass ich es möchte, dass wenn ich in eine Fraktion komme und dort zum ersten mal gespawnt werde, dass ich dann auch an diesem Punkt spawne also z.b. in dem fraktionshaus. Danach möchte ich nur noch da spawnen, wo ich mich ausgeloggt habe.


    Was ich schon habe ist, dass der User, der nicht in einer Fraktion ist dort spawnt wo er sich ausloggt. Nun möchte ich das halt noch für die Gangmember machen.


    so sieht mein SetPlayerSpawn aus.


    Function SetPlayerSpawn(playerid)
    {
    SetSpawnKill(playerid);
    if(NachSpawn[playerid] == 0)
    {
    SetPlayerHealth(playerid, PlayerInfo[playerid][SHealth]);
    }
    else
    {
    SetPlayerHealth(playerid, 100);
    }
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pTot] == 1 && PlayerInfo[playerid][pLevel] > 2 && PlayerInfo[playerid][pJailed] == 0 && PlayerInfo[playerid][pwJailed] == 0 && PlayerInfo[playerid][pGangJailed] == 0 && PlayerPaintballing[playerid] == 0)
    {
    if(IsPlayerInFrac(playerid, 1))
    {
    //SetPlayerColor(playerid,NAMECOLOR_LSCOP);
    }
    else
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    ResetPlayerWeapons(playerid);
    SetPlayerWorldBounds(playerid,952.6550,805.9767,-1072.4991,-1131.2578);
    SetPlayerPos(playerid,815.3376,-1103.1689,25.7898);
    SetPlayerWeather(playerid, 20);
    SetPlayerSkin(playerid, 162);
    SetPlayerVirtualWorld(playerid, 1);
    SetPlayerInterior(playerid, 0);
    return 1;
    }
    /* if(IsPlayerNPC(playerid))
    {
    new botname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, botname, sizeof(botname));
    if(!strcmp(botname, "NeuerBot", true))
    {
    PlayerInfo[playerid][pCarLic] = 1;
    PlayerInfo[playerid][pChar] = 255;
    PlayerInfo[playerid][pJob] = 14;
    SetPlayerSkin(playerid, 255);
    PutPlayerInVehicle(playerid, car_BulletLS, 0);
    }
    }*/
    if(PlayerInfo[playerid][pTut] == 0 && !IsPlayerNPC(playerid))
    {
    gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
    FreezePlayer(playerid);
    AtRegestration[playerid] = 1;
    RegistrationStep[playerid] = 1;
    TextDrawHideForPlayer(playerid, Respekt[playerid]);
    TextDrawHideForPlayer(playerid, BeduerfnissBG);
    TextDrawHideForPlayer(playerid, SpawnKill);
    TextDrawHideForPlayer(playerid, Beduerfniss);
    //SendClientMessage(playerid, COLOR_YELLOW, " ");
    //SendClientMessage(playerid, COLOR_LIGHTRED, " Bist du Männlich oder Weiblich?");
    ShowPlayerDialog(playerid,DIALOG_REGSTEP_1,DIALOG_STYLE_MSGBOX,"Wähle dein Geschlecht aus. (4/5)","Gehörst du des Männlichen oder Weiblichen Geschlechts an?","Männlich","Weiblich");
    //----------------
    SetPlayerPos(playerid,1415.4806,-807.7550,85.0586);
    //SetPlayerFacingAngle(playerid, 4.0557);
    //SetPlayerVirtualWorld(playerid, 0);
    //SetPlayerInterior(playerid,0);
    //PlayerInfo[playerid][pInt] = 0;
    SetPlayerCameraPos(playerid, 1431.2906,-889.8334,54.3947);
    SetPlayerCameraLookAt(playerid,1415.4806,-807.7550,85.0586);
    //ShowPlayerDialog(playerid,DIALOG_REGSTEP_1,DIALOG_STYLE_MSGBOX,"Geschlecht","Bist du Männlich oder Weiblich?","Erstellen","Abbrechen");
    //ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login to your account",s,"Login","Cancel");


    // ShowMenuForPlayer(Geschlecht,playerid);
    }
    new rand;
    new house = PlayerInfo[playerid][pPhousekey];
    if(PlayerPaintballing[playerid] != 0)
    {
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 29, 999);
    GivePlayerWeapon(playerid, 24, 999);
    rand = random(sizeof(PaintballSpawns));
    SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
    return 1;
    }
    if(KnastTime[playerid] > 0)
    {
    SetPlayerToKnast(playerid,Knast[playerid]);
    SendClientMessage(playerid, COLOR_LIGHTRED, " Flüchten bringt nichts, zurück in die Zelle!");
    SetPlayerInterior(playerid,3);
    return 1;
    }
    if(PlayerInfo[playerid][pJailed] == 1)
    {
    SetPlayerInterior(playerid,3);
    SetPlayerPos(playerid,197.8290,161.8141,1003.0300);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid, 1);
    SendClientMessage(playerid, COLOR_LIGHTRED, "Flüchten bringt nichts, zurück in die Zelle!");
    return 1;
    }
    if(PlayerInfo[playerid][pJailed] == 2)
    {
    SendClientMessage(playerid, COLOR_LIGHTRED, "Du wurdest wieder ins Sicherheitsgefängnis gebracht!");
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid, 1);
    SetPlayerPos(playerid,1767.9164,-1543.2870,9.4696,38.3025);
    return 1;
    }
    if(PlayerInfo[playerid][pGangJailed] == 1)
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerPos(playerid, -368.4912,-1429.0795,25.7266);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid, 1);
    SendClientMessage(playerid, COLOR_LIGHTRED, " Du befindest dich noch im GangJail!");
    return 1;
    }
    if(PlayerInfo[playerid][pwJailed] == 1)
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerPos(playerid, -368.4912,-1429.0795,25.7266);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid, 1);
    SendClientMessage(playerid, COLOR_LIGHTRED, " Du befindest dich noch im Wheelmen Jail!");
    return 1;
    }
    if(house != 255)//SPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWN AREA! (Spawns)
    {
    if(SpawnChange[playerid]) //If 1, then you get to your house, else spawn somewhere else
    {
    //GivePlayerWeapons(playerid);
    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];
    SetPlayerVirtualWorld(playerid,house);
    return 1;
    }
    }
    if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)// LS Police spawn
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    rand = random(sizeof(gCopPlayerSpawns));
    SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(playerid,random(360));
    SetPlayerInterior(playerid,3);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 22 || PlayerInfo[playerid][pLeader] == 22)// LS Feuerwehr
    {
    SetPlayerToTeamColor(playerid);
    GivePlayerWeapons(playerid);
    rand = random(sizeof(gCopPlayerSpawns));
    SetPlayerPos(playerid,1821.2155,-1418.1858,20.5659); // fwspawn
    SetPlayerFacingAngle(playerid,random(360));
    SetPlayerInterior(playerid,0);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) //FBI
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid,6);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,219.7876,69.6195,1005.0391);
    SetPlayerFacingAngle(playerid,273.0);
    SetPlayerArmour(playerid, 100);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//SFPD spawn
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerInterior(playerid, 10);
    SetPlayerPos(playerid, 222.7215,111.2556,1010.2118);
    //PlayerInfo[playerid][pInt] = 10;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//Sanitäter spawn
    {
    SetPlayerToTeamColor(playerid);
    GivePlayerWeapons(playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,610.9885,-1513.0645,21.9559);
    SetPlayerFacingAngle(playerid,41.0527);
    SetPlayerArmour(playerid,100);
    //SetPlayerHealth(playerid,100);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//LaCosaNostra spawn
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerInterior(playerid, 5);
    SetPlayerVirtualWorld(playerid,1);
    //SetPlayerHealth(playerid,100);
    SetPlayerPos(playerid,1273.1633,-804.5030,1089.9321);
    SetPlayerFacingAngle(playerid,273.2191);
    GivePlayerWeapon(playerid,24,25);
    return 1;
    }
    if (PlayerInfo[playerid][pLeader] == 6)//Leader Yakuza
    {
    SetPlayerToTeamColor(playerid);// fraktions farbe
    //GivePlayerWeapons(playerid);// spawn waffen
    SetPlayerVirtualWorld(playerid,0);// virtuelle welt
    SetPlayerPos(playerid,1962.8567,973.3038,994.4688);//spawn koordinaten
    SetPlayerFacingAngle(playerid,42.8977);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerInterior(playerid,10);
    return 1;
    }
    if(PlayerInfo[playerid][pMember] == 6)//Member Yakuza
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerPos(playerid, 1962.8567,973.3038,994.4688);
    SetPlayerFacingAngle(playerid, 42.8977);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerInterior(playerid, 10);
    if(PlayerInfo[playerid][pRank] == 1 && PlayerInfo[playerid][pSex] == 1)
    {
    SetPlayerSkin(playerid, 122);
    }
    else if(PlayerInfo[playerid][pRank] == 2 && PlayerInfo[playerid][pSex] == 1)
    {
    SetPlayerSkin(playerid, 123);
    }
    else if(PlayerInfo[playerid][pRank] == 3 || PlayerInfo[playerid][pRank] == 4 && PlayerInfo[playerid][pSex] == 1)
    {
    SetPlayerSkin(playerid, 294);
    }
    else if(PlayerInfo[playerid][pRank] == 5 && PlayerInfo[playerid][pSex] == 1)
    {
    SetPlayerSkin(playerid, 186);
    }
    else if(PlayerInfo[playerid][pRank] >= 6 && PlayerInfo[playerid][pSex] == 1)
    {
    SetPlayerSkin(playerid, 228);
    }
    else if(PlayerInfo[playerid][pSex] == 2)
    {
    SetPlayerSkin(playerid, 169);
    }
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 7)//Präsident spawn
    {
    SetPlayerToTeamColor(playerid);
    GivePlayerWeapons(playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerArmour(playerid,100);
    SetPlayerPos(playerid,1290.6393,-791.4279,1089.9375);
    SetPlayerInterior(playerid, 5);
    SetPlayerVirtualWorld(playerid, 4);
    return 1;
    }
    if(PlayerInfo[playerid][pMember] == 7)//Bodyguard spawn
    {
    SetPlayerToTeamColor(playerid);
    GivePlayerWeapons(playerid);
    SetPlayerArmour(playerid,100);
    SetPlayerPos(playerid,1274.0594,-790.8364,1089.9316);
    SetPlayerInterior(playerid, 5);
    SetPlayerVirtualWorld(playerid, 4);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) //Hitman spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid, 2807.2910,-1166.6786,1025.5703);
    SetPlayerFacingAngle(playerid,272.1251);
    SetPlayerInterior(playerid,8);
    SetPlayerArmour(playerid,100);
    PlayerInfo[playerid][pInt] = 0;
    SetPlayerVirtualWorld(playerid,3);
    //GivePlayerWeapons(playerid);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //News Reporter spawn
    {
    SetPlayerToTeamColor(playerid);
    GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,1653.9125,-1657.5243,22.5156);
    SetPlayerFacingAngle(playerid, 179.7355);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) //Taxi spawn
    {
    SetPlayerToTeamColor(playerid);
    GivePlayerWeapons(playerid);
    SetPlayerPos(playerid, 317.7488,-1505.6178,24.9219);
    SetPlayerFacingAngle(playerid,57.0195);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12) //Triaden
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,-2642.3894,1398.7834,906.4666);
    SetPlayerFacingAngle(playerid,51.4238);
    SetPlayerInterior(playerid,3);
    GivePlayerWeapon(playerid,24,25);
    PlayerInfo[playerid][pInt] = 3;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13) //GROOVE STREET FAMILIY
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,2808.2705,-1169.3121,1025.5703);
    SetPlayerInterior(playerid,8);
    //SetPlayerHealth(playerid,100);
    GivePlayerWeapon(playerid,24,25);
    PlayerInfo[playerid][pInt] = 8;
    SetPlayerVirtualWorld(playerid,4);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14) //BALLAS GANG
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,2808.2705,-1169.3121,1025.5703);
    SetPlayerFacingAngle(playerid,281.6475);
    SetPlayerInterior(playerid,8);
    GivePlayerWeapon(playerid,24,25);
    PlayerInfo[playerid][pInt] = 8;
    SetPlayerVirtualWorld(playerid,6);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15) //Biker Club
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,505.9535,-72.6716,998.7578);
    SetPlayerFacingAngle(playerid,0.2045);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerInterior(playerid,11);
    PlayerInfo[playerid][pInt] = 11;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16) //Los Santos Vagos
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,2808.2705,-1169.3121,1025.5703);
    SetPlayerVirtualWorld(playerid,8);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerFacingAngle(playerid,88.9785);
    SetPlayerInterior(playerid,8);
    PlayerInfo[playerid][pInt] = 8;
    if(PlayerInfo[playerid][pRank] >= 0 && PlayerInfo[playerid][pRank] <= 2)
    {
    SetPlayerSkin(playerid, 110);
    }
    else if(PlayerInfo[playerid][pRank] >= 3 && PlayerInfo[playerid][pRank] <= 5)
    {
    SetPlayerSkin(playerid, 108);
    }
    else if(PlayerInfo[playerid][pLeader] == 16)
    {
    SetPlayerSkin(playerid, 109);
    }
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17) //Varios Los Aztecas
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,2808.2705,-1169.3121,1025.5703);
    SetPlayerFacingAngle(playerid,134.9023);
    SetPlayerInterior(playerid,8);
    GivePlayerWeapon(playerid,24,25);
    PlayerInfo[playerid][pInt] = 8;
    SetPlayerVirtualWorld(playerid,9);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18) //Los Santos Rifa
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,2178.2009,-2255.4534,14.7700);
    //SetPlayerHealth(playerid,100);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerFacingAngle(playerid,223.2888);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 19 || PlayerInfo[playerid][pLeader] == 19) //RS SPAWN
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,234.1262,1081.6293,1084.2415);
    SetPlayerFacingAngle(playerid,179.4645);
    SetPlayerInterior(playerid,6);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerVirtualWorld(playerid,5);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 20 || PlayerInfo[playerid][pLeader] == 20) //Terroristen
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid,2808.2705,-1169.3121,1025.5703);
    SetPlayerFacingAngle(playerid,179.9684);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerInterior(playerid,8);
    SetPlayerVirtualWorld(playerid,12);
    //GivePlayerWeapons(playerid);
    return 1;
    }
    if(IsPlayerInFrac(playerid, 21))
    {
    SetPlayerPos(playerid, 2562.6875,-1282.1237,1065.3672);
    SetPlayerInterior(playerid,2);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerVirtualWorld(playerid,0);
    //GivePlayerWeapons(playerid);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 23 || PlayerInfo[playerid][pLeader] == 23) //RM spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid,1728.3701,-1667.5378,22.6094);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerFacingAngle(playerid,39.2599);
    SetPlayerInterior(playerid,18);
    PlayerInfo[playerid][pInt] = 0;
    //GivePlayerWeapons(playerid);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 24 || PlayerInfo[playerid][pLeader] == 24) //Oamt spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid,1491.5264,1306.2687,1093.2964);
    SetPlayerInterior(playerid,3);
    PlayerInfo[playerid][pInt] = 3;
    GivePlayerWeapons(playerid);
    return 1;
    }
    if(IsAnInstructor(playerid)) //Fahrschule spawn
    {
    if(SchoolSpawn[playerid] == 0)
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid,-2026.5784,-101.3022,35.1641);
    SetPlayerFacingAngle(playerid,351.2108);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    SetPlayerHealth(playerid, 100);
    GivePlayerWeapons(playerid);
    }
    else if(SchoolSpawn[playerid] == 1)
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid,2145.5706,-1803.3696,16.1406);
    SetPlayerFacingAngle(playerid,4.7173);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    SetPlayerHealth(playerid, 100);
    GivePlayerWeapons(playerid);
    }
    return 1;
    }
    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;
    }
    else
    {
    SetPlayerToTeamColor(playerid);
    if(PlayerInfo[playerid][pOrigin] == 1 || PlayerInfo[playerid][pOrigin] == 2 || PlayerInfo[playerid][pOrigin] == 3)
    {
    if(PlayerInfo[playerid][pFirstSpawn] == 1)
    {
    SetPlayerPos(playerid,1108.0941,-1796.4219,16.5938);
    SetPlayerFacingAngle(playerid,88.4623);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pRollerLic] = 1;
    PlayerInfo[playerid][pPhoneBook] = 1;
    PlayerInfo[playerid][pInt] = 0;
    PlayerInfo[playerid][pFirstSpawn] = 0;
    PlayerPlaySound(playerid,3211056,0.0,0.0,0.0);
    PlayerPlayMusic(playerid);
    }
    else
    {
    SetPlayerPos(playerid, PlayerInfo[playerid][SpawnX], PlayerInfo[playerid][SpawnY], PlayerInfo[playerid][SpawnZ]);
    SetPlayerFacingAngle(playerid, PlayerInfo[playerid][SpawnR]);
    SetPlayerInterior(playerid, PlayerInfo[playerid][SInterior]);
    SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][SVirtualWorld]);
    PlayerPlaySound(playerid,3211056,0.0,0.0,0.0);
    PlayerPlayMusic(playerid);
    }
    }
    else
    {
    rand = random(sizeof(gRandomPlayerSpawns));
    SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(playerid, 180.0); //normal 270.0
    SetPlayerInterior(playerid,3); //normal 15
    PlayerInfo[playerid][pInt] = 3; //normal 15
    }
    return 1;
    }
    }
    return 1;
    }

  • Versuche es so:

    Spoiler anzeigen
    Function SetPlayerSpawn(playerid)
    {
    SetSpawnKill(playerid);
    if(NachSpawn[playerid] == 0)
    {
    SetPlayerHealth(playerid, PlayerInfo[playerid][SHealth]);
    }
    else
    {
    SetPlayerHealth(playerid, 100);
    }
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pTot] == 1 && PlayerInfo[playerid][pLevel] > 2 && PlayerInfo[playerid][pJailed] == 0 && PlayerInfo[playerid][pwJailed] == 0 && PlayerInfo[playerid][pGangJailed] == 0 && PlayerPaintballing[playerid] == 0)
    {
    if(IsPlayerInFrac(playerid, 1))
    {
    //SetPlayerColor(playerid,NAMECOLOR_LSCOP);
    }
    else
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    ResetPlayerWeapons(playerid);
    SetPlayerWorldBounds(playerid,952.6550,805.9767,-1072.4991,-1131.2578);
    SetPlayerPos(playerid,815.3376,-1103.1689,25.7898);
    SetPlayerWeather(playerid, 20);
    SetPlayerSkin(playerid, 162);
    SetPlayerVirtualWorld(playerid, 1);
    SetPlayerInterior(playerid, 0);
    return 1;
    }
    /*if(IsPlayerNPC(playerid))
    {
    new botname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, botname, sizeof(botname));
    if(!strcmp(botname, "NeuerBot", true))
    {
    PlayerInfo[playerid][pCarLic] = 1;
    PlayerInfo[playerid][pChar] = 255;
    PlayerInfo[playerid][pJob] = 14;
    SetPlayerSkin(playerid, 255);
    PutPlayerInVehicle(playerid, car_BulletLS, 0);
    }
    }*/
    if(PlayerInfo[playerid][pTut] == 0 && !IsPlayerNPC(playerid))
    {
    gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
    FreezePlayer(playerid);
    AtRegestration[playerid] = 1;
    RegistrationStep[playerid] = 1;
    TextDrawHideForPlayer(playerid, Respekt[playerid]);
    TextDrawHideForPlayer(playerid, BeduerfnissBG);
    TextDrawHideForPlayer(playerid, SpawnKill);
    TextDrawHideForPlayer(playerid, Beduerfniss);
    //SendClientMessage(playerid, COLOR_YELLOW, " ");
    //SendClientMessage(playerid, COLOR_LIGHTRED, " Bist du Männlich oder Weiblich?");
    ShowPlayerDialog(playerid,DIALOG_REGSTEP_1,DIALOG_STYLE_MSGBOX,"Wähle dein Geschlecht aus. (4/5)","Gehörst du des Männlichen oder Weiblichen Geschlechts an?","Männlich","Weiblich");
    //----------------
    SetPlayerPos(playerid,1415.4806,-807.7550,85.0586);
    //SetPlayerFacingAngle(playerid, 4.0557);
    //SetPlayerVirtualWorld(playerid, 0);
    //SetPlayerInterior(playerid,0);
    //PlayerInfo[playerid][pInt] = 0;
    SetPlayerCameraPos(playerid, 1431.2906,-889.8334,54.3947);
    SetPlayerCameraLookAt(playerid,1415.4806,-807.7550,85.0586);
    //ShowPlayerDialog(playerid,DIALOG_REGSTEP_1,DIALOG_STYLE_MSGBOX,"Geschlecht","Bist du Männlich oder Weiblich?","Erstellen","Abbrechen");
    //ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login to your account",s,"Login","Cancel");

    //ShowMenuForPlayer(Geschlecht,playerid);
    }
    new rand;
    new house = PlayerInfo[playerid][pPhousekey];
    if(PlayerPaintballing[playerid] != 0)
    {
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 29, 999);
    GivePlayerWeapon(playerid, 24, 999);
    rand = random(sizeof(PaintballSpawns));
    SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
    return 1;
    }
    if(KnastTime[playerid] > 0)
    {
    SetPlayerToKnast(playerid,Knast[playerid]);
    SendClientMessage(playerid, COLOR_LIGHTRED, " Flüchten bringt nichts, zurück in die Zelle!");
    SetPlayerInterior(playerid,3);
    return 1;
    }
    if(PlayerInfo[playerid][pJailed] == 1)
    {
    SetPlayerInterior(playerid,3);
    SetPlayerPos(playerid,197.8290,161.8141,1003.0300);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid, 1);
    SendClientMessage(playerid, COLOR_LIGHTRED, "Flüchten bringt nichts, zurück in die Zelle!");
    return 1;
    }
    if(PlayerInfo[playerid][pJailed] == 2)
    {
    SendClientMessage(playerid, COLOR_LIGHTRED, "Du wurdest wieder ins Sicherheitsgefängnis gebracht!");
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid, 1);
    SetPlayerPos(playerid,1767.9164,-1543.2870,9.4696,38.3025);
    return 1;
    }
    if(PlayerInfo[playerid][pGangJailed] == 1)
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerPos(playerid, -368.4912,-1429.0795,25.7266);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid, 1);
    SendClientMessage(playerid, COLOR_LIGHTRED, " Du befindest dich noch im GangJail!");
    return 1;
    }
    if(PlayerInfo[playerid][pwJailed] == 1)
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerPos(playerid, -368.4912,-1429.0795,25.7266);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid, 1);
    SendClientMessage(playerid, COLOR_LIGHTRED, " Du befindest dich noch im Wheelmen Jail!");
    return 1;
    }
    if(house != 255)//SPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWN AREA! (Spawns)
    {
    if(SpawnChange[playerid]) //If 1, then you get to your house, else spawn somewhere else
    {
    //GivePlayerWeapons(playerid);
    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];
    SetPlayerVirtualWorld(playerid,house);
    return 1;
    }
    }
    if(PlayerInfo[playerid][SpawnX] == 0.0 && PlayerInfo[playerid][SpawnY] == 0.0 && PlayerInfo[playerid][SpawnZ] == 0.0)
    {
    if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)// LS Police spawn
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    rand = random(sizeof(gCopPlayerSpawns));
    SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(playerid,random(360));
    SetPlayerInterior(playerid,3);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 22 || PlayerInfo[playerid][pLeader] == 22)// LS Feuerwehr
    {
    SetPlayerToTeamColor(playerid);
    GivePlayerWeapons(playerid);
    rand = random(sizeof(gCopPlayerSpawns));
    SetPlayerPos(playerid,1821.2155,-1418.1858,20.5659); // fwspawn
    SetPlayerFacingAngle(playerid,random(360));
    SetPlayerInterior(playerid,0);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) //FBI
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerInterior(playerid,6);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,219.7876,69.6195,1005.0391);
    SetPlayerFacingAngle(playerid,273.0);
    SetPlayerArmour(playerid, 100);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//SFPD spawn
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerInterior(playerid, 10);
    SetPlayerPos(playerid, 222.7215,111.2556,1010.2118);
    //PlayerInfo[playerid][pInt] = 10;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//Sanitäter spawn
    {
    SetPlayerToTeamColor(playerid);
    GivePlayerWeapons(playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,610.9885,-1513.0645,21.9559);
    SetPlayerFacingAngle(playerid,41.0527);
    SetPlayerArmour(playerid,100);
    //SetPlayerHealth(playerid,100);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//LaCosaNostra spawn
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerInterior(playerid, 5);
    SetPlayerVirtualWorld(playerid,1);
    //SetPlayerHealth(playerid,100);
    SetPlayerPos(playerid,1273.1633,-804.5030,1089.9321);
    SetPlayerFacingAngle(playerid,273.2191);
    GivePlayerWeapon(playerid,24,25);
    return 1;
    }
    if (PlayerInfo[playerid][pLeader] == 6)//Leader Yakuza
    {
    SetPlayerToTeamColor(playerid);// fraktions farbe
    //GivePlayerWeapons(playerid);// spawn waffen
    SetPlayerVirtualWorld(playerid,0);// virtuelle welt
    SetPlayerPos(playerid,1962.8567,973.3038,994.4688);//spawn koordinaten
    SetPlayerFacingAngle(playerid,42.8977);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerInterior(playerid,10);
    return 1;
    }
    if(PlayerInfo[playerid][pMember] == 6)//Member Yakuza
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerPos(playerid, 1962.8567,973.3038,994.4688);
    SetPlayerFacingAngle(playerid, 42.8977);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerInterior(playerid, 10);
    if(PlayerInfo[playerid][pRank] == 1 && PlayerInfo[playerid][pSex] == 1)
    {
    SetPlayerSkin(playerid, 122);
    }
    else if(PlayerInfo[playerid][pRank] == 2 && PlayerInfo[playerid][pSex] == 1)
    {
    SetPlayerSkin(playerid, 123);
    }
    else if(PlayerInfo[playerid][pRank] == 3 || PlayerInfo[playerid][pRank] == 4 && PlayerInfo[playerid][pSex] == 1)
    {
    SetPlayerSkin(playerid, 294);
    }
    else if(PlayerInfo[playerid][pRank] == 5 && PlayerInfo[playerid][pSex] == 1)
    {
    SetPlayerSkin(playerid, 186);
    }
    else if(PlayerInfo[playerid][pRank] >= 6 && PlayerInfo[playerid][pSex] == 1)
    {
    SetPlayerSkin(playerid, 228);
    }
    else if(PlayerInfo[playerid][pSex] == 2)
    {
    SetPlayerSkin(playerid, 169);
    }
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 7)//Präsident spawn
    {
    SetPlayerToTeamColor(playerid);
    GivePlayerWeapons(playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerArmour(playerid,100);
    SetPlayerPos(playerid,1290.6393,-791.4279,1089.9375);
    SetPlayerInterior(playerid, 5);
    SetPlayerVirtualWorld(playerid, 4);
    return 1;
    }
    if(PlayerInfo[playerid][pMember] == 7)//Bodyguard spawn
    {
    SetPlayerToTeamColor(playerid);
    GivePlayerWeapons(playerid);
    SetPlayerArmour(playerid,100);
    SetPlayerPos(playerid,1274.0594,-790.8364,1089.9316);
    SetPlayerInterior(playerid, 5);
    SetPlayerVirtualWorld(playerid, 4);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) //Hitman spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid, 2807.2910,-1166.6786,1025.5703);
    SetPlayerFacingAngle(playerid,272.1251);
    SetPlayerInterior(playerid,8);
    SetPlayerArmour(playerid,100);
    PlayerInfo[playerid][pInt] = 0;
    SetPlayerVirtualWorld(playerid,3);
    //GivePlayerWeapons(playerid);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //News Reporter spawn
    {
    SetPlayerToTeamColor(playerid);
    GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,1653.9125,-1657.5243,22.5156);
    SetPlayerFacingAngle(playerid, 179.7355);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) //Taxi spawn
    {
    SetPlayerToTeamColor(playerid);
    GivePlayerWeapons(playerid);
    SetPlayerPos(playerid, 317.7488,-1505.6178,24.9219);
    SetPlayerFacingAngle(playerid,57.0195);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12) //Triaden
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,-2642.3894,1398.7834,906.4666);
    SetPlayerFacingAngle(playerid,51.4238);
    SetPlayerInterior(playerid,3);
    GivePlayerWeapon(playerid,24,25);
    PlayerInfo[playerid][pInt] = 3;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13) //GROOVE STREET FAMILIY
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,2808.2705,-1169.3121,1025.5703);
    SetPlayerInterior(playerid,8);
    //SetPlayerHealth(playerid,100);
    GivePlayerWeapon(playerid,24,25);
    PlayerInfo[playerid][pInt] = 8;
    SetPlayerVirtualWorld(playerid,4);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14) //BALLAS GANG
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,2808.2705,-1169.3121,1025.5703);
    SetPlayerFacingAngle(playerid,281.6475);
    SetPlayerInterior(playerid,8);
    GivePlayerWeapon(playerid,24,25);
    PlayerInfo[playerid][pInt] = 8;
    SetPlayerVirtualWorld(playerid,6);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15) //Biker Club
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,505.9535,-72.6716,998.7578);
    SetPlayerFacingAngle(playerid,0.2045);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerInterior(playerid,11);
    PlayerInfo[playerid][pInt] = 11;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16) //Los Santos Vagos
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,2808.2705,-1169.3121,1025.5703);
    SetPlayerVirtualWorld(playerid,8);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerFacingAngle(playerid,88.9785);
    SetPlayerInterior(playerid,8);
    PlayerInfo[playerid][pInt] = 8;
    if(PlayerInfo[playerid][pRank] >= 0 && PlayerInfo[playerid][pRank] <= 2)
    {
    SetPlayerSkin(playerid, 110);
    }
    else if(PlayerInfo[playerid][pRank] >= 3 && PlayerInfo[playerid][pRank] <= 5)
    {
    SetPlayerSkin(playerid, 108);
    }
    else if(PlayerInfo[playerid][pLeader] == 16)
    {
    SetPlayerSkin(playerid, 109);
    }
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17) //Varios Los Aztecas
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,2808.2705,-1169.3121,1025.5703);
    SetPlayerFacingAngle(playerid,134.9023);
    SetPlayerInterior(playerid,8);
    GivePlayerWeapon(playerid,24,25);
    PlayerInfo[playerid][pInt] = 8;
    SetPlayerVirtualWorld(playerid,9);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18) //Los Santos Rifa
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,2178.2009,-2255.4534,14.7700);
    //SetPlayerHealth(playerid,100);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerFacingAngle(playerid,223.2888);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 19 || PlayerInfo[playerid][pLeader] == 19) //RS SPAWN
    {
    SetPlayerToTeamColor(playerid);
    //GivePlayerWeapons(playerid);
    SetPlayerPos(playerid,234.1262,1081.6293,1084.2415);
    SetPlayerFacingAngle(playerid,179.4645);
    SetPlayerInterior(playerid,6);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerVirtualWorld(playerid,5);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 20 || PlayerInfo[playerid][pLeader] == 20) //Terroristen
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid,2808.2705,-1169.3121,1025.5703);
    SetPlayerFacingAngle(playerid,179.9684);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerInterior(playerid,8);
    SetPlayerVirtualWorld(playerid,12);
    //GivePlayerWeapons(playerid);
    return 1;
    }
    if(IsPlayerInFrac(playerid, 21))
    {
    SetPlayerPos(playerid, 2562.6875,-1282.1237,1065.3672);
    SetPlayerInterior(playerid,2);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerVirtualWorld(playerid,0);
    //GivePlayerWeapons(playerid);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 23 || PlayerInfo[playerid][pLeader] == 23) //RM spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid,1728.3701,-1667.5378,22.6094);
    GivePlayerWeapon(playerid,24,25);
    SetPlayerFacingAngle(playerid,39.2599);
    SetPlayerInterior(playerid,18);
    PlayerInfo[playerid][pInt] = 0;
    //GivePlayerWeapons(playerid);
    return 1;
    }
    if (PlayerInfo[playerid][pMember] == 24 || PlayerInfo[playerid][pLeader] == 24) //Oamt spawn
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid,1491.5264,1306.2687,1093.2964);
    SetPlayerInterior(playerid,3);
    PlayerInfo[playerid][pInt] = 3;
    GivePlayerWeapons(playerid);
    return 1;
    }
    if(IsAnInstructor(playerid)) //Fahrschule spawn
    {
    if(SchoolSpawn[playerid] == 0)
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid,-2026.5784,-101.3022,35.1641);
    SetPlayerFacingAngle(playerid,351.2108);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    SetPlayerHealth(playerid, 100);
    GivePlayerWeapons(playerid);
    }
    else if(SchoolSpawn[playerid] == 1)
    {
    SetPlayerToTeamColor(playerid);
    SetPlayerPos(playerid,2145.5706,-1803.3696,16.1406);
    SetPlayerFacingAngle(playerid,4.7173);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    SetPlayerHealth(playerid, 100);
    GivePlayerWeapons(playerid);
    }
    return 1;
    }
    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;
    }
    }
    SetPlayerToTeamColor(playerid);
    if(PlayerInfo[playerid][pOrigin] == 1 || PlayerInfo[playerid][pOrigin] == 2 || PlayerInfo[playerid][pOrigin] == 3)
    {
    if(PlayerInfo[playerid][pFirstSpawn] == 1)
    {
    SetPlayerPos(playerid,1108.0941,-1796.4219,16.5938);
    SetPlayerFacingAngle(playerid,88.4623);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pRollerLic] = 1;
    PlayerInfo[playerid][pPhoneBook] = 1;
    PlayerInfo[playerid][pInt] = 0;
    PlayerInfo[playerid][pFirstSpawn] = 0;
    PlayerPlaySound(playerid,3211056,0.0,0.0,0.0);
    PlayerPlayMusic(playerid);
    }
    else
    {
    SetPlayerPos(playerid, PlayerInfo[playerid][SpawnX], PlayerInfo[playerid][SpawnY], PlayerInfo[playerid][SpawnZ]);
    SetPlayerFacingAngle(playerid, PlayerInfo[playerid][SpawnR]);
    SetPlayerInterior(playerid, PlayerInfo[playerid][SInterior]);
    SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][SVirtualWorld]);
    PlayerPlaySound(playerid,3211056,0.0,0.0,0.0);
    PlayerPlayMusic(playerid);
    }
    }
    else if(PlayerInfo[playerid][SpawnX] == 0.0 && PlayerInfo[playerid][SpawnY] == 0.0 && PlayerInfo[playerid][SpawnZ] == 0.0)
    {
    rand = random(sizeof(gRandomPlayerSpawns));
    SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(playerid, 180.0); //normal 270.0
    SetPlayerInterior(playerid,3); //normal 15
    PlayerInfo[playerid][pInt] = 3; //normal 15
    }
    else
    {
    SetPlayerPos(playerid, PlayerInfo[playerid][SpawnX], PlayerInfo[playerid][SpawnY], PlayerInfo[playerid][SpawnZ]);
    SetPlayerFacingAngle(playerid, PlayerInfo[playerid][SpawnR]);
    SetPlayerInterior(playerid, PlayerInfo[playerid][SInterior]);
    SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][SVirtualWorld]);
    PlayerPlaySound(playerid,3211056,0.0,0.0,0.0);
    PlayerPlayMusic(playerid);
    }
    }
    return 1;
    }


  • Danke für deine Hilfe :) nun Spawne ich in jeder Fraktion da, wo ich mich ausgeloggt habe.


    Allerdings ist es nun so, wenn ich die fraktionen wechsle spawne ich am noobspawn und nicht in deren base..

  • PlayerInfo[playerid][SpawnX] = 0.0;
    PlayerInfo[playerid][SpawnY] = 0.0;
    PlayerInfo[playerid][SpawnZ] = 0.0;


    oder:
    PlayerInfo[playerid][SpawnX] = PlayerInfo[playerid][SpawnY] = PlayerInfo[playerid][SpawnZ] = 0.0;


    Wie's dir lieber ist.


    Wo muss ich das einsetzen? da wo nun das steht?


    else if(PlayerInfo[playerid][SpawnX] == 0.0 && PlayerInfo[playerid][SpawnY] == 0.0 && PlayerInfo[playerid][SpawnZ] == 0.0)
    {
    rand = random(sizeof(gRandomPlayerSpawns));
    SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(playerid, 180.0); //normal 270.0
    SetPlayerInterior(playerid,3); //normal 15
    PlayerInfo[playerid][pInt] = 3; //normal 15
    }
    else
    {
    SetPlayerPos(playerid, PlayerInfo[playerid][SpawnX], PlayerInfo[playerid][SpawnY], PlayerInfo[playerid][SpawnZ]);
    SetPlayerFacingAngle(playerid, PlayerInfo[playerid][SpawnR]);
    SetPlayerInterior(playerid, PlayerInfo[playerid][SInterior]);
    SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][SVirtualWorld]);
    PlayerPlaySound(playerid,3211056,0.0,0.0,0.0);
    PlayerPlayMusic(playerid);
    }