Ich komme nicht klar mit Befehl

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 Community, wie kann ich machen das nur Mafia und Gang diesen Befehl benutzen darf?
    Ich komme gerade nicht klar damit.




    if(strcmp(cmdtext,"/invade",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 != -14)
    {
    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] != -14)
    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] != -14)
    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] = 15;//ZEIT
    FightSystem[TempZone][fsCTF][0] = -14;
    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;
    }

  • Wenn dann ist "IsPlayerInFrakt" eine Funktion ;)
    Sonst sucht er noch bei OnPlayerCommand nach /IsPlayerInFrakt


    @Threadersteller


    Schau mal nach wie die Parameter für die Fraktion sind.
    zB.


    PlayerData[playerid][iFraktion] oder SpielerInfo[playerid][pFraktion] oder wie es bei dir heißen mag.
    Denk ja mal du hast ein enum..
    Dann noch die Fraktionsid der Fraktion rausfinden die es nutzen können sollen dürfen, was auch immer.


    Dann einfach eine if abfrage einbauen.



    if(SpielerInfo[playerid][pFraktion]==1) //wenn playerid (der den Command benutzt) in der Fraktion 1 ist dann geht es
    {
    //weitere abfragen, funktionen vom command
    }
    else SendClientMessage(playerid,0xCD0000FF,"Du darfst diesen Befehl nicht nutzen!"); //Nachricht schicken


    Oder gleich eine Funktion scripten die für alle Gangs gilt. zB. IsPlayerInGang


    - Tomsen

  • Da ist die Frage was heißt 0 0 0 0.
    Hab das System nicht geschrieben.


    Steht sicher für irgentwas. Aber weiß nicht für was. Versuch die Variablen mal per Hand via Command oder so zu setzen.


    (also einen Command der die Variablen bei den es scheitert, also wo die Fehlermeldungen bei else kommen, auf einen Wert setzen das es geht)


    - Tomsen

  • Hab nur das gefunden


    public FightUpdate_2()
    {
    for(new fs;fs<sizeof(FightSystem);fs++)
    {
    if(FightSystem[fs][fsFightTime])
    {
    FightSystem[fs][fsFightTime]--;
    new fsText[64];
    format(fsText,sizeof(fsText),"Verbl. Zeit: %d Minuten",FightSystem[fs][fsFightTime]);
    TextDrawSetString(FightSystem[fs][fsTime],fsText);
    if(!FightSystem[fs][fsFightTime])
    {
    FightSystem[fs][fsLastFight] = 0;
    new fsTextToOwner[255];
    new fsTextToAttack[255];
    new fsType;
    if(FightSystem[fs][fsKillsOfOwner] > FightSystem[fs][fsKillsOfAttack])
    {
    fsType = 2;
    format(fsTextToOwner,sizeof(fsTextToOwner),">>> Fight <<< | Ihr habt gewonnen...");
    format(fsTextToAttack,sizeof(fsTextToAttack),">>> Fight <<< | Ihr habt verloren...");
    }
    else if(FightSystem[fs][fsKillsOfAttack] > FightSystem[fs][fsKillsOfOwner])
    {
    fsType = 3;
    format(fsTextToOwner,sizeof(fsTextToOwner),">>> Fight <<< | Ihr habt verloren...");
    format(fsTextToAttack,sizeof(fsTextToAttack),">>> Fight <<< | Ihr habt gewonnen...");
    }
    else
    {
    fsType = 1;
    format(fsTextToOwner,sizeof(fsTextToOwner),">>> Fight <<< | Unentschieden, ihr behaltet euer gebiet.");
    format(fsTextToAttack,sizeof(fsTextToAttack),">>> Fight <<< | Unentschieden, ihr müsst euch mehr antrengen.");
    }
    for(new i;i<MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i))
    {
    GangZoneStopFlashForPlayer(i,FightSystem[fs][fsZoneID]);
    if(fsType == 3)
    {
    GangZoneHideForPlayer(i,FightSystem[fs][fsZoneID]);
    GangZoneShowForPlayer(i,FightSystem[fs][fsZoneID],GetZoneColorOfFaction(FightSystem[fs][fsAttackFaction]));
    }
    if(GetPlayerFaction(i) == FightSystem[fs][fsOwnerFaction])
    {
    PlayerPlaySound(i,1058,0.0,0.0,0.0);
    TextDrawHideForPlayer(i,Fight);
    TextDrawHideForPlayer(i,FightUnderline);
    TextDrawHideForPlayer(i,FightSystem[fs][fsWinFaction]);
    TextDrawHideForPlayer(i,FightSystem[fs][fsWinKills]);
    TextDrawHideForPlayer(i,FightSystem[fs][fsLoseFaction]);
    TextDrawHideForPlayer(i,FightSystem[fs][fsLoseKills]);
    TextDrawHideForPlayer(i,FightSystem[fs][fsTime]);
    SendClientMessage(i,FS_COL_YELLOW,fsTextToOwner);
    if(fsType == 3 && GetPlayerFightzone(i) == fs)
    SetPlayerHealth(i,0.0);
    }
    else if(GetPlayerFaction(i) == FightSystem[fs][fsAttackFaction])
    {
    PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
    TextDrawHideForPlayer(i,Fight);
    TextDrawHideForPlayer(i,FightUnderline);
    TextDrawHideForPlayer(i,FightSystem[fs][fsWinFaction]);
    TextDrawHideForPlayer(i,FightSystem[fs][fsWinKills]);
    TextDrawHideForPlayer(i,FightSystem[fs][fsLoseFaction]);
    TextDrawHideForPlayer(i,FightSystem[fs][fsLoseKills]);
    TextDrawHideForPlayer(i,FightSystem[fs][fsTime]);
    SendClientMessage(i,FS_COL_YELLOW,fsTextToAttack);
    if(fsType != 3 && GetPlayerFightzone(i) == fs)
    SetPlayerHealth(i,0.0);
    }
    }
    }
    FightSystem[fs][fsKillsOfAttack] = 0;
    FightSystem[fs][fsKillsOfOwner] = 0;
    if(fsType == 3)
    FightSystem[fs][fsOwnerFaction] = FightSystem[fs][fsAttackFaction];
    FightSystem[fs][fsAttackFaction] = -14;
    FightSystem[fs][fsCTF][0] = -14;
    }
    }
    if(FightSystem[fs][fsLastFight])
    FightSystem[fs][fsLastFight]--;
    }
    return 1;
    }


    public Fight_Init()
    {
    Fight = TextDrawCreate(88.000000,244.000000,"Fight:~n~_~n~_~n~_~n~_~n~_");
    TextDrawUseBox(Fight,1);
    TextDrawBoxColor(Fight,0x00000066);
    TextDrawTextSize(Fight,102.000000,124.000000);
    TextDrawAlignment(Fight,2);
    TextDrawBackgroundColor(Fight,0xff000033);
    TextDrawFont(Fight,2);
    TextDrawLetterSize(Fight,0.499999,1.000000);
    TextDrawColor(Fight,0xffffffff);
    TextDrawSetOutline(Fight,1);
    TextDrawSetProportional(Fight,1);
    FightUnderline = TextDrawCreate(91.000000,274.000000,".");
    TextDrawAlignment(FightUnderline,2);
    TextDrawBackgroundColor(FightUnderline,0x000000ff);
    TextDrawFont(FightUnderline,3);
    TextDrawLetterSize(FightUnderline,14.799997,1.000000);
    TextDrawColor(FightUnderline,0xffffffff);
    TextDrawSetProportional(FightUnderline,1);
    TextDrawSetShadow(FightUnderline,1);
    if(!fexist("Fightzones.cfg"))
    {
    new File:fFile=fopen("Fightzones.cfg",io_write);
    for(new fs;fs<sizeof(FightSystem);fs++)
    fwrite(fFile,"-14 -14 0 0 0\r\n");
    fclose(fFile);
    }
    new File:fFile=fopen("Fightzones.cfg",io_read),Content[64],fs;
    while(fread(fFile,Content) && fs < sizeof(FightSystem)){
    FightSystem[fs][fsWinFaction] = TextDrawCreate(26.000000,256.000000," ");
    TextDrawSetProportional(FightSystem[fs][fsWinFaction],1);
    TextDrawAlignment(FightSystem[fs][fsWinFaction],0);
    TextDrawBackgroundColor(FightSystem[fs][fsWinFaction],0x000000ff);
    TextDrawFont(FightSystem[fs][fsWinFaction],2);
    TextDrawLetterSize(FightSystem[fs][fsWinFaction],0.199999,1.000000);
    TextDrawColor(FightSystem[fs][fsWinFaction],0xffffffff);
    TextDrawSetOutline(FightSystem[fs][fsWinFaction],1);
    FightSystem[fs][fsLoseFaction] = TextDrawCreate(26.000000,267.000000," ");
    TextDrawSetProportional(FightSystem[fs][fsLoseFaction],1);
    TextDrawSetOutline(FightSystem[fs][fsLoseFaction],1);
    TextDrawColor(FightSystem[fs][fsLoseFaction],0xffffffff);
    TextDrawFont(FightSystem[fs][fsLoseFaction],2);
    TextDrawLetterSize(FightSystem[fs][fsLoseFaction],0.199999,0.899999);
    TextDrawBackgroundColor(FightSystem[fs][fsLoseFaction],0x000000ff);
    TextDrawAlignment(FightSystem[fs][fsLoseFaction],0);
    FightSystem[fs][fsWinKills] = TextDrawCreate(107.000000,256.000000," ");
    TextDrawSetProportional(FightSystem[fs][fsWinKills],1);
    TextDrawSetOutline(FightSystem[fs][fsWinKills],1);
    TextDrawColor(FightSystem[fs][fsWinKills],0xffffffff);
    TextDrawSetShadow(FightSystem[fs][fsWinKills],1);
    TextDrawFont(FightSystem[fs][fsWinKills],2);
    TextDrawLetterSize(FightSystem[fs][fsWinKills],0.199999,1.000000);
    TextDrawBackgroundColor(FightSystem[fs][fsWinKills],0x000000ff);
    TextDrawAlignment(FightSystem[fs][fsWinKills],0);
    FightSystem[fs][fsLoseKills] = TextDrawCreate(107.000000,267.000000," ");
    TextDrawSetProportional(FightSystem[fs][fsLoseKills],1);
    TextDrawSetShadow(FightSystem[fs][fsLoseKills],1);
    TextDrawSetOutline(FightSystem[fs][fsLoseKills],1);
    TextDrawColor(FightSystem[fs][fsLoseKills],0xffffffff);
    TextDrawFont(FightSystem[fs][fsLoseKills],2);
    TextDrawLetterSize(FightSystem[fs][fsLoseKills],0.199999,1.000000);
    TextDrawBackgroundColor(FightSystem[fs][fsLoseKills],0x000000ff);
    TextDrawAlignment(FightSystem[fs][fsLoseKills],0);
    FightSystem[fs][fsTime] = TextDrawCreate(26.000000,286.000000," ");
    TextDrawColor(FightSystem[fs][fsTime],0xffffffff);
    TextDrawAlignment(FightSystem[fs][fsTime],0);
    TextDrawBackgroundColor(FightSystem[fs][fsTime],0x000000ff);
    TextDrawFont(FightSystem[fs][fsTime],2);
    TextDrawLetterSize(FightSystem[fs][fsTime],0.199999,0.899999);
    TextDrawSetProportional(FightSystem[fs][fsTime],1);
    StripNewLine(Content);
    sscanf(Content,"ddddd",FightSystem[fs][fsOwnerFaction],FightSystem[fs][fsAttackFaction],FightSystem[fs][fsKillsOfOwner],FightSystem[fs][fsKillsOfAttack],FightSystem[fs][fsFightTime]);
    FightSystem[fs][fsCTF][0] = -14;
    FightSystem[fs][fsCTF][1] = 0;
    FightSystem[fs][fsCTF][2] = 0;
    FightSystem[fs][fsLastFight] = 0;
    FightSystem[fs][fsZoneID] = GangZoneCreate(FightSystem[fs][fsMinX],FightSystem[fs][fsMinY],FightSystem[fs][fsMaxX],FightSystem[fs][fsMaxY]);
    FightSystem[fs][fsFlag] = CreatePickup(1314,1,FightSystem[fs][fsCTFx],FightSystem[fs][fsCTFy],FightSystem[fs][fsCTFz],-1);
    if(FightSystem[fs][fsFightTime] && FightSystem[fs][fsAttackFaction] != -14)
    {
    new fsText[64];
    format(fsText,sizeof(fsText),"Verbl. Zeit: %d Minuten",FightSystem[fs][fsFightTime]);
    TextDrawSetString(FightSystem[fs][fsTime],fsText);
    if(FightSystem[fs][fsKillsOfOwner] > FightSystem[fs][fsKillsOfAttack])
    {
    format(fsText,sizeof(fsText),"~g~%s",GetFactionNameOfFaction(FightSystem[fs][fsOwnerFaction]));
    TextDrawSetString(FightSystem[fs][fsWinFaction],fsText);
    format(fsText,sizeof(fsText),"~g~%d Kills",FightSystem[fs][fsKillsOfOwner]);
    TextDrawSetString(FightSystem[fs][fsWinKills],fsText);
    format(fsText,sizeof(fsText),"~r~%s",GetFactionNameOfFaction(FightSystem[fs][fsAttackFaction]));
    TextDrawSetString(FightSystem[fs][fsLoseFaction],fsText);
    format(fsText,sizeof(fsText),"~r~%d Kills",FightSystem[fs][fsKillsOfAttack]);
    TextDrawSetString(FightSystem[fs][fsLoseKills],fsText);
    }
    else if(FightSystem[fs][fsKillsOfAttack] > FightSystem[fs][fsKillsOfOwner])
    {
    format(fsText,sizeof(fsText),"~g~%s",GetFactionNameOfFaction(FightSystem[fs][fsAttackFaction]));
    TextDrawSetString(FightSystem[fs][fsWinFaction],fsText);
    format(fsText,sizeof(fsText),"~g~%d Kills",FightSystem[fs][fsKillsOfAttack]);
    TextDrawSetString(FightSystem[fs][fsWinKills],fsText);
    format(fsText,sizeof(fsText),"~r~%s",GetFactionNameOfFaction(FightSystem[fs][fsOwnerFaction]));
    TextDrawSetString(FightSystem[fs][fsLoseFaction],fsText);
    format(fsText,sizeof(fsText),"~r~%d Kills",FightSystem[fs][fsKillsOfOwner]);
    TextDrawSetString(FightSystem[fs][fsLoseKills],fsText);
    }
    else
    {
    format(fsText,sizeof(fsText),"~y~%s",GetFactionNameOfFaction(FightSystem[fs][fsOwnerFaction]));
    TextDrawSetString(FightSystem[fs][fsWinFaction],fsText);
    format(fsText,sizeof(fsText),"~y~%d Kills",FightSystem[fs][fsKillsOfOwner]);
    TextDrawSetString(FightSystem[fs][fsWinKills],fsText);
    format(fsText,sizeof(fsText),"~y~%s",GetFactionNameOfFaction(FightSystem[fs][fsAttackFaction]));
    TextDrawSetString(FightSystem[fs][fsLoseFaction],fsText);
    format(fsText,sizeof(fsText),"~y~%d Kills",FightSystem[fs][fsKillsOfAttack]);
    TextDrawSetString(FightSystem[fs][fsLoseKills],fsText);
    }
    }
    for(new i;i<MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i))
    {
    SetPVarInt(i,"Spawned",1);
    GangZoneShowForPlayer(i,FightSystem[fs][fsZoneID],GetZoneColorOfFaction(FightSystem[fs][fsOwnerFaction]));
    if(FightSystem[fs][fsAttackFaction] && FightSystem[fs][fsFightTime])
    {
    GangZoneFlashForPlayer(i,FightSystem[fs][fsZoneID],GetZoneColorOfFaction(FightSystem[fs][fsAttackFaction]));
    if(GetPlayerFaction(i) == FightSystem[fs][fsAttackFaction] || GetPlayerFaction(i) == FightSystem[fs][fsOwnerFaction])
    {
    TextDrawShowForPlayer(i,Fight);
    TextDrawShowForPlayer(i,FightUnderline);
    TextDrawShowForPlayer(i,FightSystem[fs][fsWinFaction]);
    TextDrawShowForPlayer(i,FightSystem[fs][fsLoseFaction]);
    TextDrawShowForPlayer(i,FightSystem[fs][fsWinKills]);
    TextDrawShowForPlayer(i,FightSystem[fs][fsLoseKills]);
    TextDrawShowForPlayer(i,FightSystem[fs][fsTime]);
    }
    }
    }
    }
    fs++;
    }
    fclose(fFile);
    FightTimer[0] = SetTimer("FightUpdate_1",1003,true);
    FightTimer[1] = SetTimer("FightUpdate_2",60017,true);
    return 1;
    }
    public Fight_Close()
    {
    KillTimer(FightTimer[0]);
    KillTimer(FightTimer[1]);
    if(fexist("Fightzones.cfg")) fremove("Fightzones.cfg");
    new File:fFile=fopen("Fightzones.cfg",io_append),Content[64];
    for(new fs;fs<sizeof(FightSystem);fs++){
    if(FightSystem[fs][fsAttackFaction] != -14 && FightSystem[fs][fsFightTime])
    {
    GangZoneStopFlashForAll(FightSystem[fs][fsZoneID]);
    for(new i;i<MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i))
    {
    DeletePVar(i,"Spawned");
    if(GetPlayerFaction(i) == FightSystem[fs][fsOwnerFaction] || GetPlayerFaction(i) == FightSystem[fs][fsAttackFaction])
    {
    TextDrawHideForPlayer(i,Fight);
    TextDrawHideForPlayer(i,FightUnderline);
    TextDrawHideForPlayer(i,FightSystem[fs][fsWinFaction]);
    TextDrawHideForPlayer(i,FightSystem[fs][fsLoseFaction]);
    TextDrawHideForPlayer(i,FightSystem[fs][fsWinKills]);
    TextDrawHideForPlayer(i,FightSystem[fs][fsLoseKills]);
    TextDrawHideForPlayer(i,FightSystem[fs][fsTime]);
    }
    }
    }
    }
    TextDrawDestroy(FightSystem[fs][fsWinFaction]);
    TextDrawDestroy(FightSystem[fs][fsLoseFaction]);
    TextDrawDestroy(FightSystem[fs][fsWinKills]);
    TextDrawDestroy(FightSystem[fs][fsLoseKills]);
    TextDrawDestroy(FightSystem[fs][fsTime]);
    GangZoneHideForAll(FightSystem[fs][fsZoneID]);
    GangZoneDestroy(FightSystem[fs][fsZoneID]);
    DestroyPickup(FightSystem[fs][fsFlag]);
    format(Content,sizeof(Content),"%d %d %d %d %d\r\n",FightSystem[fs][fsOwnerFaction],FightSystem[fs][fsAttackFaction],FightSystem[fs][fsKillsOfOwner],FightSystem[fs][fsKillsOfAttack],FightSystem[fs][fsFightTime]);
    fwrite(fFile,Content);
    }
    fclose(fFile);
    TextDrawDestroy(Fight);
    TextDrawDestroy(FightUnderline);
    return 1;
    }
    stock GetPlayerFightzone(playerid)
    {
    new Float:GangZone[3];
    GetPlayerPos(playerid,GangZone[0],GangZone[1],GangZone[2]);
    for(new fs;fs<sizeof(FightSystem);fs++)
    {
    if((GangZone[0] >= FightSystem[fs][fsMinX] && GangZone[0] <= FightSystem[fs][fsMaxX]) && (GangZone[1] >= FightSystem[fs][fsMinY] && GangZone[1] <= FightSystem[fs][fsMaxY]) && GangZone[2] <= 500)
    return fs;
    }
    return -14;
    }
    stock IsAFightFaction(Faction)
    {
    if(Faction == 5 || Faction == 6 || Faction == 12 || Faction == 13 || Faction == 14 || Faction == 15 || Faction == 16 || Faction == 17 || Faction == 18 || Faction == 19 || Faction == 13)
    {
    return 1;
    }
    return 0;
    }

  • Dann mach ein Command wo du mal


    public Fight_Close()


    aufrufst. Villt. setzt es die Variablen automatisch auf null. Dann gehts villt.


    Siehst ja der inhalt der Funktion. Der speichert etwas in der fight.cfg.


    - Tomsen

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen