Klammer Fehler <.<

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 leute ich habe Klammer Fehler entweder klamme rzu viel oder zu wenig aber ihc wies nit wo


    Hir Problem:


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    new Menu:CurrentMenu = GetPlayerMenu(playerid);
    if(CurrentMenu == OttoMenu)
    {
    switch(row)
    {
    case 0: //Bullet
    c
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 65000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(541,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -65000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 1: //Banshee
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 80000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(429,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -80000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 2: //Infernur
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 115000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(411,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -115000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 3: //Cheetah
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 135000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(415,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -135000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 4: //Turismo
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 140000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(451,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -140000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 5: //Super GT
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 150000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(506,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -150000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }}


    Thx Für hilfe

  • ich denke mal so



    public OnPlayerSelectedMenuRow(playerid, row)
    {
    new Menu:CurrentMenu = GetPlayerMenu(playerid);
    if(CurrentMenu == OttoMenu)
    {
    switch(row)
    {
    case 0: //Bullet
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 65000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(541,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -65000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    }
    case 1: //Banshee
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 80000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(429,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -80000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    }
    case 2: //Infernur
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 115000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(411,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -115000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    }
    case 3: //Cheetah
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 135000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(415,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -135000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    }
    case 4: //Turismo
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 140000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(451,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -140000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 5: //Super GT
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 150000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(506,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -150000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    }
    }
    }
    }
    }

    RFT

  • man erkennt das nicht so richtig weil du es nicht richtig eingerückt hast



    public OnPlayerSelectedMenuRow(playerid, row)
    {
    new Menu:CurrentMenu = GetPlayerMenu(playerid);
    if(CurrentMenu == OttoMenu)
    {
    switch(row)
    {
    case 0: //Bullet
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 65000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(541,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -65000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    }
    case 1: //Banshee
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 80000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(429,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -80000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    }
    case 2: //Infernur
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 115000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(411,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -115000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    }
    case 3: //Cheetah
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 135000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(415,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -135000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    }
    case 4: //Turismo
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 140000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(451,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -140000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 5: //Super GT
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 150000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(506,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -150000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    }
    }
    }
    }

    RFT

  • Immer Noch Klammer Fehler


    //edit


    kann keiner weiter helfen?

    Einmal editiert, zuletzt von Matze_Bellic ()

  • Seit dem ich Simples Autohaus Script das drinne habe und für mein carsystem geschriben habe habe ich 26 errors.


    Kannst mir schrrieb wie zu machen und wo?

    Einmal editiert, zuletzt von Matze_Bellic ()

  • Habe 7 Geschlossen <,<


    //edit


    geht trotz dem nicht , Kann mir Jemand Weiter helfen?

    2 Mal editiert, zuletzt von Matze_Bellic ()

  • public OnPlayerSelectedMenuRow(playerid, row)
    {
    new Menu:CurrentMenu = GetPlayerMenu(playerid);
    if(CurrentMenu == OttoMenu)
    {
    switch(row)
    {
    case 0: //Bullet
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 65000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(541,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -65000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 1: //Banshee
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 80000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(429,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -80000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 2: //Infernur
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 115000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(411,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -115000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 3: //Cheetah
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 135000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(415,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -135000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 4: //Turismo
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 140000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(451,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -140000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 5: //Super GT
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 150000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(506,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c)){
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -150000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }}


    und dann noch die klammern

  • //EDIT//


    ich machs jezz^^


    versuchs mal so..
    public OnPlayerSelectedMenuRow(playerid, row)
    {
    new Menu:CurrentMenu = GetPlayerMenu(playerid);
    if(CurrentMenu == OttoMenu)
    {
    switch(row)
    {
    case 0: //Bullet
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 65000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(541,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++)
    {
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c))
    {
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -65000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    }
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 1: //Banshee
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 80000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(429,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c))
    {
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -80000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    }
    }
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 2: //Infernur
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 115000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(411,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++)
    {
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c))
    {
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -115000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    }
    }
    }
    }
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 3: //Cheetah
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 135000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(415,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++)
    {
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c))
    {
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -135000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    }
    }
    }
    }
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 4: //Turismo
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 140000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(451,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++)
    {
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c))
    {
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -140000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    }
    }
    }
    }
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 5: //Super GT
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 150000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(506,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++)
    {
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c))
    {
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -150000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    }
    }
    }
    }
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    return 1;
    }

  • wenn das nciht gehtversuchs mal so:


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    new Menu:CurrentMenu = GetPlayerMenu(playerid);
    if(CurrentMenu == OttoMenu)
    {
    switch(row)
    {
    case 0: //Bullet
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 65000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(541,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++)
    {
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c))
    {
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -65000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 1: //Banshee
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 80000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(429,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++){
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c))
    {
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -80000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    }
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 2: //Infernur
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 115000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(411,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++)
    {
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c))
    {
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -115000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    }
    }
    }
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 3: //Cheetah
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 135000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(415,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++)
    {
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c))
    {
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -135000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    }
    }
    }
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 4: //Turismo
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 140000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(451,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++)
    {
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c))
    {
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -140000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    }
    }
    }
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    case 5: //Super GT
    {
    if (IsPlayerConnected(playerid))
    {
    if (GetPlayerMoney(playerid) >= 150000)
    {
    new c[20];
    vehicleid10 = CreateVehicle(506,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
    for(new i=0; i<1000; i++)
    {
    format(c,sizeof(c),"cars/%d.ini",i);
    if(!dini_Exists(c))
    {
    dini_Create(c);
    dini_IntSet(c,"id",id);
    dini_FloatSet(c,"x",-2218.0332);
    dini_FloatSet(c,"y",2426.9214);
    dini_FloatSet(c,"z",1.7144);
    dini_FloatSet(c,"angel",135.2682);
    dini_FloatSet(c,"health",1000.0000);
    dini_IntSet(c,"cid",-1);
    dini_IntSet(c,"cid2",-1);
    dini_Set(c,"besitzer",name);
    dini_IntSet(c,name,2);
    dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
    dini_Set(c, "plate", "OttoCars");
    SetVehicleNumberPlate(vehicleid10, "OttoCars");
    format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
    SendClientMessage(playerid,green,string);
    format(vehicle[vehicleid10],20,"%s",c);
    GivePlayerMoney(playerid, -150000);
    SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
    }
    }
    }
    }
    }
    else
    {
    SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
    }
    return 1;
    }


    Black,


    wie meinst du cdas?^^

  • Thx aber habe ander problem:


    Zitat

    C:\DOKUME~1\Jambo\Desktop\GAMEMO~1\reallife.pwn(859) : error 017: undefined symbol "id"


    Das Zeile : dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));

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