Enter und Exit System

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
  • erst die welt abfragen dann rangeofpoint


    Grund dafür:
    Du fragst als erstes ab ob er am Ausgang ist, dann die Welt. Er ist bei der ersten Welt schon wahr weshalb er rein springt.
    Dadurch kommen die anderen if abfragen des standortes nicht mehr.


    Deshalb musst du erst abfragen ob er in der virtuellen Welt 1 ist und dann den Standort das musst du dann bei allen ändern.


    Mfg

  • @Daniel_Waynee


    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(921) : error 024: "break" or "continue" is out of context
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(931) : error 024: "break" or "continue" is out of context
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(941) : error 024: "break" or "continue" is out of context
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    3 Errors.

  • sofort



    [list=1][*]ocmd:exit(playerid,params[])
    [*]{
    [*]if(GetPlayerVirtualWorld(playerid) == 1)
    [*]{
    [*]if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    [*] {
    [*] SetPlayerInterior(playerid, 0);
    [*] SetPlayerPos(playerid,1085.0936,-1226.3617,15.8203);
    [*] SetPlayerVirtualWorld(playerid,0);
    [*] SetCameraBehindPlayer(playerid);
    [*] SetPlayerFacingAngle(playerid,90);
    [*] SendClientMessage(playerid,ROT,"Du hast die Ballas Base verlassen!");
    [*] }
    [*]}
    [*]if(GetPlayerVirtualWorld(playerid) == 2)
    [*]{
    [*]else if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    [*] {
    [*] SetPlayerInterior(playerid, 0);
    [*] SetPlayerVirtualWorld(playerid,0);
    [*] SetPlayerPos(playerid,143.6633,-1802.3103,16.1406);
    [*] SetCameraBehindPlayer(playerid);
    [*] SetPlayerFacingAngle(playerid,90);
    [*] SendClientMessage(playerid,ROT,"Du hast die Hitman Base verlassen!");
    [*] }
    [*]}
    [*]if(GetPlayerVirtualWorld(playerid) == 2)
    [*]{
    [*]else if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    [*]{
    [*] SetPlayerInterior(playerid, 0);
    [*] SetPlayerVirtualWorld(playerid,0);
    [*] SetPlayerPos(playerid,2495.4055,-1687.8857,13.5166);
    [*] SetCameraBehindPlayer(playerid);
    [*] SetPlayerFacingAngle(playerid,90);
    [*] SendClientMessage(playerid,ROT,"Du hast die Groove Street Base verlassen!");
    [*] }
    [*]}
    [*]return 1;
    [*]}
    [/list]

  • @PermanenT


    C:\Users\Dusti\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(935) : error 029: invalid expression, assumed zero
    C:\Users\Dusti\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(935) : warning 215: expression has no effect
    C:\Users\Dusti\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(935) : error 001: expected token: ";", but found "if"
    C:\Users\Dusti\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(947) : error 029: invalid expression, assumed zero
    C:\Users\Dusti\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(947) : warning 215: expression has no effect
    C:\Users\Dusti\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(947) : error 001: expected token: ";", but found "if"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.


    Kommt diesmal

  • welche zeile?



    [list=1][*]ocmd:exit(playerid,params[])
    [*][*]{
    [*][*]if(GetPlayerVirtualWorld(playerid) == 1)
    [*][*]{
    [*][*]if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    [*][*] {
    [*][*] SetPlayerInterior(playerid, 0);
    [*][*] SetPlayerPos(playerid,1085.0936,-1226.3617,15.8203);
    [*][*] SetPlayerVirtualWorld(playerid,0);
    [*][*] SetCameraBehindPlayer(playerid);
    [*][*] SetPlayerFacingAngle(playerid,90);
    [*][*] SendClientMessage(playerid,ROT,"Du hast die Ballas Base verlassen!");
    [*][*] }
    [*][*]}
    [*][*]else if(GetPlayerVirtualWorld(playerid) == 2)
    [*][*]{
    [*][*] if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    [*][*] {
    [*][*] SetPlayerInterior(playerid, 0);
    [*][*] SetPlayerVirtualWorld(playerid,0);
    [*][*] SetPlayerPos(playerid,143.6633,-1802.3103,16.1406);
    [*][*] SetCameraBehindPlayer(playerid);
    [*][*] SetPlayerFacingAngle(playerid,90);
    [*][*] SendClientMessage(playerid,ROT,"Du hast die Hitman Base verlassen!");
    [*][*] }
    [*][*]}
    [*][*]else if(GetPlayerVirtualWorld(playerid) == 3)
    [*][*]{
    [*][*]if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    [*][*]{
    [*][*] SetPlayerInterior(playerid, 0);
    [*][*] SetPlayerVirtualWorld(playerid,0);
    [*][*] SetPlayerPos(playerid,2495.4055,-1687.8857,13.5166);
    [*][*] SetCameraBehindPlayer(playerid);
    [*][*] SetPlayerFacingAngle(playerid,90);
    [*][*] SendClientMessage(playerid,ROT,"Du hast die Groove Street Base verlassen!");
    [*][*] }
    [*][*]}
    [*][*]return 1;
    [*][*]}
    [/list]

  • ocmd:exit(playerid,params[])
    {
    if(GetPlayerVirtualWorld(playerid) == 1)
    {
    if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,1085.0936,-1226.3617,15.8203);
    SetPlayerVirtualWorld(playerid,0);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,90);
    SendClientMessage(playerid,ROT,"Du hast die Ballas Base verlassen!");
    }
    }
    if(GetPlayerVirtualWorld(playerid) == 2)
    {
    else if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703)) //933
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid,0);
    SetPlayerPos(playerid,143.6633,-1802.3103,16.1406);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,90);
    SendClientMessage(playerid,ROT,"Du hast die Hitman Base verlassen!");
    }
    }
    if(GetPlayerVirtualWorld(playerid) == 2)
    {
    else if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703)) //945
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid,0);
    SetPlayerPos(playerid,2495.4055,-1687.8857,13.5166);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,90);
    SendClientMessage(playerid,ROT,"Du hast die Groove Street Base verlassen!");
    }
    }
    return 1;
    }

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Also die meisten Basen funktionieren aber... diese aus irgend einem Grund nicht kann sie per /exit nicht verlassen nicht wundern wegen else if ist mitten im Befehl:


    else if(IsPlayerInRangeOfPoint(playerid,2,-2624.6082,1412.7472,7.0938))//RedSoldiersBase
    {
    SetPlayerInterior(playerid,8);
    SetPlayerPos(playerid,2807.619873,-1171.899902,1025.570312);
    SetPlayerVirtualWorld(playerid,5);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,0);
    SendClientMessage(playerid,GELB,"Du hast die Red Soldiers Base betreten!");
    }


    ocmd:exit(playerid,params[])
    {
    if(GetPlayerVirtualWorld(playerid) == 1)
    {
    if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,1085.0936,-1226.3617,15.8203);
    SetPlayerVirtualWorld(playerid,0);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,90);
    SendClientMessage(playerid,ROT,"Du hast die Ballas Base verlassen!");
    }
    }
    if(GetPlayerVirtualWorld(playerid) == 2)
    {
    if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703)) //933
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid,0);
    SetPlayerPos(playerid,2143.6633,-1802.3103,16.1406);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,90);
    SendClientMessage(playerid,ROT,"Du hast die Hitman Base verlassen!");
    }
    }
    if(GetPlayerVirtualWorld(playerid) == 3)
    {
    if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703)) //945
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid,0);
    SetPlayerPos(playerid,2495.4055,-1687.8857,13.5166);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,0);
    SendClientMessage(playerid,ROT,"Du hast die Groove Street Base verlassen!");
    }
    }
    if(GetPlayerVirtualWorld(playerid) == 4)
    {
    if(IsPlayerInRangeOfPoint(playerid,3,2143.6633,-1802.3103,16.1406))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerPos(playerid,-2721.3125,-316.9236,7.8438);
    SendClientMessage(playerid,ROT,"Du hast die Triadenbase verlassen!");
    }
    }
    if(GetPlayerVirtualWorld(playerid) == 5)
    {
    if(IsPlayerInRangeOfPoint(playerid,3,2143.6633,-1802.3103,16.1406))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerPos(playerid,-2623.6453,1409.7599,7.0938);
    SendClientMessage(playerid,ROT,"Du hast die Red Soldiers Base verlassen!");
    }
    }
    return 1;
    }


    @PermanenT