Skin System funktioniert nicht

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,


    mein Skin System funktioniert nicht ganz, wenn ich dann Shift drücke werde ich gespawnt.
    Hier mal Code:
    if(dialogid == DIALOG_GESCHLECHT)
    {
    if(response == 1) //Männlich
    {
    SendClientMessage(playerid,COLOR_ROT,"In Ordnung, du bist also Männlich.");
    SavePlayer(playerid);
    SpielerInfo[playerid][pGeschlecht] = 1;
    SendClientMessage(playerid, COLOR_WHITE, "Du kannst den Skin mit der {FF0000}Shift{FFFFFF} Taste wechseln.");
    SendClientMessage(playerid, COLOR_WHITE, "Mit der {FF0000}Enter{FFFFFF} Taste wählst du den Skin aus.");
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    SetPlayerPos(playerid, 437.3533,-1748.4609,9.1031);
    SetPlayerCameraPos(playerid, 438.6240,-1752.1791,8.8109);
    SetPlayerCameraLookAt(playerid, 437.3533,-1748.4609,9.1031);
    SetPlayerFacingAngle(playerid, 228.3101);
    TogglePlayerControllable(playerid,0);
    pPlayerRegisterChooseSkinMale[playerid] = 1;
    SetPlayerSkin(playerid, 2); // Mann Skin
    ShowPlayerDialog(playerid,DIALOG_ALTER,DIALOG_STYLE_INPUT,"{00AFFF}"#SERVERNAME" {FFFFFF}- Information","Wir brauchen nun noch eine letzte persönliche Information von dir.\nWir möchten gerne wissen wie alt du bist, Angaben in TT.MM.JJJJ.","Weiter","Abbrechen");
    }
    if(response == 0) //Weiblich
    {
    SendClientMessage(playerid,COLOR_ROT,"In Ordnung, du bist also Weiblich.");
    SavePlayer(playerid);
    SpielerInfo[playerid][pGeschlecht] = 2;
    SendClientMessage(playerid, COLOR_WHITE, "Du kannst den Skin mit der {FF0000}Shift{FFFFFF} Taste wechseln.");
    SendClientMessage(playerid, COLOR_WHITE, "Mit der {FF0000}Enter{FFFFFF} Taste wählst du den Skin aus.");
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    SetPlayerPos(playerid, 437.3533,-1748.4609,9.1031);
    SetPlayerCameraPos(playerid, 438.6240,-1752.1791,8.8109);
    SetPlayerCameraLookAt(playerid, 437.3533,-1748.4609,9.1031);
    SetPlayerFacingAngle(playerid, 228.3101);
    TogglePlayerControllable(playerid,0);


    pPlayerRegisterChooseSkinFemale[playerid] = 1;
    SetPlayerSkin(playerid, 12); // Frau Skin
    ShowPlayerDialog(playerid,DIALOG_ALTER,DIALOG_STYLE_INPUT,"{00AFFF}"#SERVERNAME" {FFFFFF}- Information","Wir brauchen nun noch eine letzte persönliche Information von dir.\nWir möchten gerne wissen wie alt du bist, Angaben in TT.MM.JJJJ.","Weiter","Abbrechen");
    }
    }


    if(newkeys == KEY_CROUCH)
    {
    if(pPlayerRegisterChooseSkinMale[playerid] == 1)
    {
    if(GetPlayerSkin(playerid) == 2)
    {
    SetPlayerSkin(playerid,7);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    SetPlayerPos(playerid, 437.3533,-1748.4609,9.1031);
    SetPlayerCameraPos(playerid, 438.6240,-1752.1791,8.8109);
    SetPlayerCameraLookAt(playerid, 437.3533,-1748.4609,9.1031);
    TogglePlayerControllable(playerid,0);
    SetPlayerFacingAngle(playerid, 228.3101);
    }
    else if(GetPlayerSkin(playerid) == 7)
    {
    SetPlayerSkin(playerid, 20);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    }
    else if(GetPlayerSkin(playerid) == 20)
    {
    SetPlayerSkin(playerid, 21);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    }
    else if(GetPlayerSkin(playerid) == 21)
    {
    SetPlayerSkin(playerid, 24);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    }
    else if(GetPlayerSkin(playerid) == 24)
    {
    SetPlayerSkin(playerid, 22);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    }
    else if(GetPlayerSkin(playerid) == 22)
    {
    SetPlayerSkin(playerid, 23);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    }
    else if(GetPlayerSkin(playerid) == 23)
    {
    SetPlayerSkin(playerid, 2);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    }
    }
    else if(pPlayerRegisterChooseSkinFemale[playerid] == 1)
    {
    if(GetPlayerSkin(playerid) == 12)
    {
    SetPlayerSkin(playerid, 40);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    }
    else if(GetPlayerSkin(playerid) == 40)
    {
    SetPlayerSkin(playerid, 41);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    }
    else if(GetPlayerSkin(playerid) == 41)
    {
    SetPlayerSkin(playerid, 55);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    }
    else if(GetPlayerSkin(playerid) == 55)
    {
    SetPlayerSkin(playerid, 56);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    }
    else if(GetPlayerSkin(playerid) == 56)
    {
    SetPlayerSkin(playerid, 226);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    }
    else if(GetPlayerSkin(playerid) == 226)
    {
    SetPlayerSkin(playerid, 12);
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    }
    }
    }


    if(pPlayerRegisterChooseSkinMale[playerid] == 1 || pPlayerRegisterChooseSkinFemale[playerid] == 1)
    {
    SpielerInfo[playerid][pSkin] = GetPlayerSkin(playerid);
    SetPlayerPos(playerid,1415.3909,-1626.0238,20.6056);
    SetPlayerCameraPos(playerid,1418.9369,-1629.8965,54.6056);
    SetPlayerCameraLookAt(playerid,1521.6505,-1706.4551,13.5469);
    pPlayerRegisterChooseSkinMale[playerid] = 0;
    pPlayerRegisterChooseSkinFemale[playerid] = 0;
    SpawnPlayer(playerid);
    SavePlayer(playerid);
    if(SpielerInfo[playerid][pTutorial] == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_TUTORIAL,DIALOG_STYLE_MSGBOX,"{00AFFF}"#SERVERNAME" {FFFFFF}- Tutorial","Nun bist du im Tutorial von "#SERVERNAME", lies dir diese Texte aufmerksam durch.\nDu wirst gleich hier auf diesen Server starten und im Tutorial deinen Führerschein kostenlos bekommen,\nsofern du nicht im Tutorial offline gehst.","Weiter","Abbrechen");
    }
    }


    //Edit: Code eingefügt


    Einmal editiert, zuletzt von SA:MP-Designs () aus folgendem Grund: //Edit: Code eingefügt

  • Ist:
    if(pPlayerRegisterChooseSkinMale[playerid] == 1 || pPlayerRegisterChooseSkinFemale[playerid] == 1)
    {
    SpielerInfo[playerid][pSkin] = GetPlayerSkin(playerid);
    SetPlayerPos(playerid,1415.3909,-1626.0238,20.6056);
    SetPlayerCameraPos(playerid,1418.9369,-1629.8965,54.6056);
    SetPlayerCameraLookAt(playerid,1521.6505,-1706.4551,13.5469);
    pPlayerRegisterChooseSkinMale[playerid] = 0;
    pPlayerRegisterChooseSkinFemale[playerid] = 0;
    SpawnPlayer(playerid);
    SavePlayer(playerid);
    if(SpielerInfo[playerid][pTutorial] == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_TUTORIAL,DIALOG_STYLE_MSGBOX,"{00AFFF}"#SERVERNAME" {FFFFFF}- Tutorial","Nun bist du im Tutorial von "#SERVERNAME", lies dir diese Texte aufmerksam durch.\nDu wirst gleich hier auf diesen Server starten und im Tutorial deinen Führerschein kostenlos bekommen,\nsofern du nicht im Tutorial offline gehst.","Weiter","Abbrechen");
    }
    }


    auch unter:
    KEY_CROUCH
    ??


    MfG