Beiträge von xSoldier

    xSoldier:
    {2757.8887, 1223.3120, 2861.1313, 1383.1230, CTFx, CTFy, CTFz}


    Die drei letzen Koordinaten musst du mit noch einem /save auffüllen, wird wohl ein Checkpoint sein oder sowas, das was in der Zone irgendwo ist. Dafür nimmst du vom /save den 2., 3. und 4. Wert.


    @[GeD]Max: Zeigt es den richtigen Skin an, wenn du anstatt GetPlayerSkin einfach mal 50 reinschreibst? Siehst du dann Skin 50? Wenn ja, dann nutzt du wohl GetPlayerSkin an einer Stelle im Code an der es nicht geht, oder der Timer wird nicht richtig aufgerufen, oder du siehst ein falsches Textdraw.


    Jeffry: kannst du ein Beispiel machen? ich versteh das nicht ganz. kann jemand helfen? sehr wichtig...

    Kann mir jemand erklären wie ich eine Gangzone erstelle ich verstehe das nicht ganz..
    So, ist das in meinem Script.
    new FightSystem[][fsSyS]={
    /*MinX, MinY, MaxX, MaxY, CTFx, CTFy, CTFz*/
    {1060.145,-1721.339,1166.624,-1583.168,1072.4016,-1619.3834,20.4583},//Kaufhaus
    {990.2909,1821.38,1177.724,2057.332,1067.5798,1884.2932,10.8203},//Container
    {-887.5186,1377.989,-583.8938,1634.903,-813.6335,1525.2080,26.5065},//Wüste
    {-2506.7,740.0255,-2383.094,826.8147,2459.4094,787.3281,35.1719},//Markt
    {-1850.044,1438.284,-1710.987,1584.248,-1789.1478,1543.3608,7.1875},//Hafen
    {-1891.4263,857.8361,-1722.0261,1095.5897,-1720.0752,1018.2902,17.5859},//Bank
    {1828.318,-1938.465,2071.699,-1760.817,1958.6156,-1853.2424,4.3392},//Tanke
    {1828.0573,-2161.2705,1956.4136,-2057.7964,1924.0941,-2125.0146,13.5826},//Airport(LS)
    {2757.8887,1223.3120,12.3516,1223.3120,2861.1313,1383.1230,12.4219} //LCN - Yakuza Zone
    };
    Ich weiß, bloß nicht wie ich das anstellen soll diese MinX, MinY usw verwirren mich..
    Mit diesen Coords möchte ich das machen, aber ka wie ich das anstellen soll..
    Ihr könnt ja damit ein Beispiel machen.
    Wäre sehr nett
    AddPlayerClass(113,2861.1313,1383.1230,12.4219,324.8553,0,0,0,0,0,0); // LCN vs Yakuza | 1 Ecke
    AddPlayerClass(113,2757.8887,1223.3120,12.3516,328.8958,0,0,0,0,0,0); // LCN vs Yakuza | 2 Ecke

    Okay danke, alles funktioniert einwandfrei :D
    Habe noch eine bitte, könntest du mir helfen? ich habe ka wie ich das anstellen soll dass man nur eine Zone gleichzeitig angreifen kann? und nicht mehrere


    if(strcmp(cmdtext,"/capture",true)==0){
    if(IsAFightFaction(GetPlayerFaction(playerid))){
    for(new fs;fs<sizeof(FightSystem);fs++){
    if((FightSystem[fs][fsOwnerFaction] == GetPlayerFaction(playerid) && FightSystem[fs][fsFightTime]) || FightSystem[fs][fsAttackFaction] == GetPlayerFaction(playerid))
    return SendClientMessage(playerid,FS_COL_GREY,"** Deine Gang / Mafia ist bereits in einem Fight.");
    }
    new TempZone = GetPlayerFightzone(playerid);
    if(TempZone != -255){
    if(!IsAFightFaction(FightSystem[TempZone][fsOwnerFaction]))
    return SendClientMessage(playerid,FS_COL_GREY,"Gebiet wurde ausgeschaltet.");
    if(FightSystem[TempZone][fsOwnerFaction] == GetPlayerFaction(playerid))
    return SendClientMessage(playerid,FS_COL_GREY,"** Diese Zone gehört bereits euch.");
    if(FightSystem[TempZone][fsFightTime] || FightSystem[TempZone][fsAttackFaction] != -255)
    return SendClientMessage(playerid,FS_COL_GREY,"** In diesem Gebiet wird bereits geschossen.");
    if(FightSystem[TempZone][fsLastFight]){
    new fsText[178];
    format(fsText,sizeof(fsText),"Ganggebiet: Dieses Ganggebiet wurde bereits Angegriffen, wartet noch: '%d' Minuten.",FightSystem[TempZone][fsLastFight]);
    SendClientMessage(playerid,FS_COL_GREY,fsText);
    return 1;
    }
    for(new fs;fs<sizeof(FightSystem);fs++){
    if(FightSystem[fs][fsOwnerFaction] == FightSystem[TempZone][fsOwnerFaction] && FightSystem[fs][fsAttackFaction] != -255)
    return SendClientMessage(playerid,FS_COL_GREY,"Ganggebiet: Die Gang / Mafia der das Ganggebiet gehört hat bereits ein Kampf.");
    }
    new fsTextToOwner[255];
    format(fsTextToOwner,sizeof(fsTextToOwner),">>> Fight <<< | Ihr werdet von: %s angegriffen, setzt euch zur wehr!",GetFactionNameOfFaction(GetPlayerFaction(playerid)));
    new fsName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,fsName,MAX_PLAYER_NAME);
    new fsTextToAttack[255];
    printf("fsOwnerFaction: %d - FactionName: %s",FightSystem[TempZone][fsOwnerFaction],GetFactionNameOfFaction(FightSystem[TempZone][fsOwnerFaction]));
    format(fsTextToAttack,sizeof(fsTextToAttack),">>> Fight <<< | %s hat ein Kampf mit: %s begonnen, macht sie Platt!",fsName,GetFactionNameOfFaction(FightSystem[TempZone][fsOwnerFaction]));
    new fsText[64];
    format(fsText,sizeof(fsText),"~y~%s",GetFactionNameOfFaction(FightSystem[TempZone][fsOwnerFaction]));
    TextDrawSetString(FightSystem[TempZone][fsWinFaction],fsText);
    TextDrawSetString(FightSystem[TempZone][fsWinKills],"~y~00 Kills");
    format(fsText,sizeof(fsText),"~y~%s",GetFactionNameOfFaction(GetPlayerFaction(playerid)));
    TextDrawSetString(FightSystem[TempZone][fsLoseFaction],fsText);
    TextDrawSetString(FightSystem[TempZone][fsLoseKills],"~y~00 Kills");
    TextDrawSetString(FightSystem[TempZone][fsTime],"Verbl. Zeit: 1 Minuten");//ZEIT
    for(new i;i<MAX_PLAYERS;i++){
    if(IsPlayerConnected(i)){
    GangZoneFlashForPlayer(i,FightSystem[TempZone][fsZoneID],GetZoneColorOfFaction(GetPlayerFaction(playerid)));
    if(GetPlayerFaction(i) == FightSystem[TempZone][fsOwnerFaction]){
    PlayerPlaySound(i,1058,0.0,0.0,0.0);
    SendClientMessage(i,FS_COL_YELLOW,fsTextToOwner);
    TextDrawShowForPlayer(i,Fight);
    TextDrawShowForPlayer(i,FightUnderline);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsTime]);
    }
    if(GetPlayerFaction(i) == GetPlayerFaction(playerid)){
    PlayerPlaySound(i,1058,0.0,0.0,0.0);
    SendClientMessage(i,FS_COL_YELLOW,fsTextToAttack);
    TextDrawShowForPlayer(i,Fight);
    TextDrawShowForPlayer(i,FightUnderline);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsTime]);
    }
    }
    }
    FightSystem[TempZone][fsAttackFaction] = GetPlayerFaction(playerid);
    FightSystem[TempZone][fsKillsOfOwner] = 0;
    FightSystem[TempZone][fsKillsOfAttack] = 0;
    FightSystem[TempZone][fsFightTime] = 1;//ZEIT
    FightSystem[TempZone][fsCTF][0] = -255;
    FightSystem[TempZone][fsCTF][1] = 0;
    FightSystem[TempZone][fsCTF][2] = 0;
    return 1;
    }return SendClientMessage(playerid,FS_COL_GREY,"** Du bist in keinem Gebiet!");
    }else SendClientMessage(playerid,FS_COL_GREY,"** Du bist in keiner Gang / Mafia.");
    return 1;
    }return 0;
    }

    Kommen immernoch Errors,
    Dark.pwn(50998) : error 032: array index out of bounds (variable "PlayerInfo")
    Dark.pwn(51004) : error 032: array index out of bounds (variable "PlayerInfo")


    In diesen Zeilen:
    return PlayerInfo[playerid][pInfo];

    Meinst du das so?
    Habe das gefunden:


    new PlayerInfo[MAX_PLAYERS][pInfo];


    danach eingefügt.


    forward GetpMember(playerid);
    public GetpMember(playerid)
    {
    return PlayerInfo[MAX_PLAYERS][pInfo];
    }


    forward GetpLeader(playerid);
    public GetpLeader(playerid)
    {
    return PlayerInfo[MAX_PLAYERS][pInfo];
    }


    Kommen aber Errors.


    Dark.pwn(50998) : error 032: array index out of bounds (variable "PlayerInfo")
    Dark.pwn(51004) : error 032: array index out of bounds (variable "PlayerInfo")

    Hmm das?
    enum pInfo
    {
    pKey[128],
    pLevel,
    pAdmin,
    pSupporter,
    pDonateRank,
    gPupgrade,
    pConnectTime,
    pNeuling,
    pReg,
    pSex,
    pAge,
    pOrigin,
    pCK,
    pMuted,
    pKnast,
    pExp,
    pCash,
    pAccount,
    pPlayerKreditDauer,
    pPlayerKredit,
    pCrimes,
    pKills,
    pJailed,
    pJailTime,
    pDeaths,
    pArrested,
    pWantedDeaths,
    pPhoneBook,
    pLottoNr,
    pFishes,
    pBiggestFish,
    pJob,
    pPayCheck,
    pRest,
    pHeadValue,
    pGangJailed,
    pMauled,
    pMats,
    pDrugs,
    pLeader,
    pMember,
    pFMember,
    pRank,
    pChar,
    pContractTime,
    pDetSkill,
    pSexSkill,
    pBoxSkill,
    pLawSkill,
    pMechSkill,
    pJackSkill,
    pCarSkill,
    pNewsSkill,
    pDrugsSkill,
    pCookSkill,
    pFishSkill,
    Float:pHealth,
    Float:pSHealth,
    pInt,
    pLocal,
    pTeam,
    pModel,
    pPnumber,
    pPhousekey,
    pPbiskey,
    Float:pPos_x,
    Float:pPos_y,
    Float:pPos_z,
    pCarLic,
    pNewLic,
    pFlyLic,
    pBoatLic,
    pFishLic,
    pGunLic, //Definition des Scheines zb die Aufgabe später
    pLKWLic,
    pRollerLic,
    pMotoLic,
    pBikeP,
    pCarP,
    pZig,
    pKekse,
    pZigSucht,
    pGun1,
    pGun2,
    pGun3,
    pGun4,
    pAmmo1,
    pAmmo2,
    pAmmo3,
    pAmmo4,
    pCarTime,
    pMulltime,
    pPayDay,
    pPayDayHad,
    pCDPlayer,
    pWins,
    pLoses,
    pAlcoholPerk,
    pDrugPerk,
    pMiserPerk,
    pPainPerk,
    pTraderPerk,
    pTut,
    pRadio,
    pWarns,
    Float:pGWD,
    pAdjustable,
    pFuel,
    pMarried,
    pMarriedTo[128],
    pInvWeapon,
    pInvAmmo,
    pInvWeapon2,
    pInvAmmo2,
    pInvDrugs,
    pInvMats,
    pFlugTime,
    pRoadblock,
    pPlayMinutes,
    pGesamtMinutes,
    pMinutesSinceLogin,
    pMinutesSinceAn,
    pSFPASS,
    pLVPASS,
    pHandyGeld,
    pHandyVer,
    pUhrID,
    pHandyID,
    pOwnPerso,
    pOwnAntrag,
    pPersoStop,
    pGehalt,
    pFrakSperre,
    pBoxMats,
    pBoxDrugs,
    pban,
    Text:LetterboxTop,Text:LetterboxBottom2, Text:LetterboxBottom,
    pFarmTime,
    pGDeaths,
    pGKills,
    pMeldung,
    pHouseKey,
    pRentHouseKey
    };

    echo Executing Server Config...
    lanmode 0
    rcon_password test
    maxplayers 1
    port 6768
    hostname (dein servername)
    gamemode0 selfmade 1
    filterscripts
    announce 0
    query 1
    chatlogging 0
    weburl www.sa-mp.com
    onfoot_rate 40
    incar_rate 40
    weapon_rate 40
    stream_distance 300.0
    stream_rate 1000
    maxnpc 0
    plugins streamer.so sscanf.so
    logtimeformat [%H:%M:%S]


    Versuch das bei dir, und geb deine Daten ein.

    Achso okay, habe mich anscheinend verlesen.
    Ich habe das gemacht, aber da kommen ebenfalls immernoch Errors.
    Habe das ganz unten eingefügt. Ebenfalls treten Errors auf.



    Würde mich sehr um weitere Hilfe freuen.

    Kriege Errors.


    0\filterscripts\Gangfight.pwn(784) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
    0\filterscripts\Gangfight.pwn(784) : warning 215: expression has no effect
    0\filterscripts\Gangfight.pwn(784) : error 001: expected token: ";", but found "]"
    0\filterscripts\Gangfight.pwn(784) : error 029: invalid expression, assumed zero
    0\filterscripts\Gangfight.pwn(784) : fatal error 107: too many error messages on one line


    Zeile: 784:


    forward GetpMember(playerid);
    public GetpMember(playerid)
    {
    Zeile: 784: return pInfo[playerid][pMember];
    }

    Hallo liebes Breadfish Forum,
    habe ein Problem mit meinem Gangfight System.
    Wenn ich eine Zone erobere, steht da NoN Gang obwohl ich Grove Street, Ballas, Yakuza, La Cosa Nostra angegeben habe. Könnte jemand weiterhelfen?


    if(strcmp(cmdtext,"/capture",true)==0){
    if(IsAFightFaction(GetPlayerFaction(playerid))){
    for(new fs;fs<sizeof(FightSystem);fs++){
    if((FightSystem[fs][fsOwnerFaction] == GetPlayerFaction(playerid) && FightSystem[fs][fsFightTime]) || FightSystem[fs][fsAttackFaction] == GetPlayerFaction(playerid))
    return SendClientMessage(playerid,FS_COL_GREY,"** Deine Gang / Mafia ist bereits in einem Fight.");
    }
    new TempZone = GetPlayerFightzone(playerid);
    if(TempZone != -255){
    if(!IsAFightFaction(FightSystem[TempZone][fsOwnerFaction]))
    return SendClientMessage(playerid,FS_COL_GREY,"Gebiet wurde ausgeschaltet.");
    if(FightSystem[TempZone][fsOwnerFaction] == GetPlayerFaction(playerid))
    return SendClientMessage(playerid,FS_COL_GREY,"** Man greift nicht seine eigenen Leute an.");
    if(FightSystem[TempZone][fsFightTime] || FightSystem[TempZone][fsAttackFaction] != -255)
    return SendClientMessage(playerid,FS_COL_GREY,"** In diesem Gebiet wird bereits geschossen.");
    if(FightSystem[TempZone][fsLastFight]){
    new fsText[178];
    format(fsText,sizeof(fsText),"Ganggebiet: Dieses Ganggebiet wurde bereits Angegriffen, wartet noch: '%d' Minuten.",FightSystem[TempZone][fsLastFight]);
    SendClientMessage(playerid,FS_COL_GREY,fsText);
    return 1;
    }
    for(new fs;fs<sizeof(FightSystem);fs++){
    if(FightSystem[fs][fsOwnerFaction] == FightSystem[TempZone][fsOwnerFaction] && FightSystem[fs][fsAttackFaction] != -255)
    return SendClientMessage(playerid,FS_COL_GREY,"Ganggebiet: Die Gang / Mafia der das Ganggebiet gehört hat bereits ein Kampf.");
    }
    new fsTextToOwner[255];
    format(fsTextToOwner,sizeof(fsTextToOwner),">>> Fight <<< | Ihr werden von: %s angegriffen, setzt euch zur wehr!",GetFactionNameOfFaction(GetPlayerFaction(playerid)));
    new fsName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,fsName,MAX_PLAYER_NAME);
    new fsTextToAttack[255];
    format(fsTextToAttack,sizeof(fsTextToAttack),">>> Fight <<< | %s hat ein Kampf mit: %s begonnen, macht sie Platt!",fsName,GetFactionNameOfFaction(FightSystem[TempZone][fsOwnerFaction]));
    new fsText[64];
    format(fsText,sizeof(fsText),"~y~%s",GetFactionNameOfFaction(FightSystem[TempZone][fsOwnerFaction]));
    TextDrawSetString(FightSystem[TempZone][fsWinFaction],fsText);
    TextDrawSetString(FightSystem[TempZone][fsWinKills],"~y~00 Kills");
    format(fsText,sizeof(fsText),"~y~%s",GetFactionNameOfFaction(GetPlayerFaction(playerid)));
    TextDrawSetString(FightSystem[TempZone][fsLoseFaction],fsText);
    TextDrawSetString(FightSystem[TempZone][fsLoseKills],"~y~00 Kills");
    TextDrawSetString(FightSystem[TempZone][fsTime],"Verbl. Zeit: 60 Minuten");//ZEIT
    for(new i;i<MAX_PLAYERS;i++){
    if(IsPlayerConnected(i)){
    GangZoneFlashForPlayer(i,FightSystem[TempZone][fsZoneID],GetZoneColorOfFaction(GetPlayerFaction(playerid)));
    if(GetPlayerFaction(i) == FightSystem[TempZone][fsOwnerFaction]){
    PlayerPlaySound(i,1058,0.0,0.0,0.0);
    SendClientMessage(i,FS_COL_YELLOW,fsTextToOwner);
    TextDrawShowForPlayer(i,Fight);
    TextDrawShowForPlayer(i,FightUnderline);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsTime]);
    }
    if(GetPlayerFaction(i) == GetPlayerFaction(playerid)){
    PlayerPlaySound(i,1058,0.0,0.0,0.0);
    SendClientMessage(i,FS_COL_YELLOW,fsTextToAttack);
    TextDrawShowForPlayer(i,Fight);
    TextDrawShowForPlayer(i,FightUnderline);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsWinKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseFaction]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsLoseKills]);
    TextDrawShowForPlayer(i,FightSystem[TempZone][fsTime]);
    }
    }
    }
    FightSystem[TempZone][fsAttackFaction] = GetPlayerFaction(playerid);
    FightSystem[TempZone][fsKillsOfOwner] = 0;
    FightSystem[TempZone][fsKillsOfAttack] = 0;
    FightSystem[TempZone][fsFightTime] = 60;//ZEIT
    FightSystem[TempZone][fsCTF][0] = -255;
    FightSystem[TempZone][fsCTF][1] = 0;
    FightSystem[TempZone][fsCTF][2] = 0;
    return 1;
    }return SendClientMessage(playerid,FS_COL_GREY,"** Du bist in keinem Gebiet!");
    }else SendClientMessage(playerid,FS_COL_GREY,"** Du bist in keiner Gang / Mafia.");
    return 1;
    }return 0;
    }


    stock GetZoneColorOfFaction(Faction){
    if(Faction == 5) return 0x00FF78FF; //LCN
    else if(Faction == 5) return 0x00FF78FF; //LCN
    else if(Faction == 13) return 0x4BBC00FF; //GS
    else if(Faction == 14) return 0x6E00FFFF; //Ballas
    else if(Faction == 6) return 0xFFABFFFF; //Yakuza
    else return 0x009BFFFF; //NoN-Gang
    }
    stock GetFactionNameOfFaction(Faction){
    new FactionName[64];
    if(Faction == 5) format(FactionName,sizeof(FactionName),"La Cosa Nostra");
    else if(Faction == 6) format(FactionName,sizeof(FactionName),"Yakuza");
    else if(Faction == 13) format(FactionName,sizeof(FactionName),"Grove Street");
    else if(Faction == 14) format(FactionName,sizeof(FactionName),"Ballas");
    else format(FactionName,sizeof(FactionName),"NoN-Gang");
    return FactionName;
    }


    Ich besitze das Godfather WOS Script von K3VIN, und mein enum vom Script lautet alles ein p davor z.b pLeader oder pMember
    Habe das so gemacht weiß aber nicht ob das genau stimmt..
    stock GetPlayerFaction(playerid){
    new Member = CallRemoteFunction("pInfo[playerid][pMember]","i",playerid);
    if(Member)
    return Member;
    new Leader = CallRemoteFunction("pInfo[playerid][pLeader]","i",playerid);
    if(Leader)
    return Leader;
    return 0;
    }


    Weiß jemand was da nicht genau funktioniert? :/ würde mich sehr um positive Antworten freuen.


    Mit freundlichen Grüßen,
    Matze :thumbup:

    Habe nun den Code eingefügt kriege aber 26 Error.
    Würde mich um Hilfe freuen.


    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
    if(GetPlayerVehicleID(playerid) == YakuzaVehs[3] || GetPlayerVehicleID(playerid) == YakuzaVehs[4] || GetPlayerVehicleID(playerid) == YakuzaVehs[9])
    {
    if(PlayerInfo[playerid][pRank] >= 2)
    {


    }
    else
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_RED,"Du besitzt nicht Rank 2");
    }
    }


    Liebe Grüße,
    Matze