| Carkey - Problem (ERROR) |

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
  • Sofern nicht alle Fahrzeuge identisch sind, musst du die Farbe natürlich auch pro Slot speichern.
    Schau dir doch mal die Codes an die ich dir gegeben habe und versuche das zu übernehmen.


    Ein Spieler hat 5 Fahrzeuge, jedes dieser Fahrzeuge hat eine Farbe, somit brauchst du auch dort Zugriff auf den Slot in dem sich das Fahrzeug befindet.

  • Ja. Alles.


    Ich habe es hier eingefügt:


    public OnPlayerConnect(playerid)
    {
    new dateiname[MAX_PLAYER_NAME+25];
    new playername[MAX_PLAYER_NAME+25];
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Typ]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][X]=0.0; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Y]=0.0; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Z]=0.0;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Rotation]=0.0; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Status]=0; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Lock]=0; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Carid]=-1;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Farbe1]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Farbe2]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod1]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod2]=-1;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod3]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod4]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod5]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod6]=-1;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod7]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod8]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod9]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod10]=-1;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod11]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod12]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod13]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod14]=-1;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod15]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod16]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod17]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Paintjob]=-1;
    Spectating[playerid][0]=-1;
    #if defined CARSELL
    bietetAn[playerid]={-1,0};
    #endif
    GetPlayerName(playerid, playername, sizeof(playername));
    format(dateiname, sizeof(dateiname), "/GekaufteFahrzeuge/%s.car", playername);
    if (fexist(dateiname))
    {
    new File: CarFile = fopen(dateiname, io_read);
    if ( CarFile )
    {
    new key[ 256 ];
    new Data[ 256 ];
    while ( fread( CarFile , Data , sizeof( Data ) ) )
    {
    key = ini_GetKey(Data);
    if(strcmp(key,"AH_Typ",true)==0) { Carlist[playerid][s][Typ]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_X",true)==0) { Carlist[playerid][s][X]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Y",true)==0) { Carlist[playerid][s][Y]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Z",true)==0) { Carlist[playerid][s][Z]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Rot",true)==0) { Carlist[playerid][s][Rotation]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Status",true)==0) { Carlist[playerid][s][Status]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Lock",true)==0) { Carlist[playerid][s][Lock]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Paintjob",true)==0) { Carlist[playerid][s][Paintjob]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Farbe1",true)==0) { Carlist[playerid][s][Farbe1]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Farbe2",true)==0) { Carlist[playerid][s][Farbe2]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod1",true)==0) { Carlist[playerid][s][mod1]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod2",true)==0) { Carlist[playerid][s][mod2]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod3",true)==0) { Carlist[playerid][s][mod3]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod4",true)==0) { Carlist[playerid][s][mod4]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod5",true)==0) { Carlist[playerid][s][mod5]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod6",true)==0) { Carlist[playerid][s][mod6]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod7",true)==0) { Carlist[playerid][s][mod7]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod8",true)==0) { Carlist[playerid][s][mod8]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod9",true)==0) { Carlist[playerid][s][mod9]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod10",true)==0) { Carlist[playerid][s][mod10]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod11",true)==0) { Carlist[playerid][s][mod11]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod12",true)==0) { Carlist[playerid][s][mod12]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod13",true)==0) { Carlist[playerid][s][mod13]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod14",true)==0) { Carlist[playerid][s][mod14]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod15",true)==0) { Carlist[playerid][s][mod15]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod16",true)==0) { Carlist[playerid][s][mod16]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod17",true)==0) { Carlist[playerid][s][mod17]=strval(ini_GetValue(Data)); }
    }
    }
    fclose(CarFile);
    if(Carlist[playerid][s][Typ]!=-1 && Carlist[playerid][s][Status]==1)
    {
    Carlist[playerid][s][Carid]=CreateTunedCar(playerid);
    }
    }
    SetTimerEx("DelaySetVehicleParams",10000,0,"i",playerid);
    return 1;
    }


    Ich bekomme jetzt Errors das s noch nicht definet ist



    Jeffry

  • public OnPlayerConnect(playerid)
    {
    new dateiname[MAX_PLAYER_NAME+25];
    new playername[MAX_PLAYER_NAME+25];
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    Carlist[playerid][s][Typ]=-1; Carlist[playerid][s][X]=0.0; Carlist[playerid][s][Y]=0.0; Carlist[playerid][s][Z]=0.0;
    Carlist[playerid][s][Rotation]=0.0; Carlist[playerid][s][Status]=0; Carlist[playerid][s][Lock]=0; Carlist[playerid][s][Carid]=-1;
    Carlist[playerid][s][Farbe1]=-1; Carlist[playerid][s][Farbe2]=-1; Carlist[playerid][s][mod1]=-1; Carlist[playerid][s][mod2]=-1;
    Carlist[playerid][s][mod3]=-1; Carlist[playerid][s][mod4]=-1; Carlist[playerid][s][mod5]=-1; Carlist[playerid][s][mod6]=-1;
    Carlist[playerid][s][mod7]=-1; Carlist[playerid][s][mod8]=-1; Carlist[playerid][s][mod9]=-1; Carlist[playerid][s][mod10]=-1;
    Carlist[playerid][s][mod11]=-1; Carlist[playerid][s][mod12]=-1; Carlist[playerid][s][mod13]=-1; Carlist[playerid][s][mod14]=-1;
    Carlist[playerid][s][mod15]=-1; Carlist[playerid][s][mod16]=-1; Carlist[playerid][s][mod17]=-1; Carlist[playerid][s][Paintjob]=-1;
    }
    Spectating[playerid][0]=-1;
    #if defined CARSELL
    bietetAn[playerid]={-1,0};
    #endif
    GetPlayerName(playerid, playername, sizeof(playername));
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    format(dateiname, sizeof(dateiname), "/GekaufteFahrzeuge/%s%d.car", playername,s);
    if (fexist(dateiname))
    {
    new File: CarFile = fopen(dateiname, io_read);
    if ( CarFile )
    {
    new key[ 256 ];
    new Data[ 256 ];
    while ( fread( CarFile , Data , sizeof( Data ) ) )
    {
    key = ini_GetKey(Data);
    if(strcmp(key,"AH_Typ",true)==0) { Carlist[playerid][s][Typ]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_X",true)==0) { Carlist[playerid][s][X]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Y",true)==0) { Carlist[playerid][s][Y]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Z",true)==0) { Carlist[playerid][s][Z]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Rot",true)==0) { Carlist[playerid][s][Rotation]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Status",true)==0) { Carlist[playerid][s][Status]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Lock",true)==0) { Carlist[playerid][s][Lock]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Paintjob",true)==0) { Carlist[playerid][s][Paintjob]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Farbe1",true)==0) { Carlist[playerid][s][Farbe1]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Farbe2",true)==0) { Carlist[playerid][s][Farbe2]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod1",true)==0) { Carlist[playerid][s][mod1]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod2",true)==0) { Carlist[playerid][s][mod2]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod3",true)==0) { Carlist[playerid][s][mod3]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod4",true)==0) { Carlist[playerid][s][mod4]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod5",true)==0) { Carlist[playerid][s][mod5]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod6",true)==0) { Carlist[playerid][s][mod6]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod7",true)==0) { Carlist[playerid][s][mod7]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod8",true)==0) { Carlist[playerid][s][mod8]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod9",true)==0) { Carlist[playerid][s][mod9]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod10",true)==0) { Carlist[playerid][s][mod10]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod11",true)==0) { Carlist[playerid][s][mod11]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod12",true)==0) { Carlist[playerid][s][mod12]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod13",true)==0) { Carlist[playerid][s][mod13]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod14",true)==0) { Carlist[playerid][s][mod14]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod15",true)==0) { Carlist[playerid][s][mod15]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod16",true)==0) { Carlist[playerid][s][mod16]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod17",true)==0) { Carlist[playerid][s][mod17]=strval(ini_GetValue(Data)); }
    }
    }
    fclose(CarFile);
    if(Carlist[playerid][s][Typ]!=-1 && Carlist[playerid][s][Status]==1)
    {
    Carlist[playerid][s][Carid]=CreateTunedCar(playerid);
    }
    }
    }
    SetTimerEx("DelaySetVehicleParams",10000,0,"i",playerid);
    return 1;
    }

  • Jeffry


    Muss ich jetzt auch bei


    public OnVehicleDeath(vehicleid, killerid)
    {
    new i;
    for(i=0; i<MAX_PLAYERS; i++)
    {
    if(Carlist[i][s][Carid]==vehicleid)
    {
    SetTimerEx("DelayDestroyCar",3000,0,"i",i);
    return 1;
    }
    }
    return 1;
    }


    die schleife einfügen?
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)

  • Jeffry


    Ich bekomme hier 4 Errors:


    [pwn=831]
    if(strcmp(cmd, "/carkey", true) == 0)
    {
    if(MaxVeh[playerid] > 1)
    {
    CarKey[playerid] += 1;
    if(CarKey[playerid] == MaxVeh[playerid])
    {
    CarKey[playerid] = 0;
    }
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    if(Carlist[playerid][s][CarKey[playerid]][Typ] != -1)
    {
    new index = -1;
    for(new i=0; i<sizeof(Kaufliste); i++)
    {
    if(Kaufliste[i][Modelid] == Carlist[playerid][s][CarKey[playerid]][Typ])
    {
    index = i;
    break;
    }
    }
    if(index == -1) format(string, sizeof(string), "Du nimmst deinen %dten Auto-Schlüssel, für deinen <unbekannt> !", CarKey[playerid]+1);
    else format(string, sizeof(string), "Du nimmst deinen %dten Auto-Schlüssel, für deinen %s !", CarKey[playerid]+1, Kaufliste[index][Name]);
    }
    else
    {
    format(string, sizeof(string), "Du nimmst deinen %dten Auto-Schlüssel !",CarKey[playerid]+1);
    }
    SendClientMessage(playerid,COLOR_YELLOW,string);
    }
    }
    return 1;
    }
    [/pwn]



    Errors:


    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(842) : warning 213: tag mismatch
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(842) : error 001: expected token: ")", but found "["
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(842) : error 029: invalid expression, assumed zero
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(842) : warning 215: expression has no effect
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(842) : error 001: expected token: ";", but found "]"
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(842) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.

  • Beitrag von James.Spader ()

    Dieser Beitrag wurde gelöscht, Informationen über den Löschvorgang sind nicht verfügbar.
  • Ich bekomme hier errors:



    GetPlayerFromCarlistCar(carid, &pid, &slot)
    {
    for(new i=0; i<sizeof(Carlist); i++)
    {
    for(new j=0; j<sizeof(Carlist[]); j++)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    if(Carlist[i][s][j][Carid]==carid)
    {
    pid = i;
    slot = j;
    return 1;
    }
    }
    }
    }
    return -1;
    }


    Errors:


    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(510) : warning 213: tag mismatch
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(510) : error 001: expected token: ")", but found "["
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(510) : error 029: invalid expression, assumed zero
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(510) : error 091: ambiguous constant; tag override is required (symbol "Carid")
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(510) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.

  • Ich habe eben j anstatt s verwendet.


    So, ich habe es jetzt so gemacht:



    GetPlayerFromCarlistCar(carid, &pid, &slot)
    {
    for(new i=0; i<sizeof(Carlist); i++)
    {
    for(new s=0; s<sizeof(Carlist[]); s++)
    {
    if(Carlist[i][s][Carid]==carid)
    {
    pid = i;
    slot = s;
    return 1;
    }
    }
    }
    return -1;
    }



    Ich bekomme jedoch nun 1 Error und warnings.


    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1055) : warning 202: number of arguments does not match definition
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1055) : warning 202: number of arguments does not match definition
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1089) : warning 202: number of arguments does not match definition
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1089) : warning 202: number of arguments does not match definition
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1102) : warning 202: number of arguments does not match definition
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1102) : warning 202: number of arguments does not match definition
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1155) : warning 209: function "CreateTunedCar" should return a value
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1167) : warning 209: function "DelayDestroyCar" should return a value
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1177) : error 091: ambiguous constant; tag override is required (symbol "Carid")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.


    Die Zeilen:


    Spoiler anzeigen
    [pwn=1053]
    public OnVehicleMod(playerid,vehicleid,componentid)
    {
    if (playerid!=GetPlayerFromCarlistCar(vehicleid)) {return 1;}
    if(playerid!=-1)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    new mod=GetModType(componentid);
    switch (mod)
    {
    case 1: { Carlist[playerid][s][mod1]=componentid; }
    case 2: { Carlist[playerid][s][mod2]=componentid; }
    case 3: { Carlist[playerid][s][mod3]=componentid; }
    case 4: { Carlist[playerid][s][mod4]=componentid; }
    case 5: { Carlist[playerid][s][mod5]=componentid; }
    case 6: { Carlist[playerid][s][mod6]=componentid; }
    case 7: { Carlist[playerid][s][mod7]=componentid; }
    case 8: { Carlist[playerid][s][mod8]=componentid; }
    case 9: { Carlist[playerid][s][mod9]=componentid; }
    case 10: { Carlist[playerid][s][mod10]=componentid; }
    case 11: { Carlist[playerid][s][mod11]=componentid; }
    case 12: { Carlist[playerid][s][mod12]=componentid; }
    case 13: { Carlist[playerid][s][mod13]=componentid; }
    case 14: { Carlist[playerid][s][mod14]=componentid; }
    case 15: { Carlist[playerid][s][mod15]=componentid; }
    case 16: { Carlist[playerid][s][mod16]=componentid; }
    case 17: { Carlist[playerid][s][mod17]=componentid; }
    default: { new string[128]; format(string,128,"Unbekannte Komponentenid: %i",componentid); print(string); }
    }
    }
    }
    return 1;
    }[/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]
    [/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]public OnVehiclePaintjob(playerid,vehicleid, paintjobid)
    {
    if (playerid!=GetPlayerFromCarlistCar(vehicleid)) {return 1;}
    if(playerid!=-1)
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    {
    Carlist[playerid][s][Paintjob]=paintjobid;
    }
    }
    return 1;
    }[/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]
    [/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]public OnVehicleRespray(playerid,vehicleid, color1, color2)
    {
    if (playerid!=GetPlayerFromCarlistCar(vehicleid)) {return 1;}
    if(playerid!=-1)
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    {
    Carlist[playerid][s][Farbe1]=color1;
    Carlist[playerid][s][Farbe2]=color2;
    }
    }
    return 1;
    }[/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]
    [/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]public SetVehicleParamsForAll(carid,objective,doorslocked)
    {
    new i;
    for(i=0; i<MAX_PLAYERS; i++) { SetVehicleParamsForPlayer(carid,i,objective,doorslocked); }
    }[/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]
    [/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]public CreateTunedCar(playerid)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    if(IsPlayerConnected(playerid) && Carlist[playerid][s][Typ]!=-1)
    {
    new carid=CreateVehicle(Kaufliste[Carlist[playerid][s][Typ]][Modelid],Carlist[playerid][s][X],Carlist[playerid][s][Y],Carlist[playerid][s][Z],Carlist[playerid][s][Rotation],-1,-1,-1);
    if(Carlist[playerid][s][Lock]==1)
    {
    SetVehicleParamsForAll(carid,0,1);
    SetVehicleParamsForPlayer(carid,playerid,0,0);
    }
    if(Carlist[playerid][s][mod1]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod1]); }
    if(Carlist[playerid][s][mod2]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod2]); }
    if(Carlist[playerid][s][mod3]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod3]); }
    if(Carlist[playerid][s][mod4]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod4]); }
    if(Carlist[playerid][s][mod5]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod5]); }
    if(Carlist[playerid][s][mod6]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod6]); }
    if(Carlist[playerid][s][mod7]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod7]); }
    if(Carlist[playerid][s][mod8]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod8]); }
    if(Carlist[playerid][s][mod9]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod9]); }
    if(Carlist[playerid][s][mod10]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod10]); }
    if(Carlist[playerid][s][mod11]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod11]); }
    if(Carlist[playerid][s][mod12]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod12]); }
    if(Carlist[playerid][s][mod13]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod13]); }
    if(Carlist[playerid][s][mod14]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod14]); }
    if(Carlist[playerid][s][mod15]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod15]); }
    if(Carlist[playerid][s][mod16]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod16]); }
    if(Carlist[playerid][s][mod17]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod17]); }
    if(Carlist[playerid][s][Paintjob]!=-1) { ChangeVehiclePaintjob(carid,Carlist[playerid][s][Paintjob]); }
    if(Carlist[playerid][s][Farbe1]!=-1) { ChangeVehicleColor(carid,Carlist[playerid][s][Farbe1],Carlist[playerid][s][Farbe2]); }
    return carid;
    }
    return -1;
    }
    }[/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]
    [/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]public DelayDestroyCar(playerid)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    SetVehicleParamsForAll(Carlist[playerid][s][Carid],0,0);
    DestroyVehicle(Carlist[playerid][s][Carid]);
    Carlist[playerid][s][Status]=0;
    Carlist[playerid][s][Carid]=-1;
    return 1;
    }
    }[/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]
    [/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]public DelaySetVehicleParams(playerid)
    {
    if(!IsPlayerConnected(playerid)) { return 0; }
    new i;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    for(i=0; i<MAX_PLAYERS; i++)
    {
    if(Carlist[i][s][Carid]!=-1 && Carlist[i][s][Lock]==1) { SetVehicleParamsForPlayer(Carlist[i][Carid],playerid,0,1); }
    if(Spectating[i][0]!=-1) { SetVehicleParamsForPlayer(Kaufliste[Spectating[i][0]][Carid],playerid,0,1); }
    }
    }
    return 1;
    }
    [/pwn][/expander] [/expander] [/expander]

  • GetPlayerFromCarlistCar(vehicleid)


    zu:
    GetPlayerFromCarlistCar(vehicleid, playerid, s)



    Sähe bei einer if-Abfrage dann so aus:
    if (playerid!=GetPlayerFromCarlistCar(vehicleid)) {return 1;}


    zu:
    new s, pid, check;
    check = GetPlayerFromCarlistCar(vehicleid, pid, s);
    if(playerid != pid || check == -1) return 1;


    Außerdem muss zum Beispiel bei OnVehicleMode die Schleife weg. Warum? Weil du nicht alle Fahrzeugslots änderst, sondern nur einen. Den bekommst du über GetPlayerFromCarlistCar geliefert.

  • Bekomme immer noch Warnings und Errors:


    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1060) : warning 219: local variable "s" shadows a variable at a preceding level
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1095) : warning 219: local variable "s" shadows a variable at a preceding level
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1110) : warning 219: local variable "s" shadows a variable at a preceding level
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1161) : warning 209: function "CreateTunedCar" should return a value
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1173) : warning 209: function "DelayDestroyCar" should return a value
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1183) : error 091: ambiguous constant; tag override is required (symbol "Carid")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.


    [pwn=1175]
    public DelaySetVehicleParams(playerid)
    {
    if(!IsPlayerConnected(playerid)) { return 0; }
    new i;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    for(i=0; i<MAX_PLAYERS; i++)
    {
    if(Carlist[i][s][Carid]!=-1 && Carlist[i][s][Lock]==1) { SetVehicleParamsForPlayer(Carlist[i][Carid],playerid,0,1); }
    if(Spectating[i][0]!=-1) { SetVehicleParamsForPlayer(Kaufliste[Spectating[i][0]][Carid],playerid,0,1); }
    }
    }
    return 1;
    }
    [/pwn]


    Jeffry

  • Jeffry


    Bekomme Warnings:


    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1060) : warning 219: local variable "s" shadows a variable at a preceding level
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1095) : warning 219: local variable "s" shadows a variable at a preceding level
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1110) : warning 219: local variable "s" shadows a variable at a preceding level
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1161) : warning 209: function "CreateTunedCar" should return a value
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1173) : warning 209: function "DelayDestroyCar" should return a value
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    5 Warnings.



    Die Zeilen:

    Spoiler anzeigen
    [pwn=1053]
    public OnVehicleMod(playerid,vehicleid,componentid)
    {
    new s, pid, check;
    check = GetPlayerFromCarlistCar(vehicleid, pid, s);
    if(playerid != pid || check == -1) return 1;
    if(playerid!=-1)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    new mod=GetModType(componentid);
    switch (mod)
    {
    case 1: { Carlist[playerid][s][mod1]=componentid; }
    case 2: { Carlist[playerid][s][mod2]=componentid; }
    case 3: { Carlist[playerid][s][mod3]=componentid; }
    case 4: { Carlist[playerid][s][mod4]=componentid; }
    case 5: { Carlist[playerid][s][mod5]=componentid; }
    case 6: { Carlist[playerid][s][mod6]=componentid; }
    case 7: { Carlist[playerid][s][mod7]=componentid; }
    case 8: { Carlist[playerid][s][mod8]=componentid; }
    case 9: { Carlist[playerid][s][mod9]=componentid; }
    case 10: { Carlist[playerid][s][mod10]=componentid; }
    case 11: { Carlist[playerid][s][mod11]=componentid; }
    case 12: { Carlist[playerid][s][mod12]=componentid; }
    case 13: { Carlist[playerid][s][mod13]=componentid; }
    case 14: { Carlist[playerid][s][mod14]=componentid; }
    case 15: { Carlist[playerid][s][mod15]=componentid; }
    case 16: { Carlist[playerid][s][mod16]=componentid; }
    case 17: { Carlist[playerid][s][mod17]=componentid; }
    default: { new string[128]; format(string,128,"Unbekannte Komponentenid: %i",componentid); print(string); }
    }
    }
    }
    return 1;
    }
    [/pwn]

    Spoiler anzeigen
    [pwn=1089]
    public OnVehiclePaintjob(playerid,vehicleid, paintjobid)
    {
    new s, pid, check;
    check = GetPlayerFromCarlistCar(vehicleid, pid, s);
    if(playerid != pid || check == -1) return 1;
    if(playerid!=-1)
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    {
    Carlist[playerid][s][Paintjob]=paintjobid;
    }
    }
    return 1;
    }
    [/pwn]

    Spoiler anzeigen
    [pwn=1104]
    public OnVehicleRespray(playerid,vehicleid, color1, color2)
    {
    new s, pid, check;
    check = GetPlayerFromCarlistCar(vehicleid, pid, s);
    if(playerid != pid || check == -1) return 1;
    if(playerid!=-1)
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    {
    Carlist[playerid][s][Farbe1]=color1;
    Carlist[playerid][s][Farbe2]=color2;
    }
    }
    return 1;
    }
    [/pwn]

    Spoiler anzeigen
    [pwn=1126]
    public CreateTunedCar(playerid)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    if(IsPlayerConnected(playerid) && Carlist[playerid][s][Typ]!=-1)
    {
    new carid=CreateVehicle(Kaufliste[Carlist[playerid][s][Typ]][Modelid],Carlist[playerid][s][X],Carlist[playerid][s][Y],Carlist[playerid][s][Z],Carlist[playerid][s][Rotation],-1,-1,-1);
    if(Carlist[playerid][s][Lock]==1)
    {
    SetVehicleParamsForAll(carid,0,1);
    SetVehicleParamsForPlayer(carid,playerid,0,0);
    }
    if(Carlist[playerid][s][mod1]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod1]); }
    if(Carlist[playerid][s][mod2]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod2]); }
    if(Carlist[playerid][s][mod3]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod3]); }
    if(Carlist[playerid][s][mod4]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod4]); }
    if(Carlist[playerid][s][mod5]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod5]); }
    if(Carlist[playerid][s][mod6]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod6]); }
    if(Carlist[playerid][s][mod7]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod7]); }
    if(Carlist[playerid][s][mod8]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod8]); }
    if(Carlist[playerid][s][mod9]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod9]); }
    if(Carlist[playerid][s][mod10]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod10]); }
    if(Carlist[playerid][s][mod11]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod11]); }
    if(Carlist[playerid][s][mod12]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod12]); }
    if(Carlist[playerid][s][mod13]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod13]); }
    if(Carlist[playerid][s][mod14]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod14]); }
    if(Carlist[playerid][s][mod15]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod15]); }
    if(Carlist[playerid][s][mod16]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod16]); }
    if(Carlist[playerid][s][mod17]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod17]); }
    if(Carlist[playerid][s][Paintjob]!=-1) { ChangeVehiclePaintjob(carid,Carlist[playerid][s][Paintjob]); }
    if(Carlist[playerid][s][Farbe1]!=-1) { ChangeVehicleColor(carid,Carlist[playerid][s][Farbe1],Carlist[playerid][s][Farbe2]); }
    return carid;
    }
    return -1;
    }
    }
    [/pwn]

    Spoiler anzeigen
    [pwn=1163]
    public DelayDestroyCar(playerid)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    SetVehicleParamsForAll(Carlist[playerid][s][Carid],0,0);
    DestroyVehicle(Carlist[playerid][s][Carid]);
    Carlist[playerid][s][Status]=0;
    Carlist[playerid][s][Carid]=-1;
    return 1;
    }
    }
    [/pwn]

  • Danke :)


    Jedoch funktioniert der Befehl /carkey nicht:



    if(strcmp(cmd, "/carkey", true) == 0)
    {
    if(MaxVeh[playerid] > 1)
    {
    CarKey[playerid] += 1;
    if(CarKey[playerid] == MaxVeh[playerid])
    {
    CarKey[playerid] = 0;
    }
    if(Carlist[playerid][CarKey[playerid]][Typ] != -1)
    {
    new index = -1;
    for(new i=0; i<sizeof(Kaufliste); i++)
    {
    if(Kaufliste[i][Modelid] == Carlist[playerid][CarKey[playerid]][Typ])
    {
    index = i;
    break;
    }
    }
    if(index == -1) format(string, sizeof(string), "Du nimmst deinen %dten Auto-Schlüssel, für deinen <unbekannt> !", CarKey[playerid]+1);
    else format(string, sizeof(string), "Du nimmst deinen %dten Auto-Schlüssel, für deinen %s !", CarKey[playerid]+1, Kaufliste[index][Name]);
    }
    else
    {
    format(string, sizeof(string), "Du nimmst deinen %dten Auto-Schlüssel !",CarKey[playerid]+1);
    }
    SendClientMessage(playerid,COLOR_YELLOW,string);
    }
    return 1;
    }


    Zudem kommt eine Meldung, das ich nur 1 Fahrzeug besitzen kann.



    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == DIALOG_AUTOKAUFEN)
    {
    if(response == 1)
    {
    new string[128];
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    if (Spectating[playerid][0]!=-1)
    {
    if (Carlist[playerid][s][Typ]==-1)
    {
    new preis = Kaufliste[Spectating[playerid][0]][Preis];
    if(Spectating[playerid][0] == -1)
    {
    //Motorhaube zu
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights1,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    //Kofferraum zu
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    //Licht aus
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
    SendClientMessage(playerid, COLOR_GRAD1, "Du besichtigst kein Fahrzeug!");
    TogglePlayerControllable(playerid,1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    }
    else if (preis <= GetPlayerMoney(playerid))
    {
    new autohaus=Kaufliste[Spectating[playerid][0]][Autohaus];
    //Motorhaube zu
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights1,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    //Kofferraum zu
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    //Licht aus
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);


    GivePlayerMoney(playerid, - preis);
    Carlist[playerid][s][Typ]=Spectating[playerid][0]; Carlist[playerid][s][X]=Autospawns[autohaus][X]; Carlist[playerid][s][Y]=Autospawns[autohaus][Y];
    Carlist[playerid][s][Z]=Autospawns[autohaus][Z]; Carlist[playerid][s][Rotation]=Autospawns[autohaus][Rotation]; Carlist[playerid][s][Status]=1; Carlist[playerid][s][Lock]=0;
    Carlist[playerid][s][Carid]=CreateVehicle(Kaufliste[Spectating[playerid][0]][Modelid],Carlist[playerid][s][X],Carlist[playerid][s][Y],Carlist[playerid][s][Z],Carlist[playerid][s][Rotation],-1,-1,-1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    TogglePlayerControllable(playerid,1);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_WHITE, " ");
    format(string,128,"Du hast dir erfolgreich für $%i das Fahrzeug %s gekauft.",preis,Kaufliste[Carlist[playerid][s][Typ]][Name]);
    SendClientMessage(playerid, COLOR_GREEN, string);
    SendClientMessage(playerid, COLOR_YELLOW, "* Wenn dein Fahrzeug zerstört ist, gib /freparieren ein um es zu reparieren.");
    SendClientMessage(playerid, COLOR_YELLOW, "* Du kannst dein Fahrzeug mit /flock, auf- und abschließen.");
    SendClientMessage(playerid, COLOR_YELLOW, "* Mehr Befehle kannst du unter /fahrzeughelp sehen.");
    SendClientMessage(playerid, COLOR_WHITE, " ");
    SendClientMessage(playerid, COLOR_GREEN, "Dein Fahrzeug steht nun am Ausgabepunkt bereit! Viel Spaß mit dein neuen Fahrzeug");
    SendClientMessage(playerid, COLOR_WHITE, " ");
    SendClientMessage(playerid, COLOR_GREEN, "Fahr Vorsichtig!");
    SendClientMessage(playerid, COLOR_WHITE, " ");
    }
    else
    {
    //Motorhaube zu
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights1,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    //Kofferraum zu
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    //Licht aus
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);


    format(string, 128, "Du hast nicht keine $%i um das Fahrzeug zu kaufen.", preis); SendClientMessage(playerid, COLOR_GRAD1, string);
    TogglePlayerControllable(playerid,1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    }
    return 1;
    }
    else
    {
    //Motorhaube zu
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights1,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    //Kofferraum zu
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    //Licht aus
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);


    SendClientMessage(playerid, COLOR_GRAD1, "Du besitzt bereits ein Auto!");
    TogglePlayerControllable(playerid,1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    }
    }
    }
    }
    if(response == 0)
    {
    //Motorhaube zu
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights1,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    //Kofferraum zu
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    //Licht aus
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
    SendClientMessage(playerid,COLOR_GRAD1,"Du hast den Fahrzeugkauf beendet.");
    TogglePlayerControllable(playerid,1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    return 1;
    }
    }
    return 1;
    }


    Jeffry

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