Beiträge von PrainX


    MAX_PLAYERS hab ich keine Ahnung da ich nicht weiß wie es in deinem Script definiert ist.


    Ganz oben im Script:
    #define MaxVeh 3


    Unter irgendeiner Function das hier einfügen:
    Function OnPlayerCarLogin(playerid)
    {
    for(new x = 0; x < MaxVeh; x++)
    {
    if(!Dtc_PlayerHaveCar[playerid][x])
    {
    new string2[128];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    format(string2, sizeof(string2), "/Autos/%s%d.dtcar", playername2,x);
    new File: UserFile = fopen(string2, io_read);
    if (UserFile)
    {
    Dtc_PlayerHaveCar[playerid][x] = 1;
    new key[ 256 ] , val[ 256 ];
    new Data[ 256 ];
    while ( fread( UserFile , Data , sizeof( Data ) ) )
    {
    key = ini_GetKey( Data );
    if( strcmp( key , "CarId" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarId] = strval( val ); }
    if( strcmp( key , "CarModel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarModel] = strval( val ); }
    if( strcmp( key , "CarPos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_x] = floatstr( val ); }
    if( strcmp( key , "CarPos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_y] = floatstr( val ); }
    if( strcmp( key , "CarPos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_z] = floatstr( val ); }
    if( strcmp( key , "CarRotate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRotate] = floatstr( val ); }
    if( strcmp( key , "CarNitro" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarNitro] = strval( val ); }
    if( strcmp( key , "CarHyd" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarHyd] = strval( val ); }
    if( strcmp( key , "CarWheel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarWheel] = strval( val ); }
    if( strcmp( key , "CarAusp" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarAusp] = strval( val ); }
    if( strcmp( key , "CarSideL" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSideL] = strval( val ); }
    if( strcmp( key , "CarSideR" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSideR] = strval( val ); }
    if( strcmp( key , "CarFB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarFB] = strval( val ); }
    if( strcmp( key , "CarRB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRB] = strval( val ); }
    if( strcmp( key , "CarSpoiler" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSpoiler] = strval( val ); }
    if( strcmp( key , "CarRoof" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRoof] = strval( val ); }
    if( strcmp( key , "CarHood" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarHood] = strval( val ); }
    if( strcmp( key , "CarVents" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarVents] = strval( val ); }
    if( strcmp( key , "CarLamps" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarLamps] = strval( val ); }
    if( strcmp( key , "CarPJ" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPJ] = strval( val ); }
    if( strcmp( key , "CarC1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarC1] = strval( val ); }
    if( strcmp( key , "CarC2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarC2] = strval( val ); }
    if( strcmp( key , "Preis" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPreis] = strval( val ); }
    if( strcmp( key , "Plate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][Plate] = strval( val ); }
    }
    fclose(UserFile);
    PlayerCarSpawn(playerid,x);
    }
    }
    }
    }
    und oben:
    new Dtc_Carlock[700];


    Max_Players musst du irgendwie alleine fixxen.
    Oder add mich Skype prain.epvp und ich helf dir.

    if (strcmp("/park", cmdtext, true, 10) == 0)
    {
    if(Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
    {
    new newcar = GetPlayerVehicleID(playerid);
    if (newcar == PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId])
    {
    new Float:X,Float:Y,Float:Z;
    new Float:z_rot;
    GetPlayerPos(playerid, X,Y,Z);
    GetVehicleZAngle(newcar, z_rot);
    PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_x] = X;
    PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_y] = Y;
    PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_z] = Z;
    PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarRotate] = z_rot;
    SendClientMessage(playerid, COLOR_YELLOW, " Du hast dein Fahrzeug hier geparkt, ab nun kannst du dein Fahrzeug hier finden!");
    }
    else
    {
    SendClientMessage(playerid,COLOR_GREY," Du bist nicht in deinem Fahrzeug/Du hast nicht den Schlüssel zu diesem Fahrzeug ausgewählt!");
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Du besitzt Kein Fahrzeug für deinen Ausgewählten Schlüssel!");
    return 1;
    }
    return 1;
    }


    new Dtc_PlayerHaveCar[MAX_PLAYERS][MaxVeh];
    new Dtc_PlayerKey[MAX_PLAYERS];


    Unter Onplayerconnect:
    Dtc_PlayerKey[playerid] = 0;
    for(new i = 0; i < MaxVeh; i++)
    {
    Dtc_PlayerHaveCar[playerid][i] = 0;
    }
    for(new i = 0; i < MaxVeh; i++)
    {
    Dtc_PlayerHaveCar[playerid][i] = 0;
    }
    OnPlayerCarLogin(playerid);
    for(new i = 0; i < 700; i++)
    {
    if(Dtc_Carlock[i])
    {
    SetVehicleParamsForPlayer(i,playerid,0,1);
    }
    }
    Aus dem billig GF kopiert have Fun ;)

    3DTextLabel


    Create3DTextLabel("Öffne bzwl. schließe die\nTore mit /auf & /zu", COLOR_WHITE,x,y,z,15.0,0);
    COLOR_WHITE musst du ganz oben im Script definieren.
    #define COLOR_WHITE 0xFFFFFFAA
    Edit mit \n kannst du untereinander schreiben

    Ich rate dir davon ab da es zu Mainstream ist aber wenn du willst:
    Bei OnPlayerConnect:
    new spname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, spname, sizeof(spname));
    for(new i = 0; i < MAX_PLAYERS; i++)


    GetPlayerName(playerid, plname, sizeof(plname));
    format(string, sizeof(string), "/Accounts/%s.ini", plname);
    new login[128];
    new spname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, spname, sizeof(spname));
    format(login,sizeof(login),"{00EBFF}%s [ID: %d] hat den Server betreten", spname,playerid);