Eingänge nicht betretbar

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 die Eingänge sind nicht betretbar weiß einer wieso?


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate == KEY_SECONDARY_ATTACK)
    {
    //=============================== Puff Ein/Ausgang =================================
    if(IsPlayerInRangeOfPoint(playerid,4.0,776.5142,-1036.9474,24.2699)) // Puff Eingang
    {
    SetPlayerPos(playerid,1212.2443,-26.6800,1000.9531); // Puff Ausgang
    SetPlayerInterior(playerid,3);
    }
    else if(IsPlayerInRangeOfPoint(playerid,4.0,1212.2443,-26.6800,1000.9531)) // Puff Eingang
    {
    SetPlayerPos(playerid,776.5142,-1036.9474,24.2699); // Puff Ausgang
    SetPlayerInterior(playerid,0);
    }
    //=============================== Bank Ein/Ausgang =================================
    if(IsPlayerInRangeOfPoint(playerid,4.0,776.5142,-1036.9474,24.2699)) // Bank Eingang
    {
    SetPlayerPos(playerid,1212.2443,-26.6800,1000.9531); // Bank Ausgang
    SetPlayerInterior(playerid,0);
    }
    else if(IsPlayerInRangeOfPoint(playerid,4.0,1212.2443,-26.6800,1000.9531)) // Bank Ausgang
    {
    SetPlayerPos(playerid,776.5142,-1036.9474,24.2699); // Bank Eingang
    SetPlayerInterior(playerid,0);
    }
    //=============================== Bank Lift =================================
    if(IsPlayerInRangeOfPoint(playerid,4.0,2306.2502,-16.0974,26.7496)) // Bank Eingang
    {
    SetPlayerPos(playerid,1463.9889,-987.4373,57.5156); // Bank Ausgang
    SetPlayerInterior(playerid,0);
    }
    else if(IsPlayerInRangeOfPoint(playerid,4.0,1463.9889,-987.4373,57.5156)) // Bank Ausgang
    {
    SetPlayerPos(playerid,2306.2502,-16.0974,26.7496); // Bank Eingang
    SetPlayerInterior(playerid,0);
    }
    /////////////////////////////////////////////////////////////////////////////////
    }
    }


    Ich habs eerst grad gescriptet.

  • Es fehlt ganz unten ein return.


    Greetz 8)


    Bekomme die Meldungen:
    Script.pwn(160) : warning 217: loose indentation
    Script.pwn(162) : warning 209: function "OnPlayerStateChange" should return a



    /////////////////////////////////////////////////////////////////////////////////
    return 1;
    }
    }

  • public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate == KEY_SECONDARY_ATTACK)
    {
    //=============================== Puff Ein/Ausgang =================================
    if(IsPlayerInRangeOfPoint(playerid,4.0,776.5142,-1036.9474,24.2699)) // Puff Eingang
    {
    SetPlayerPos(playerid,1212.2443,-26.6800,1000.9531); // Puff Ausgang
    SetPlayerInterior(playerid,3);
    }
    else if(IsPlayerInRangeOfPoint(playerid,4.0,1212.2443,-26.6800,1000.9531)) // Puff Eingang
    {
    SetPlayerPos(playerid,776.5142,-1036.9474,24.2699); // Puff Ausgang
    SetPlayerInterior(playerid,0);
    }
    //=============================== Bank Ein/Ausgang =================================
    if(IsPlayerInRangeOfPoint(playerid,4.0,776.5142,-1036.9474,24.2699)) // Bank Eingang
    {
    SetPlayerPos(playerid,1212.2443,-26.6800,1000.9531); // Bank Ausgang
    SetPlayerInterior(playerid,0);
    }
    else if(IsPlayerInRangeOfPoint(playerid,4.0,1212.2443,-26.6800,1000.9531)) // Bank Ausgang
    {
    SetPlayerPos(playerid,776.5142,-1036.9474,24.2699); // Bank Eingang
    SetPlayerInterior(playerid,0);
    }
    //=============================== Bank Lift =================================
    if(IsPlayerInRangeOfPoint(playerid,4.0,2306.2502,-16.0974,26.7496)) // Bank Eingang
    {
    SetPlayerPos(playerid,1463.9889,-987.4373,57.5156); // Bank Ausgang
    SetPlayerInterior(playerid,0);
    }
    else if(IsPlayerInRangeOfPoint(playerid,4.0,1463.9889,-987.4373,57.5156)) // Bank Ausgang
    {
    SetPlayerPos(playerid,2306.2502,-16.0974,26.7496); // Bank Eingang
    SetPlayerInterior(playerid,0);
    }
    /////////////////////////////////////////////////////////////////////////////////
    }
    retun 1;
    }


    So 8)