Nach login fällt man von Himmel, kein Unknow gamemode!

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
  • Wie meinst du?? ich poste einfach mal mein Setplayerspawn, OnPlayerSpawn, stock Login


    OnPlayerSpawn

    Spoiler anzeigen
    public OnPlayerSpawn(playerid)
    {
    AdminGod[playerid] = 0;
    StopAudioStreamForPlayer(playerid);
    if(!IsPlayerNPC(playerid)) return 0;
    if(IsPlayerNPC(playerid))
    {
    PlayerInfo[playerid][pBuerger] = 1;
    SpawnPlayer(playerid);
    }
    new playername[64];
    GetPlayerName(playerid,playername,64);
    SetPlayerColor(playerid,Weiss);
    if(PlayerInfo[playerid][pBuerger] == 0)
    {
    SetPlayerPos(playerid,-348.1526,-1046.7405,59.8125);
    SetPlayerSkin(playerid,212);
    Zivilist[playerid][pmi_Checkpoint]=0;
    Zivilist[playerid][pmi_bAktiv]=true;
    SetPlayerCheckpoint(playerid,Zivistadtweg[0][M_fX],Zivistadtweg[0][M_fY],Zivistadtweg[0][M_fZ],Zivistadtweg[0][M_fRad]);
    return 1;
    }
    else if(PlayerInfo[playerid][pBuerger] == 1||PlayerInfo[playerid][pMember] == 0||PlayerInfo[playerid][pLeader] == 0)
    {
    SetPlayerPos(playerid,1688.7246,-1343.7626,17.4297);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    return 1;
    }
    else if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pBuerger] == 2||PlayerInfo[playerid][pLeader] == 1)
    {
    SetPlayerPos(playerid, 219.2747,168.4384,1003.0234);
    SetPlayerFacingAngle(playerid, 1.6324);
    GivePlayerWeapon(playerid,24,300);
    GivePlayerWeapon(playerid,31,300);
    GivePlayerWeapon(playerid,29,300);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    SetPlayerInterior(playerid,3);
    }
    else if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pBuerger] == 3||PlayerInfo[playerid][pLeader] == 2)
    {
    SetPlayerPos(playerid, -91.2754,-130.7868,985.3281);
    SetPlayerFacingAngle(playerid,347.1850);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    }
    else if(PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pBuerger] == 4||PlayerInfo[playerid][pLeader] == 3)
    {
    SetPlayerPos(playerid, 1146.6512,-1316.8809,13.6355);
    GivePlayerWeapon(playerid,41,8000);
    GivePlayerWeapon(playerid,3,1);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    }
    else if(PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pBuerger] == 6||PlayerInfo[playerid][pLeader] == 5)
    {
    SetPlayerPos(playerid, 152.0654,-259.0960,1.9178);
    GivePlayerWeapon(playerid,41,8000);
    GivePlayerWeapon(playerid,3,1);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    }
    else if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pBuerger] == 7||PlayerInfo[playerid][pLeader] == 6)
    {
    SetPlayerPos(playerid, 1510.3889,-1469.4874,9.5000);
    GiveGangWeapons(playerid);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    }
    else if(PlayerInfo[playerid][pMember] == 7||PlayerInfo[playerid][pBuerger] == 8||PlayerInfo[playerid][pLeader] == 7)
    {
    SetPlayerPos(playerid, 1085.7412,-1233.0974,15.9387);
    GiveGangWeapons(playerid);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    }
    else if(PlayerInfo[playerid][pMember] == 8||PlayerInfo[playerid][pBuerger] == 9||PlayerInfo[playerid][pLeader] == 8)
    {
    SetPlayerPos(playerid, 1105.5029,-299.5828,74.5391);
    GiveGangWeapons(playerid);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    }
    if(PlayerInfo[playerid][pTot] == 1)
    {
    SendClientMessage(playerid, Grau, " ");
    SendClientMessage(playerid, Grau, " ");
    SendClientMessage(playerid, Grau, " ");
    SendClientMessage(playerid, Grau, " ");
    SendClientMessage(playerid, Grau, " ");
    SendClientMessage(playerid, Grau, " ");
    SendClientMessage(playerid, Grau, " ");
    SendClientMessage(playerid, Grau, " ");
    SendClientMessage(playerid, Grau, " ");
    SendClientMessage(playerid, Rot, "|________ Am Krankenhaus ________|");
    SendClientMessage(playerid, Rot, "Durch deine schweren Verletzungen liegst du im Koma!");
    SendClientMessage(playerid, Grau, "Sie sind für 2-3 Minuten im Krankenhaus! In 2-3 Minuten kommen Sie wieder raus, da Sie gearde behandelt werden!");
    ResetPlayerWeapons(playerid);
    SetPlayerPos(playerid,1162.871704, -1339.109619, 14.297291);
    SetPlayerCameraPos(playerid, 1223.379028, -1333.354126, 33.809105);
    SetPlayerCameraLookAt(playerid, 1178.824829, -1325.804077, 13.284119);
    TogglePlayerControllable(playerid, 0);
    SetPlayerInterior(playerid,0);
    return 1;
    }
    return 1;
    }

    SetPlayerSpawn
    Spoiler anzeigen
    forward SetPlayerSpawn(playerid);
    public SetPlayerSpawn(playerid)
    {
    if(IsPlayerConnected(playerid))
    {//Sollte schon da stehen fügt den code einfach danach ein
    if(PlayerInfo[playerid][pTot] == 1)
    {
    SendClientMessage(playerid, Rot, "Durch deine schweren Verletzungen liegst du im Koma");
    TogglePlayerControllable(playerid, 0);
    ResetPlayerWeapons(playerid);
    SetPlayerPos(playerid,1162.871704, -1339.109619, 14.297291);
    SetPlayerCameraPos(playerid, 1223.379028, -1333.354126, 33.809105);
    SetPlayerCameraLookAt(playerid, 1178.824829, -1325.804077, 13.284119);
    SetPlayerInterior(playerid, 0);
    return 1;
    }
    }
    SetPlayerColor(playerid,Weiss);
    //SpawnPlayer(playerid);
    if(PlayerInfo[playerid][pBuerger] == 0)
    {
    SetPlayerPos(playerid,-348.1526,-1046.7405,59.8125);
    SetPlayerSkin(playerid,212);
    Zivilist[playerid][pmi_Checkpoint]=0;
    Zivilist[playerid][pmi_bAktiv]=true;
    SetPlayerCheckpoint(playerid,Zivistadtweg[0][M_fX],Zivistadtweg[0][M_fY],Zivistadtweg[0][M_fZ],Zivistadtweg[0][M_fRad]);
    return 1;
    }
    else if(PlayerInfo[playerid][pBuerger] == 1||PlayerInfo[playerid][pMember] == 0||PlayerInfo[playerid][pLeader] == 0)
    {
    SetPlayerPos(playerid,1688.7246,-1343.7626,17.4297);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    return 1;
    }
    else if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pBuerger] == 2||PlayerInfo[playerid][pLeader] == 1)
    {
    SetPlayerPos(playerid, 219.2747,168.4384,1003.0234);
    SetPlayerFacingAngle(playerid, 1.6324);
    GivePlayerWeapon(playerid,24,300);
    GivePlayerWeapon(playerid,31,300);
    GivePlayerWeapon(playerid,29,300);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    SetPlayerInterior(playerid,3);
    }
    else if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pBuerger] == 3||PlayerInfo[playerid][pLeader] == 2)
    {
    SetPlayerPos(playerid, -91.2754,-130.7868,985.3281);
    SetPlayerFacingAngle(playerid,347.1850);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    }
    else if(PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pBuerger] == 4||PlayerInfo[playerid][pLeader] == 3)
    {
    SetPlayerPos(playerid, 1146.6512,-1316.8809,13.6355);
    GivePlayerWeapon(playerid,41,8000);
    GivePlayerWeapon(playerid,3,1);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    }
    else if(PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pBuerger] == 6||PlayerInfo[playerid][pLeader] == 5)
    {
    SetPlayerPos(playerid, 152.0654,-259.0960,1.9178);
    GivePlayerWeapon(playerid,41,8000);
    GivePlayerWeapon(playerid,3,1);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    }
    else if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pBuerger] == 7||PlayerInfo[playerid][pLeader] == 6)
    {
    SetPlayerPos(playerid, 1510.3889,-1469.4874,9.5000);
    GiveGangWeapons(playerid);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    }
    else if(PlayerInfo[playerid][pMember] == 7||PlayerInfo[playerid][pBuerger] == 8||PlayerInfo[playerid][pLeader] == 7)
    {
    SetPlayerPos(playerid, 1085.7412,-1233.0974,15.9387);
    GiveGangWeapons(playerid);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    }
    else if(PlayerInfo[playerid][pMember] == 8||PlayerInfo[playerid][pBuerger] == 9||PlayerInfo[playerid][pLeader] == 8)
    {
    SetPlayerPos(playerid, 1105.5029,-299.5828,74.5391);
    GiveGangWeapons(playerid);
    SetPlayerSkin(playerid,(PlayerInfo[playerid][pSkin]));
    }
    SpawnPlayer(playerid);
    return 1;
    }

    stock Login
    Spoiler anzeigen
    stock Login(playerid,key[])
    {
    new Spielerdatei[128];
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.ini",SpielerName(playerid));
    if(!strcmp(key,dini_Get(Spielerdatei,"Passwort"),false))
    {
    SpielerLaden(playerid);
    SendClientMessage(playerid,Grün,"Du hast dich erfolgreich eingeloggt");
    SetPlayerSpawn(playerid);
    SpawnPlayer(playerid);
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Du hast leider ein falsches Passwort angegeben!\nBitte versuche es erneut!","Login","Abbrechen");
    }
    return 1;
    }