Beiträge von PaveLow25

    public SaveFillstations(bool:destroy){
    new File:fsFile=fopen("Fillstations.cfg",io_write),Content[256];
    for(new fs;fs<sizeof(Fillstation);fs++){
    if(Fillstation[fs][fsCreated]){
    format(Content,sizeof(Content),"%.3f %.3f %.3f %d %s %d %d %d %d %d\r\n",
    Fillstation[fs][fsPos][0],
    Fillstation[fs][fsPos][1],
    Fillstation[fs][fsPos][2],
    Fillstation[fs][fsBuyed],
    Fillstation[fs][fsOwner],
    Fillstation[fs][fsPrice],
    Fillstation[fs][fsLevel],
    Fillstation[fs][fsBank],
    Fillstation[fs][fsProducts],
    Fillstation[fs][fPrice]);
    fwrite(fsFile,Content);
    if(destroy == true){
    DestroyPickup(Fillstation[fs][fsPickup]);
    Delete3DTextLabel(Fillstation[fs][fsLabel]);
    }
    }
    }fclose(fsFile);
    return true;
    }



    Dan Hier oder ?


    Aber die cfg gibt es in Scriptfiles.

    if(!strcmp(cmdtext,"/buytanke",true)){
    for(new fs;fs<sizeof(Fillstation);fs++){
    if(Fillstation[fs][fsCreated]){
    if(IsPlayerInRangeOfPoint(playerid,12.5,Fillstation[fs][fsPos][0],Fillstation[fs][fsPos][1],Fillstation[fs][fsPos][2])){
    if(!Fillstation[fs][fsBuyed]){
    if(GetPlayerScore(playerid) < Fillstation[fs][fsLevel])
    return SendClientMessage(playerid,Farbe_Grau,"Du hast nicht das benötigte Level um dir die Tankstelle kaufen zu dürfen.");
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
    for(new cfs;cfs<sizeof(Fillstation);cfs++){
    if(Fillstation[cfs][fsCreated] && Fillstation[cfs][fsBuyed]){
    if(!strcmp(Fillstation[cfs][fsOwner],Name,false))
    return SendClientMessage(playerid,Farbe_Grau,"Du besitzt bereits eine Tankstelle!");
    }
    }
    if(GetPlayerMoney(playerid) < Fillstation[fs][fsPrice])
    return SendClientMessage(playerid,Farbe_Grau,"Du hast nicht genügend Geld um dir diese Tankstelle zu kaufen.");
    GivePlayerMoney(playerid,-Fillstation[fs][fsPrice]);
    Fillstation[fs][fsBuyed] = true;
    format(Fillstation[fs][fsOwner],MAX_PLAYER_NAME,Name);
    Fillstation[fs][fPrice] = 10;
    format(Text,sizeof(Text),"{FFFFFF}|---------- Tankstelle ----------|{6EF83C}\nInhaber: %s\nPreis pro Liter: $%d\n{FFFFFF}|--------------------------------|",Fillstation[fs][fsOwner],Fillstation[fs][fPrice]);
    Update3DTextLabelText(Fillstation[fs][fsLabel],0xFFFFFFFF,Text);
    DestroyPickup(Fillstation[fs][fsPickup]);
    Fillstation[fs][fsPickup] = CreatePickup(1239,1,Fillstation[fs][fsPos][0],Fillstation[fs][fsPos][1],Fillstation[fs][fsPos][2],-1);
    format(Text,sizeof(Text),"Glückwunsch! Du hast dir die Tankstelle für $%d gekauft.",Fillstation[fs][fsPrice]);
    SendClientMessage(playerid,Farbe_Weiß,Text);
    }else SendClientMessage(playerid,Farbe_Grau,"Diese Tankstelle ist bereits verkauft.");
    return true;
    }
    }
    }return true;

    if(!strcmp(cmdtext,"/buytanke",true)){
    for(new fs;fs<sizeof(Fillstation);fs++){
    if(Fillstation[fs][fsCreated]){
    if(IsPlayerInRangeOfPoint(playerid,12.5,Fillstation[fs][fsPos][0],Fillstation[fs][fsPos][1],Fillstation[fs][fsPos][2])){
    if(!Fillstation[fs][fsBuyed]){
    if(GetPlayerScore(playerid) < Fillstation[fs][fsLevel])
    return SendClientMessage(playerid,Farbe_Grau,"Du hast nicht das benötigte Level um dir die Tankstelle kaufen zu dürfen.");
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
    for(new cfs;cfs<sizeof(Fillstation);cfs++){
    if(Fillstation[cfs][fsCreated] && Fillstation[cfs][fsBuyed]){
    if(!strcmp(Fillstation[cfs][fsOwner],Name,false))
    return SendClientMessage(playerid,Farbe_Grau,"Du besitzt bereits eine Tankstelle!");
    }
    }
    if(GetPlayerMoney(playerid) < Fillstation[fs][fsPrice])
    return SendClientMessage(playerid,Farbe_Grau,"Du hast nicht genügend Geld um dir diese Tankstelle zu kaufen.");
    GivePlayerMoney(playerid,-Fillstation[fs][fsPrice]);
    Fillstation[fs][fsBuyed] = true;
    format(Fillstation[fs][fsOwner],MAX_PLAYER_NAME,Name);
    Fillstation[fs][fPrice] = 10;
    format(Text,sizeof(Text),"{FFFFFF}|---------- Tankstelle ----------|{6EF83C}\nInhaber: %s\nPreis pro Liter: $%d\n{FFFFFF}|--------------------------------|",Fillstation[fs][fsOwner],Fillstation[fs][fPrice]);
    Update3DTextLabelText(Fillstation[fs][fsLabel],0xFFFFFFFF,Text);
    DestroyPickup(Fillstation[fs][fsPickup]);
    Fillstation[fs][fsPickup] = CreatePickup(1239,1,Fillstation[fs][fsPos][0],Fillstation[fs][fsPos][1],Fillstation[fs][fsPos][2],-1);
    format(Text,sizeof(Text),"Glückwunsch! Du hast dir die Tankstelle für $%d gekauft.",Fillstation[fs][fsPrice]);
    SendClientMessage(playerid,Farbe_Weiß,Text);
    }else SendClientMessage(playerid,Farbe_Grau,"Diese Tankstelle ist bereits verkauft.");
    return true;
    }
    }
    }return true;





    Bitte um Hilfe.

    Also ahbe 2 Errors


    (420) : error 029: invalid expression, assumed zero
    (420) : error 008: must be a constant expression; assumed zero



    Die Zeile );


    Das ganze sieht so aus




    new FactionBuylist[][fBuylist] = {
    {541,311.5421,-1809.7397,4.0967,1.4731,6500000}, // 6.5mio bullet
    {411,314.6724,-1809.3086,4.3438,2.0609,11000000}, // 11.5mio infi
    {415,318.0206,-1809.3683,4.2342,0.7033,5500000}, // 5.5mio cheater
    {451,321.1971,-1809.0354,4.2024,0.1529,11000000}, // 11 mio turi
    {534,324.5483,-1809.2761,4.2288,359.7624,2000000}, // 2mio rem
    {560,327.7537,-1809.1775,4.1982,0.2850,8000000}, // 8 sultan
    {579,330.8821,-1808.9773,4.4905,1.0357,2000000}, // 2mio hunter
    {567,334.1412,-1808.9242,4.3977,0.1912,900000}, // 900 k savanna
    {600,337.3655,-1809.0005,4.2613,0.1776,900000}, // 900 k pic
    {545,340.6000,-1809.5481,4.2616,1.2969,6000000}, // 6mio hustler
    {536,343.8432,-1808.7662,4.3214,0.5869,900000}, // 900 k blade
    {480,347.1766,-1809.3268,4.2974,1.2499,900000}, // 900 k comet
    {565,350.2997,-1809.6942,4.1499,359.4723,6000000}, // 6mio flash
    {409,353.2924,-1808.2535,4.3672,359.6978,200000000}, // 200 mio limo
    {455,357.3555,-1808.5867,4.9926,359.9172,500000000}, // 500 mio flat
    {581,360.8442,-1800.5353,4.3423,48.5432,1000000}, // 1mio bike
    {468,360.9954,-1797.3632,4.5072,48.9232,600000}, // 600k bike
    {521,361.0014,-1794.5046,4.4959,46.8389,600000}, // 600k bike
    {461,360.6547,-1790.9974,4.6656,53.3681,600000}, // 600k bike
    {463,360.7623,-1788.0146,4.7703,55.9532,600000}, // 600k bike
    {580,319.1110,-1789.5333,4.5145,178.8756,600000}, // 600k auto
    {482,315.1005,-1789.3464,4.7828,180.7355,600000}, // 600k auto
    {467,311.7979,-1789.7543,4.3124,179.3561,600000}, // 600k auto
    );