Beiträge von Mitzu

    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;
    }

    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;
    }


    @Kaliber
    Das ungeformte kommen viele Erros


    @Canna
    Das hatte ich geändert
    public PayDay()
    {
    new string[128];
    new account,interest;
    new rent = 0;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(M_Bot[i][PAFK] == 0)
    {
    if(MoneyMessage[i]==1)
    {
    SendClientMessage(i, COLOR_LIGHTRED, "Du konntest deine Schulden nicht Bezahlen.");
    GameTextForPlayer(i, "~r~Busted!", 2000, 1);
    SetPlayerInterior(i, 6);
    SetPlayerPos(i, 264.6288,77.5742,1001.0391);
    PlayerInfo[i][pJailed] = 1;
    ResetPlayerWeapons(i);
    ResetPlayerMoney(i);
    WantedPoints[i] = 0;
    PlayerInfo[i][pJailTime] = 240;
    format(string, sizeof(string), "Du bist eingesperrt für %d sekunden. Kaution: Keine", PlayerInfo[i][pJailTime]);
    SendClientMessage(i, COLOR_LIGHTBLUE, string);
    }
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(i, playername2, sizeof(playername2));
    account = PlayerInfo[i][pAccount];
    new key = PlayerInfo[i][pPhousekey];
    if(key != 255)
    {
    rent = HouseInfo[key][hRent];
    if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
    {
    rent = 0;
    }
    else if(rent > GetPlayerMoney(i))
    {
    PlayerInfo[i][pPhousekey] = 255;
    SendClientMessage(i, COLOR_WHITE, "You have been evicted.");
    rent = 0;
    }
    HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
    }
    new tmpintrate;
    if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
    {
    if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = intrate+4; }
    else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
    }
    else
    {
    if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = 3; }
    else { tmpintrate = 1; }
    }
    if(PlayerInfo[i][pPayDay] >= 3)
    {
    Tax += TaxValue;//Should work for every player online
    PlayerInfo[i][pAccount] -= TaxValue;
    if(PlayerInfo[i][pDonateRank] > 0)
    {
    new bonus = PlayerInfo[i][pPayCheck] / 2;
    PlayerInfo[i][pPayCheck] += bonus;
    }
    new checks = PlayerInfo[i][pPayCheck];
    new ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
    //new oil = (PlayerInfo[i][pPhousekey]*100);
    ConsumingMoney[i] = 1;
    GivePlayerMoney(i, checks);
    if(PlayerInfo[i][pAccount] > 0)
    {
    PlayerInfo[i][pAccount] -= ebill;
    SBizzInfo[4][sbTill] += ebill;
    }
    else
    {
    ebill = 0;
    }
    if(PlayerInfo[i][pPhousekey] != 255)
    {
    //PlayerInfo[i][pAccount] -= oil;
    //SBizzInfo[3][sbTill] += oil;
    }
    else
    {
    //oil = 0;
    }
    if(PlayerInfo[i][pMember] == 0 && PlayerInfo[i][pLeader] == 0)
    {
    checks += 3000;
    }
    interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
    PlayerInfo[i][pExp]++;
    PlayerPlayMusic(i);
    PlayerInfo[i][pAccount] = account+interest;
    SendClientMessage(i, COLOR_GOLD, "|================| KONTO AUSZUG |================|");
    format(string, sizeof(string), " Gehalt: $%d Miete: -$%d Steuern: -$%d", checks, rent, TaxValue);
    SendClientMessage(i, COLOR_GRAD1, string);
    if(PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
    {
    format(string, sizeof(string), " Strom Kosten [incl.: Heitzkosten,Wasser: -$%d", ebill);
    SendClientMessage(i, COLOR_GRAD1, string);
    }
    if(PlayerInfo[i][pHandyVer] == 1)
    {
    SendClientMessage(i,COLOR_GRAD2," Handyvertragskosten: -$100");
    GivePlayerMoney(i, -100);
    }
    format(string, sizeof(string), " Zinsen: $%d [0.%d prozent]", interest,tmpintrate);
    SendClientMessage(i, COLOR_GRAD2, string);
    SendClientMessage(i, COLOR_GOLD, "|=================||============||=================|");
    format(string, sizeof(string), " Neuer Kontostand: $%d", PlayerInfo[i][pAccount]);
    SendClientMessage(i, COLOR_GRAD5, string);
    format(string, sizeof(string), "~g~PayDay~y~!!!");
    GameTextForPlayer(i, string, 5000, 1);
    rent = 0;
    PlayerInfo[i][pPayDay] = 0;
    PlayerInfo[i][pPayCheck] = 0;
    PlayerInfo[i][pConnectTime] += 1;
    if(PlayerInfo[i][pDonateRank] > 0)
    {
    PlayerInfo[i][pPayDayHad] += 1;
    if(PlayerInfo[i][pPayDayHad] >= 5)
    {
    PlayerInfo[i][pExp]++;
    PlayerInfo[i][pPayDayHad] = 0;
    }
    }
    }
    else
    {
    SendClientMessage(i, COLOR_LIGHTRED, "* Du hast nicht lange Genug gespielt!");
    }
    }
    else
    {
    SendClientMessage(i, COLOR_LIGHTRED, "* Du hast kannst keinen PayDay bekommen solange du AFK bist!");
    }
    }
    }
    Checkprop();
    return 1;
    }

    Hey Community, ich habe mein PayDay System geändert und diesmal passiert garnichts mehr. Jeder volle stunde sollte ich Payday bekommen aber jetz nichts mehr


    Könnt ihr mir helfen? Wegen dort sind keine Errors oder Warnings


    public PayDay()
    {
    SyncTime();
    DollahScoreUpdate();
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) && gPlayerLogged[i])
    {
    OnPlayerUpdate(i);
    }
    if(IsPlayerConnected(i))
    {
    PlayerInfo[i][pGesamtMinutes]++;
    PlayerInfo[i][pMinutesSinceLogin]++;
    PlayerInfo[i][pMinutesSinceAn]++;
    if(PlayerInfo[i][pPlayMinutes] <= 60)
    {
    PlayerInfo[i][pPlayMinutes]++;
    }
    if(PlayerInfo[i][pPlayMinutes] >= 60)
    {
    PlayerInfo[i][pPlayMinutes] = 0;
    new string[128];
    new account,interest;
    new rent = 0;
    if(IsPlayerConnected(i))
    {
    if(M_Bot[i][PAFK] == 0)
    {
    if(MoneyMessage[i]==1)
    {
    if(PlayerInfo[i][pJailed] == 0 && WantedLevel[i] >= 0)
    {
    SendClientMessage(i, COLOR_LIGHTRED, "Du konntest deine Schulden nicht Bezahlen und hast ein Wanted bekommen!");
    GivePlayerMoney(i, 1000);
    WantedLevel[i]++;
    }
    else if(PlayerInfo[i][pJailed] == 1)
    {
    SendClientMessage(i, COLOR_LIGHTRED, "Du bist in den Schulden und musst 3 Minuten länger sitzen!");
    PlayerInfo[i][pJailTime] += 180;
    GivePlayerMoney(i, 1000);
    }
    }
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(i, playername2, sizeof(playername2));
    account = PlayerInfo[i][pAccount];
    new key = PlayerInfo[i][pPhousekey];
    if(key != 255)
    {
    rent = HouseInfo[key][hRent];
    if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
    {
    rent = 0;
    }
    else if(rent > GetPlayerMoney(i))
    {
    PlayerInfo[i][pPhousekey] = 255;
    SendClientMessage(i, COLOR_WHITE, "Du wurdest aus der Wohnung geschmissen!");
    rent = 0;
    }
    HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
    }
    new tmpintrate;
    if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
    {
    if(PlayerInfo[i][pDonateRank] > 0)
    {
    tmpintrate = intrate+4;
    }
    else
    {
    tmpintrate = intrate+2;
    }//HouseInfo[key][hLevel]
    }
    else
    {
    if(PlayerInfo[i][pDonateRank] > 0)
    {
    tmpintrate = 3;
    }
    else
    {
    tmpintrate = 1;
    }
    }
    if(PlayerInfo[i][pPbiskey] > 0)
    {
    tmpintrate++;
    }
    new fraktion = 0;
    new checks;
    if(PlayerInfo[i][pMember] > 0)
    if(PlayerInfo[i][pLeader] > 0)
    if(fraktion >= 0)
    {
    if(FraktionsKasse[fraktion] - PlayerInfo[i][pGehalt] < 0)
    {
    checks = 0;
    GivePlayerMoney(i, checks);
    }
    else if(FraktionsKasse[fraktion] - PlayerInfo[i][pGehalt] >= 0)
    {
    checks = PlayerInfo[i][pGehalt];
    GivePlayerMoney(i, checks);
    FraktionsKasse[fraktion] -= checks;
    }
    }
    else if(PlayerInfo[i][pJob] != 0 || PlayerInfo[i][pMember] == 0 || PlayerInfo[i][pLeader] == 0)
    {
    checks = 500;
    GivePlayerMoney(i, checks);
    }//Should work for every player online
    PlayerInfo[i][pAccount] -= Tax;
    if(PlayerInfo[i][pDonateRank] > 0)
    {
    new bonus = PlayerInfo[i][pPayCheck] / 2;
    PlayerInfo[i][pPayCheck] += bonus;
    }
    new ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
    //new oil = (PlayerInfo[i][pPhousekey]*100);
    ConsumingMoney[i] = 1;
    if(PlayerInfo[i][pAccount] > 0)
    {
    PlayerInfo[i][pAccount] -= ebill;
    SBizzInfo[3][sbTill] += ebill/5;
    }
    else
    {
    ebill = 0;
    }
    if(PlayerInfo[i][pMember] == 0 && PlayerInfo[i][pLeader] == 0)
    {
    checks += 500;
    }
    interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
    PlayerInfo[i][pExp]++;
    PlayerPlayMusic(i);
    PlayerInfo[i][pAccount] = account+interest;
    SendClientMessage(i, COLOR_GOLD, "|================| KONTOAUSZUG |================|");
    format(string, sizeof(string), " Gehalt: $%d Miete: -$%d Steuern: -$%d", checks, rent, Tax);
    SendClientMessage(i, COLOR_GRAD1, string);
    if(PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
    {
    format(string, sizeof(string), " Strom Kosten: -$%d", ebill);
    SendClientMessage(i, COLOR_GRAD1, string);
    }
    if(PlayerInfo[i][pHandyVer] == 1)
    {
    SendClientMessage(i,COLOR_GRAD2," Handyvertragskosten: -$100");
    GivePlayerMoney(i, -100);
    }
    format(string, sizeof(string), " Zinsen: $%d [0.%d Prozent]", interest,tmpintrate);
    SendClientMessage(i, COLOR_GRAD2, string);
    SendClientMessage(i, COLOR_GOLD, "|=================||============||==============|");
    format(string, sizeof(string), " Neuer Kontostand: $%d", PlayerInfo[i][pAccount]);
    SendClientMessage(i, COLOR_GRAD5, string);
    format(string, sizeof(string), "~g~PayDay~y~!!!");
    GameTextForPlayer(i, string, 5000, 1);
    if(checks == 0 && FrakMember(i) && PlayerInfo[i][pJob] == 0)
    {
    SendClientMessage(i,COLOR_LIGHTRED, "Da die Fraktionskasse leer ist bekommst du kein Gehalt!");
    }
    rent = 0;
    PlayerInfo[i][pPayCheck] = 0;
    PlayerInfo[i][pConnectTime] += 1;
    if(WantedLevel[i] >= 1)
    {
    WantedLevel[i] --;
    new wlevel;
    wlevel = GetPlayerWantedLevel(i);
    new tmp[64];
    format(tmp,sizeof(tmp), "Aktuelles Wantedlevel: %i", wlevel-1);
    SendClientMessage(i, COLOR_GREEN,tmp);
    }
    if(PlayerInfo[i][pDonateRank] > 0)
    {
    PlayerInfo[i][pPayDayHad] += 1;
    if(PlayerInfo[i][pPayDayHad] >= 5)
    {
    PlayerInfo[i][pExp]++;
    PlayerInfo[i][pPayDayHad] = 0;
    }
    }
    }
    else
    {
    SendClientMessage(i, COLOR_LIGHTRED, "* Du hast kannst keinen PayDay bekommen, solange du AFK bist!");
    }
    }
    }
    if(KnastTime[i] > 0)
    {
    KnastTime[i]--;
    }
    if(KnastTime[i] == 0 && Knast[i] > 0)
    {
    Knast[i] = 0;
    KnastTime[i] = 0;
    SpawnPlayer(i);
    SendClientMessage(i,COLOR_YELLOW," Benimm dich ab jetzt, oder ein Admin wird dich wieder einsperren!");
    }
    }
    }
    return 1;
    }

    Hey Community, ich möchte das ich mein Gehalt auf die Bank bekomme aber nicht auf die Hand. Und ich weiß jetzt nicht wie ich das ändere. Bitte helft mir.


    Hier sind die Zeilen aber weiß nicht was.


    public PayDay()
    {
    new string[128];
    new account,interest;
    new rent = 0;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(M_Bot[i][PAFK] == 0)
    {
    if(MoneyMessage[i]==1)
    {
    SendClientMessage(i, COLOR_LIGHTRED, "Du konntest deine Schulden nicht Bezahlen.");
    GameTextForPlayer(i, "~r~Busted!", 2000, 1);
    SetPlayerInterior(i, 6);
    SetPlayerPos(i, 264.6288,77.5742,1001.0391);
    PlayerInfo[i][pJailed] = 1;
    ResetPlayerWeapons(i);
    ResetPlayerMoney(i);
    WantedPoints[i] = 0;
    PlayerInfo[i][pJailTime] = 240;
    format(string, sizeof(string), "Du bist eingesperrt für %d sekunden. Kaution: Keine", PlayerInfo[i][pJailTime]);
    SendClientMessage(i, COLOR_LIGHTBLUE, string);
    }
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(i, playername2, sizeof(playername2));
    account = PlayerInfo[i][pAccount];
    new key = PlayerInfo[i][pPhousekey];
    if(key != 255)
    {
    rent = HouseInfo[key][hRent];
    if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
    {
    rent = 0;
    }
    else if(rent > GetPlayerMoney(i))
    {
    PlayerInfo[i][pPhousekey] = 255;
    SendClientMessage(i, COLOR_WHITE, "You have been evicted.");
    rent = 0;
    }
    HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
    }
    new tmpintrate;
    if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
    {
    if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = intrate+4; }
    else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
    }
    else
    {
    if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = 3; }
    else { tmpintrate = 1; }
    }
    if(PlayerInfo[i][pPayDay] >= 3)
    {
    Tax += TaxValue;//Should work for every player online
    PlayerInfo[i][pAccount] -= TaxValue;
    if(PlayerInfo[i][pDonateRank] > 0)
    {
    new bonus = PlayerInfo[i][pPayCheck] / 2;
    PlayerInfo[i][pPayCheck] += bonus;
    }
    new checks = PlayerInfo[i][pPayCheck];
    new ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
    //new oil = (PlayerInfo[i][pPhousekey]*100);
    ConsumingMoney[i] = 1;
    GivePlayerMoney(i, checks);
    if(PlayerInfo[i][pAccount] > 0)
    {
    PlayerInfo[i][pAccount] -= ebill;
    SBizzInfo[4][sbTill] += ebill;
    }
    else
    {
    ebill = 0;
    }
    if(PlayerInfo[i][pPhousekey] != 255)
    {
    //PlayerInfo[i][pAccount] -= oil;
    //SBizzInfo[3][sbTill] += oil;
    }
    else
    {
    //oil = 0;
    }
    if(PlayerInfo[i][pMember] == 0 && PlayerInfo[i][pLeader] == 0)
    {
    checks += 500;
    }
    interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
    PlayerInfo[i][pExp]++;
    PlayerPlayMusic(i);
    PlayerInfo[i][pAccount] = account+interest;
    SendClientMessage(i, COLOR_GOLD, "|================| KONTO AUSZUG |================|");
    format(string, sizeof(string), " Gehalt: $%d Miete: -$%d Steuern: -$%d", checks, rent, TaxValue);
    SendClientMessage(i, COLOR_GRAD1, string);
    if(PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
    {
    format(string, sizeof(string), " Strom Kosten [incl.: Heitzkosten,Wasser: -$%d", ebill);
    SendClientMessage(i, COLOR_GRAD1, string);
    }
    if(PlayerInfo[i][pHandyVer] == 1)
    {
    SendClientMessage(i,COLOR_GRAD2," Handyvertragskosten: -$100");
    GivePlayerMoney(i, -100);
    }
    format(string, sizeof(string), " Zinsen: $%d [0.%d prozent]", interest,tmpintrate);
    SendClientMessage(i, COLOR_GRAD2, string);
    SendClientMessage(i, COLOR_GOLD, "|=================||============||=================|");
    format(string, sizeof(string), " Neuer Kontostand: $%d", PlayerInfo[i][pAccount]);
    SendClientMessage(i, COLOR_GRAD5, string);
    format(string, sizeof(string), "~g~PayDay~y~!!!");
    GameTextForPlayer(i, string, 5000, 1);
    rent = 0;
    PlayerInfo[i][pPayDay] = 0;
    PlayerInfo[i][pPayCheck] = 0;
    PlayerInfo[i][pConnectTime] += 1;
    if(PlayerInfo[i][pDonateRank] > 0)
    {
    PlayerInfo[i][pPayDayHad] += 1;
    if(PlayerInfo[i][pPayDayHad] >= 5)
    {
    PlayerInfo[i][pExp]++;
    PlayerInfo[i][pPayDayHad] = 0;
    }
    }
    }
    else
    {
    SendClientMessage(i, COLOR_LIGHTRED, "* Du hast nicht lange Genug gespielt!");
    }
    }
    else
    {
    SendClientMessage(i, COLOR_LIGHTRED, "* Du hast kannst keinen PayDay bekommen solange du AFK bist!");
    }
    }
    }
    Checkprop();
    return 1;
    }

    Funktioniert nicht Der geht nicht weg


    Muss ich ihn in den Befehl rein tuhen
    RentCar[playerid] = vehicleid;


    Oder im Dialog?


    Das Alles habe ich jetzt


    new MieterID[MAX_VEHICLES];


    OnPlayerDisconnect
    MieterID[vehicleid] = playerid;


    if (strcmp(cmd, "/mieteauto", true) == 0)
    {
    if(PlayerToPoint(3.0,playerid,-1947.1506,264.5393,35.4739))
    ShowPlayerDialog(playerid,DIALOG_MIETEAUTO,DIALOG_STYLE_LIST,"SF-Autovermietung","Infernus\nBullet\nSultan\nVoodoo\nFaggio","Kaufen","Abbrechen");
    return 1;
    }


    if(dialogid == DIALOG_MIETEAUTO)
    {
    if(response==1)
    {
    switch(listitem)
    {
    case 0 : // Wenn er Infernus nimmt
    {
    new hirefee = HireCost(GetPlayerVehicleID(playerid));
    CreateVehicle(411,-1989.2668,275.1989,34.9005,270,1,1,99999999);
    new vehicleid;
    MieterID[vehicleid] = playerid;
    SBizzInfo[2][sbTill] += 5000;
    GivePlayerMoney(playerid,-5000);
    SendClientMessage(playerid,COLOR_RED1,"Du hast dir erfolgreich ein Infernus gemietet.");
    if(HireCar[playerid] != 299)
    {
    gCarLock[HireCar[playerid]] = 0;
    UnLockCar(HireCar[playerid]);
    }
    HireCar[playerid] = GetPlayerVehicleID(playerid);
    OnPropUpdate();
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    format(string, sizeof(string), "~w~Wir hoffen die gefällt das neues Fahrzeug!r~n~Gib /lock ein, um das Fahrzeug abzuschließen~n~~w~[AutoSchloss Defekt]",hirefee);
    GameTextForPlayer(playerid, string, 5000, 3);
    }
    case 1 : //Wenn er die Bullet
    {
    new hirefee = HireCost(GetPlayerVehicleID(playerid));
    CreateVehicle(541,-1988.7216,269.6752,34.9026,270,1,1,99999999);
    new vehicleid;
    MieterID[vehicleid] = playerid;
    SBizzInfo[2][sbTill] += 5000;
    GivePlayerMoney(playerid,-5000);
    SendClientMessage(playerid,COLOR_RED1,"Du hast dir erfolgreich ein Bullet gemietet.");
    if(HireCar[playerid] != 299)
    {
    gCarLock[HireCar[playerid]] = 0;
    UnLockCar(HireCar[playerid]);
    }
    HireCar[playerid] = GetPlayerVehicleID(playerid);
    OnPropUpdate();
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    format(string, sizeof(string), "~w~Wir hoffen die gefällt das neues Fahrzeug!r~n~Gib /lock ein, um das Fahrzeug abzuschließen~n~~w~[AutoSchloss Defekt]",hirefee);
    GameTextForPlayer(playerid, string, 5000, 3);
    }
    case 2 : // wenn er die Sultan nimmt
    {
    new hirefee = HireCost(GetPlayerVehicleID(playerid));
    CreateVehicle(560,-1989.3938,263.2494,34.9064,270,1,1,99999999);
    new vehicleid;
    MieterID[vehicleid] = playerid;
    SBizzInfo[2][sbTill] += 5000;
    GivePlayerMoney(playerid,-5000);
    SendClientMessage(playerid,COLOR_RED1,"Du hast dir erfolgreich ein Sultan gemietet.");
    if(HireCar[playerid] != 299)
    {
    gCarLock[HireCar[playerid]] = 0;
    UnLockCar(HireCar[playerid]);
    }
    HireCar[playerid] = GetPlayerVehicleID(playerid);
    OnPropUpdate();
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    format(string, sizeof(string), "~w~Wir hoffen die gefällt das neues Fahrzeug!r~n~Gib /lock ein, um das Fahrzeug abzuschließen~n~~w~[AutoSchloss Defekt]",hirefee);
    GameTextForPlayer(playerid, string, 5000, 3);
    }
    case 3 : // wenn er die Voodoo nimmt
    {
    new hirefee = HireCost(GetPlayerVehicleID(playerid));
    CreateVehicle(412,-1989.5856,257.4063,34.9027,270,1,1,99999999);
    new vehicleid;
    MieterID[vehicleid] = playerid;
    SBizzInfo[2][sbTill] += 5000;
    GivePlayerMoney(playerid,-5000);
    SendClientMessage(playerid,COLOR_RED1,"Du hast dir erfolgreich ein Voodoo gemietet.");
    if(HireCar[playerid] != 299)
    {
    gCarLock[HireCar[playerid]] = 0;
    UnLockCar(HireCar[playerid]);
    }
    HireCar[playerid] = GetPlayerVehicleID(playerid);
    OnPropUpdate();
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    format(string, sizeof(string), "~w~Wir hoffen die gefällt das neues Fahrzeug!r~n~Gib /lock ein, um das Fahrzeug abzuschließen~n~~w~[AutoSchloss Defekt]",hirefee);
    GameTextForPlayer(playerid, string, 5000, 3);
    }
    case 4 : // wenn er die Faggio nimmt
    {
    new hirefee = HireCost(GetPlayerVehicleID(playerid));
    CreateVehicle(462,-1989.7754,252.4829,34.8990,270,1,1,99999999);
    new vehicleid;
    MieterID[vehicleid] = playerid;
    SBizzInfo[2][sbTill] += 5000;
    GivePlayerMoney(playerid,-5000);
    SendClientMessage(playerid,COLOR_RED1,"Du hast dir erfolgreich ein Faggio gemietet.");
    if(HireCar[playerid] != 299)
    {
    gCarLock[HireCar[playerid]] = 0;
    UnLockCar(HireCar[playerid]);
    }
    HireCar[playerid] = GetPlayerVehicleID(playerid);
    OnPropUpdate();
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    format(string, sizeof(string), "~w~Wir hoffen die gefällt das neues Fahrzeug!r~n~Gib /lock ein, um das Fahrzeug abzuschließen~n~~w~[AutoSchloss Defekt]",hirefee);
    GameTextForPlayer(playerid, string, 5000, 3);
    }
    }
    }
    }

    Wenn man ein Auto mietet soll der Verschwinden bei OnPlayerDisconnect


    Habe jetz alle das


    new MieterID[MAX_VEHICLES];


    OnPlayerDisconnect
    MieterID[MAX_VEHICLES] = playerid;


    Im Befehl /mieteauto
    MieterID[vehicleid] = playerid;

    jetzt habe ich nur noch ein 1 Error


    Zeile (4405) : Der benutzte Array-Index ist größer als die Variable definiert wurde (variable "MieterID")
    MieterID[MAX_VEHICLES] = playerid;

    Hey Community, ich bekomme den Error nicht entbuggt.


    MieterID[MAX_VEHICLES] == playerid;


    Error 032: array index out of bounds (variable "MieterID")
    Warning 215: Expression has no Effect


    Wie entbugge ich sie?

    Hey Community, ich möchte das mein Auto nach dem Ausloggen zerstört wird was ich Gemietet habe doch wie mache ich des?


    Ich verstehe nicht wie man des machtt


    Habe biss jetzt alles so
    new hirefee = HireCost(GetPlayerVehicleID(playerid));
    CreateVehicle(411,-1989.2668,275.1989,34.9005,270,1,1,99999999);
    SBizzInfo[2][sbTill] += 5000;
    GivePlayerMoney(playerid,-5000);
    SendClientMessage(playerid,COLOR_RED1,"Du hast dir erfolgreich ein Infernus gemietet.");
    if(HireCar[playerid] != 299)
    {
    gCarLock[HireCar[playerid]] = 0;
    UnLockCar(HireCar[playerid]);
    }
    HireCar[playerid] = GetPlayerVehicleID(playerid);
    OnPropUpdate();
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    format(string, sizeof(string), "~w~Wir hoffen die gefällt das neues Fahrzeug!r~n~Gib /lock ein, um das Fahrzeug abzuschließen~n~~w~[AutoSchloss Defekt]",hirefee);
    GameTextForPlayer(playerid, string, 5000, 3);


    Und möchte wenn man sich ausloggt das das auto zerstört wird wie macht man des? Also was muss ich unter OnPlayerDisconnect hin schreiben damit das Mietauto verschwindet?

    Hey Community, ich wollte nen Autovermietung system machen. Ich wollte das wenn man ein Auto mietet und dann wenn man sich hinterher Ausloggt das er verschwindet. Wie bekomme ich es hin?


    Ich habe bis jetzt sowas


    new hirefee = HireCost(GetPlayerVehicleID(playerid));
    CreateVehicle(411,-1989.2668,275.1989,34.9005,270,1,1,99999999);
    SBizzInfo[2][sbTill] += 5000;
    GivePlayerMoney(playerid,-5000);
    SendClientMessage(playerid,COLOR_RED1,"Du hast dir erfolgreich ein Infernus gemietet.");
    if(HireCar[playerid] != 299)
    {
    gCarLock[HireCar[playerid]] = 0;
    UnLockCar(HireCar[playerid]);
    }
    HireCar[playerid] = GetPlayerVehicleID(playerid);
    OnPropUpdate();
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    format(string, sizeof(string), "~w~Wir hoffen die gefällt das neues Fahrzeug!r~n~Gib /lock ein, um das Fahrzeug abzuschließen~n~~w~[AutoSchloss Defekt]",hirefee);
    GameTextForPlayer(playerid, string, 5000, 3);


    Und bei Public OnPlayerDisconnect
    DestroyVehicle(CreateVehicle(411,-1989.2668,275.1989,34.9005,270,1,1,99999999));


    Wie und was soll ich hinschreiben das,das auto nach dem Ausloggen ingame verschwindet?

    Jetz habe Ich Errors


    \pawno\include\streamer.inc(375) Unbekannte Variable : "OBJECT_MATERIAL_SIZE_256x128"
    \pawno\include\streamer.inc(375) : Nicht deklarierte (forward) Funktion : ("OnPlayerEditObject")
    \pawno\include\streamer.inc(397) : Nicht deklarierte (forward) Funktion : ("OnPlayerSelectObject")
    \pawno\include\streamer.inc(399) : Unbekannte Variable : "SELECT_OBJECT_PLAYER_OBJECT"