/invite mit Skinauswahl Problem

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 Leute,ich brauche dringend hilfe,ich hab keine ahnung wieso das nicht Funktionier....
    ich gebe /weiter ein aber es kommt nur 1 Skin...


    Code:


    COMMAND:weiter(playerid,params[]){ if(PlayerInfo[playerid][pInvited] == 1) { switch(isPlayerInFrakt(playerid,1)) { case 1: SetPlayerSkin(playerid,265); case 2: SetPlayerSkin(playerid,266); case 3: SetPlayerSkin(playerid,267); case 4: SetPlayerSkin(playerid,284); } switch(isPlayerInFrakt(playerid,2)) { case 1: SetPlayerSkin(playerid,280); case 2: SetPlayerSkin(playerid,281); case 3: SetPlayerSkin(playerid,282); case 4: SetPlayerSkin(playerid,284); } switch(isPlayerInFrakt(playerid,3)) { case 1: SetPlayerSkin(playerid,287); case 2: SetPlayerSkin(playerid,179); case 3: SetPlayerSkin(playerid,121); case 4: SetPlayerSkin(playerid,284); } } return 1;}



    Danke im Vorraus

  • Ok,ich will das wenn ich /weiter eingebe der nächste Skin kommt. verstanden ?


    Code:


    COMMAND:weiter(playerid,params[])
    {
    if(PlayerInfo[playerid][pInvited] == 1)
    {
    switch(isPlayerInFrakt(playerid,1))
    {
    case 1: SetPlayerSkin(playerid,265);
    case 2: SetPlayerSkin(playerid,266);
    case 3: SetPlayerSkin(playerid,267);
    case 4: SetPlayerSkin(playerid,284);
    }
    switch(isPlayerInFrakt(playerid,2))
    {
    case 1: SetPlayerSkin(playerid,280);
    case 2: SetPlayerSkin(playerid,281);
    case 3: SetPlayerSkin(playerid,282);
    case 4: SetPlayerSkin(playerid,284);
    }
    switch(isPlayerInFrakt(playerid,3))
    {
    case 1: SetPlayerSkin(playerid,287);
    case 2: SetPlayerSkin(playerid,179);
    case 3: SetPlayerSkin(playerid,121);
    case 4: SetPlayerSkin(playerid,284);
    }
    }
    return 1;
    }

  • Du kannst es so schreiben:
    COMMAND:weiter(playerid,params[])
    {
    SetPVarInt(playerid, "weiterStatus",GetPVarInt(playerid, "weiterStatus")+1);
    if(GetPVarInt(playerid, "weiterStatus") > 4 || GetPVarInt(playerid, "weiterStatus") < 1)
    {
    SetPVarInt(playerid, "weiterStatus", 1);
    }
    if(PlayerInfo[playerid][pInvited] == 1)
    {
    if(isPlayerInFrakt(playerid,1))
    {
    switch(GetPVarInt(playerid, "weiterStatus"))
    {
    case 1: SetPlayerSkin(playerid,265);
    case 2: SetPlayerSkin(playerid,266);
    case 3: SetPlayerSkin(playerid,267);
    case 4: SetPlayerSkin(playerid,284);
    }
    }
    if(isPlayerInFrakt(playerid,2))
    {
    switch(GetPVarInt(playerid, "weiterStatus"))
    {
    case 1: SetPlayerSkin(playerid,280);
    case 2: SetPlayerSkin(playerid,281);
    case 3: SetPlayerSkin(playerid,282);
    case 4: SetPlayerSkin(playerid,284);
    }
    }
    if(isPlayerInFrakt(playerid,3))
    {
    switch(GetPVarInt(playerid, "weiterStatus"))
    {
    case 1: SetPlayerSkin(playerid,287);
    case 2: SetPlayerSkin(playerid,179);
    case 3: SetPlayerSkin(playerid,121);
    case 4: SetPlayerSkin(playerid,284);
    }
    }
    }
    return 1;
    }