Beiträge von KinGRaPTiiC

    @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.

    Sieht bei mir genau so aus:
    ocmd:exit(playerid,params[])
    {
    if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    if(GetPlayerVirtualWorld(playerid) != 1)return 1;
    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(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    if(GetPlayerVirtualWorld(playerid) != 2)return 1;
    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(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    if(GetPlayerVirtualWorld(playerid) != 3)return 1;
    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;
    }

    @Daniel_Waynee
    Also statt
    if(!GetPlayerVirtualWorld(playerid,1))return 1; //941


    das hier?
    if(GetPlayerVirtualWorld(playerid,!=1))return 1; //941


    weil wenn Ja dann kriege ich das hier:


    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(921) : error 029: invalid expression, assumed zero
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(921) : warning 215: expression has no effect
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(921) : error 001: expected token: ";", but found ")"
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(921) : error 029: invalid expression, assumed zero
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(921) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.

    @Daniel_Waynee erstmal danke an dich aber bekomme diese Warnings


    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(921) : warning 202: number of arguments does not match definition
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(931) : warning 202: number of arguments does not match definition
    C:\Users\Dustin\Desktop\SA-MP Server\gamemodes\German-Reallife.pwn(941) : warning 202: number of arguments does not match definition
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    3 Warnings.


    ocmd:exit(playerid,params[])
    {
    if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    if(!GetPlayerVirtualWorld(playerid,1))return 1; //921
    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(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    if(!GetPlayerVirtualWorld(playerid,2))return 1; //931
    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(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    if(!GetPlayerVirtualWorld(playerid,1))return 1; //941
    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;
    }


    Hey Leute


    Ich frage mich wie ich das Hinbekomme das mit dem Enter klappt ja schon mal ganz gut aber mit dem Exit habe ich so meine Problem....
    z.B ich Betrete die Ballas Base. Verlasse die Ballas Base.... Fahre zur Hitman Base und betrete sie, verlasse sie und im Chat steht du hast die Ballas Base verlassen und bin an der Ballas Base hat einer einen Plan? :huh::rolleyes:


    Hier mein Enter&Exit


    ocmd:exit(playerid,params[])
    {
    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(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid,0);
    SetPlayerPos(playerid,);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,90);
    SendClientMessage(playerid,ROT,"Du hast die Hitman Base verlassen!");
    }
    else if(IsPlayerInRangeOfPoint(playerid,3,2807.5945,-1174.7563,1025.5703))
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid,0);
    SetPlayerPos(playerid,);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,90);
    SendClientMessage(playerid,ROT,"Du hast die Groove Street Base verlassen!");
    }
    return 1;
    }


    ocmd:enter(playerid,params[])
    {
    if(IsPlayerInRangeOfPoint(playerid,2,1083.0112,-1226.5582,15.8203)) //BallasBase
    {
    SetPlayerInterior(playerid, 8);
    SetPlayerPos(playerid,2807.619873,-1171.899902,1025.570312);
    SetPlayerVirtualWorld(playerid,1);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,0);
    SendClientMessage(playerid,GELB,"Du hast die Ballas Base betreten!");
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,2141.0938,-1802.1365,16.1475)) //HitmanBase
    {
    SetPlayerInterior(playerid,8);
    SetPlayerPos(playerid,2807.619873,-1171.899902,1025.570312);
    SetPlayerVirtualWorld(playerid,2);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,0);
    SendClientMessage(playerid,GELB,"Du hast die Hitman Base betreten!");
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,2495.4326,-1691.1399,14.7656))//GrooveBase
    {
    SetPlayerInterior(playerid,8);
    SetPlayerPos(playerid,2807.619873,-1171.899902,1025.570312);
    SetPlayerVirtualWorld(playerid,3);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,0);
    SendClientMessage(playerid,GELB,"Du hast die Groove Street Base betreten!");
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,-2719.3291,-319.1255,7.8438))//TriadenBase
    {
    SetPlayerInterior(playerid,8);
    SetPlayerPos(playerid,2807.619873,-1171.899902,1025.570312);
    SetPlayerVirtualWorld(playerid,4);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,0);
    SendClientMessage(playerid,GELB,"Du hast die Triaden Base betreten!");
    }
    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!");
    }
    else if(IsPlayerInRangeOfPoint(playerid,2,918.8733,-1252.2760,16.2109))//O-AMTBASE
    {
    SetPlayerInterior(playerid,5);
    SetPlayerPos(playerid,322.1354,304.2434,999.1484);
    SetCameraBehindPlayer(playerid);
    SetPlayerFacingAngle(playerid,0);
    SendClientMessage(playerid,GELB,"Du hast die O-Amt Base betreten!");
    }
    else
    {
    SendClientMessage(playerid,ROT,"Du kannst hier nichts betreten!");
    }
    return 1;
    }

    Hey ich habe absolut keinen Plan wieso ich nicht in der Base Spawne die ich Ballas eigentlich zugewiesen Habe ?(
    Hier mein fraktEnum und die Fraktionen solltet ihr noch was brauchen einfach bescheid geben :)
    enum fraktEnum{ f_name[128], Float:f_x, Float:f_y, Float:f_z, Float:f_r, f_inter, f_world, f_color}new fInfo[][fraktEnum] = {{"Zivilist", 0.0, 0.0, 0.0, 0.0, 0, 0,WEISS},{"LSPD", 0.0, 0.0, 0.0, 0.0, 0, 0,HELLBLAU},{"SFPD",0.0, 0.0, 0.0, 0.0, 0, 0,HELLBLAU},{"LVPD",0.0, 0.0, 0.0, 0.0, 0, 0,HELLBLAU},{"BALLAS",2807.619873,-1171.899902,1025.570312,0.0, 1, 8,WEISS}};



    public OnPlayerSpawn(playerid){ if(!isPlayerInFrakt(playerid, 0)) { new fID; fID = PlayerInfo[playerid][pFraktion]; SetPlayerPos(playerid, fInfo[fID][f_x],fInfo[fID][f_y],fInfo[fID][f_z]); SetPlayerFacingAngle(playerid, fInfo[fID][f_r]); } //NPC Skin Setzung if(IsPlayerNPC(playerid)) { new botname[MAX_PLAYER_NAME]; GetPlayerName(playerid,botname,sizeof(botname)); if(!strcmp(botname,"Rollerhändler",true)) { SetPlayerSkin(playerid,171); } } //NPC Bot Abfrage if(IsPlayerNPC(playerid)) return 1; return 1;}



    /edit hab bei OnPlayerSpawn[wiki]OnPlayerSpawn[/wiki]


    SetPlayerVirtualWorld(playerid, fInfo[fID][f_world]);
    SetPlayerInterior(playerid, fInfo[fID][f_inter]);
    Vergessen

    Naja da ich verzweifelt war hab ich den Befehl einfach raus genommen und jetzt diesen eingefügt damit ich es nicht immer in der DB ändern muss.


    ocmd:setmoney(playerid,params[])
    {
    print("setmoney Befehl ausgeführt!");
    if(!isAdmin(playerid,3))return SendClientMessage(playerid,DUNKELROT,"Dein Adminlevel ist zu Niedrig!");
    new pID, test[128], string[128],BETRAG;
    if(sscanf(params,"ui",pID,BETRAG))return SendClientMessage(playerid,GELB,"[INFO]: /setmoney [SpielerID] [Betrag]");
    ResetPlayerMoney(pID);
    GivePlayerMoney(pID,BETRAG);
    format(string,sizeof(string),"AdmCmd: %s hat dein Geld auf $%i gesetzt",PlayerInfo[playerid],BETRAG);
    format(test,sizeof(test),"AdmCmd: Du hast %s den Geldbetrag auf $%i gesetzt!",PlayerInfo[pID],BETRAG);
    SendClientMessage(pID,DUNKELROT,string);
    SendClientMessage(playerid,DUNKELROT,test);
    return 1;
    }

    Irgendwie verstehe ich das nicht....


    Wenn er doch 2500$ abzieht ich dann Disconnecte wird es doch gespeichert aber ich verstehe auch nicht was du damit meinst...
    PlayerInfo[playerid][pMoney] = PlayerInfo[playerid][pMoney]+2500;


    Müsste ich das dann auch so beim Adminlevel machen und normales Lvl etc?

    public OnUserLogin(playerid)
    {
    //Query wurde ausgeführt und das Ergebnis im Cache gespeichert
    new rows;
    cache_get_row_count(rows);
    if(rows == 0)
    {
    //Der Spieler hat ein falsches Passwort eingegeben
    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Anmeldung", "Bitte logge dich ein, gebe dazu dein Passwort ein:\n{FF0000}Falsches Passwort!", "Bestätigen", "Abbrechen");
    }
    else
    {
    //Es existiert ein Ergebnis, das heißt der Spieler hat das richtige Passwort eingegeben
    //Wir lesen nun die erste Zeile des Caches aus (ID 0)
    cache_get_value_name_int(0, "id", PlayerInfo[playerid][p_id]);
    cache_get_value_name_int(0, "level", PlayerInfo[playerid][pLevel]);
    cache_get_value_name_int(0, "money", PlayerInfo[playerid][pMoney]);
    cache_get_value_name_int(0, "kills", PlayerInfo[playerid][pKills]);
    cache_get_value_name_int(0, "deaths", PlayerInfo[playerid][pDeaths]);
    cache_get_value_name_int(0, "alevel", PlayerInfo[playerid][pAlevel]);
    PlayerInfo[playerid][pLoggedIn] = true;
    SendClientMessage(playerid,GELB,"Du hast dich erfolgreich eingeloggt!");
    GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
    SpawnPlayer(playerid);
    }
    return 1;
    }


    Ne das war nur bei alevel so

    Beim Disconnecten wird doch alles Gespeichert?


    Mein Befehl mit den -$2500


    ocmd:geld(playerid,params[])
    {
    GivePlayerMoney(playerid,-2500);
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    //NPC Bot Abfrage
    if(IsPlayerNPC(playerid)) return 1;
    SaveUserStats(playerid); //Spieler wird Gespeichert
    return 1;
    }