Beiträge von Nemesus

    tja das mit Trooper stimmt ist schade zwei sehr geile Server, ich sag mal so nach eigener Erfahrung, Egal wie dein Script aussieht egal was für Features solange es keine Bugs aufweist ist es egal da umso mehr Spieler du hast umso mehr kommen.

    Hi,


    ich habe ein Problem undzwar die Mapicons werden nicht erstellt aber ausgelesen.


    Hoffe es kann mir einer Helfen. Danke.


    stock LoadMapIconsFromDatabase()
    {
    new index;
    mysql_query("SELECT * FROM `Mapicons`");
    mysql_store_result();
    if(mysql_num_rows() > 0)
    {
    while(mysql_fetch_row(Query))
    {
    sscanf(Query, "e<p<|>dffffdd>", MPickups[index]);
    for(new i=0; i<sizeof(MPickups); i++)
    {
    SetPlayerMapIcon(i, MPickups[index][ID], MPickups[index][PositionX], MPickups[index][PositionY], MPickups[index][PositionZ], MPickups[index][Model], 0);
    }
    index++;
    }
    }
    mysql_free_result();
    print("\n");
    printf("SERVER: Es wurden %d Mapicons erfolgreich geladen.", index);
    return 1;
    }

    kein ding :D hier haste Sie


    public PlayerCarSpawn(playerid,Slot)
    {
    if(IsPlayerConnected(playerid))
    {
    if(Dtc_PlayerHaveCar[playerid][Slot])
    {
    PlayerCar[playerid][Slot][CarId] = CreateVehicle(PlayerCar[playerid][Slot][CarModel],PlayerCar[playerid][Slot][CarPos_x],PlayerCar[playerid][Slot][CarPos_y],PlayerCar[playerid][Slot][CarPos_z],PlayerCar[playerid][Slot][CarRotate],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2], 60000);/*vehicle spawn*/
    ChangeVehicleColor(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2]);
    if(PlayerCar[playerid][Slot][CarPJ] >= 0) {ChangeVehiclePaintjob(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarPJ]);}
    if(PlayerCar[playerid][Slot][CarNitro] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarNitro]);}
    if(PlayerCar[playerid][Slot][CarHyd] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarHyd]);}
    if(PlayerCar[playerid][Slot][CarWheel] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarWheel]);}
    if(PlayerCar[playerid][Slot][CarAusp] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarAusp]);}
    if(PlayerCar[playerid][Slot][CarSideL] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSideL]);}
    if(PlayerCar[playerid][Slot][CarSideR] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSideR]);}
    if(PlayerCar[playerid][Slot][CarFB] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarFB]);}
    if(PlayerCar[playerid][Slot][CarRB] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarRB]);}
    if(PlayerCar[playerid][Slot][CarSpoiler] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSpoiler]);}
    if(PlayerCar[playerid][Slot][CarRoof] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarRoof]);}
    if(PlayerCar[playerid][Slot][CarHood] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarHood]);}
    if(PlayerCar[playerid][Slot][CarVents] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarVents]);}
    if(PlayerCar[playerid][Slot][CarLamps] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarLamps]);}
    if(Dtc_LockOnSpawn)
    {
    Dtc_Carlock[PlayerCar[playerid][Slot][CarId]] = 1;
    Dtc_LockCar(PlayerCar[playerid][Slot][CarId]);
    }
    }
    }
    }

    hier der onplayer connect :


    public OnPlayerConnect(playerid)
    {
    dtc_AutohausCar[playerid] = 0;
    dtc_AutohausCat[playerid] = 0;
    dtc_AutohausSCar[playerid] = 0;
    Dtc_PlayerKey[playerid] = 0;
    Dtc_CarKey[playerid] = 0;
    Dtc_ParkRights[playerid] = 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);
    }
    }
    return 1;
    }


    und hier das OnPlayerCarLogin


    public 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), "/DT_Cars/%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 ); }
    }
    fclose(UserFile);
    PlayerCarSpawn(playerid,x);
    }
    }
    }
    }

    Nabend,


    ich würde gerne den Carowner vom DT_Cars System raussfinden, für ein Oamt System gedanken darüber habe ich mir gemacht bin aber beim rausfinden des Carowners hängen geblieben die SuFu hat leider nix ergeben.


    Ich hoffe ihr könnt mir helfen


    MFG


    creck

    Guten Tag ,


    es handelt sich um Godfather und deren property.cfg.


    Ich habe ein Problem beim auslesen meiner dini, immer wenn der Server diese auslesen will ändert sie sich zu :


    0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0,0,0,0,0,0,,,0,0,0,0,0,0,0,0,0,0,0,0,0,202,0,0,0,0.000000,0.000000,0.000000,0.000000,0,0



    so sehen mein speichern und laden aus :


    hier ist das speichern


    public OnPropUpdate()
    {
    new idx;
    new File: file2;
    while (idx < Houses_Index)
    {
    new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%f,%f,%f,%f,%d,%d\n",
    HouseInfo[idx][hEntrancex],
    HouseInfo[idx][hEntrancey],
    HouseInfo[idx][hEntrancez],
    HouseInfo[idx][hExitx],
    HouseInfo[idx][hExity],
    HouseInfo[idx][hExitz],
    HouseInfo[idx][hHealthx],
    HouseInfo[idx][hHealthy],
    HouseInfo[idx][hHealthz],
    HouseInfo[idx][hArmourx],
    HouseInfo[idx][hArmoury],
    HouseInfo[idx][hArmourz],
    HouseInfo[idx][hOwner],
    HouseInfo[idx][hDiscription],
    HouseInfo[idx][hValue],
    HouseInfo[idx][hHel],
    HouseInfo[idx][hArm],
    HouseInfo[idx][hInt],
    HouseInfo[idx][hLock],
    HouseInfo[idx][hOwned],
    HouseInfo[idx][hRooms],
    HouseInfo[idx][hRent],
    HouseInfo[idx][hRentabil],
    HouseInfo[idx][hTakings],
    HouseInfo[idx][hVec],
    HouseInfo[idx][hVcol1],
    HouseInfo[idx][hVcol2],
    HouseInfo[idx][hDate],
    HouseInfo[idx][hLevel],
    HouseInfo[idx][hMuell],
    HouseInfo[idx][hInteriorID],
    HouseInfo[idx][hCarSpawnX],
    HouseInfo[idx][hCarSpawnY],
    HouseInfo[idx][hCarSpawnZ],
    HouseInfo[idx][hCarSpawnRot],
    HouseInfo[idx][hCID],
    HouseInfo[idx][hNitro]);
    if(idx == 0)
    {
    file2 = fopen("property.cfg", io_write);
    }
    else
    {
    file2 = fopen("property.cfg", io_append);
    }
    fwrite(file2, coordsstring);
    idx++;
    fclose(file2);
    }



    und hier das laden :


    public LoadProperty()
    {
    new arrCoords[37][64];
    new strFromFile2[256];
    new File: file = fopen("property.cfg", io_read);
    if (file)
    {
    new idx;
    while (idx < Houses_Index)
    {
    fread(file, strFromFile2);
    split(strFromFile2, arrCoords, ',');
    HouseInfo[idx][hEntrancex] = floatstr(arrCoords[0]);
    HouseInfo[idx][hEntrancey] = floatstr(arrCoords[1]);
    HouseInfo[idx][hEntrancez] = floatstr(arrCoords[2]);
    HouseInfo[idx][hExitx] = floatstr(arrCoords[3]);
    HouseInfo[idx][hExity] = floatstr(arrCoords[4]);
    HouseInfo[idx][hExitz] = floatstr(arrCoords[5]);
    HouseInfo[idx][hHealthx] = strval(arrCoords[6]);
    HouseInfo[idx][hHealthy] = strval(arrCoords[7]);
    HouseInfo[idx][hHealthz] = strval(arrCoords[8]);
    HouseInfo[idx][hArmourx] = strval(arrCoords[9]);
    HouseInfo[idx][hArmoury] = strval(arrCoords[10]);
    HouseInfo[idx][hArmourz] = strval(arrCoords[11]);
    //printf("HouseInfo hEntrancez %f",HouseInfo[idx][hEntrancez]);
    strmid(HouseInfo[idx][hOwner], arrCoords[12], 0, strlen(arrCoords[12]), 255);
    strmid(HouseInfo[idx][hDiscription], arrCoords[13], 0, strlen(arrCoords[13]), 255);
    HouseInfo[idx][hValue] = strval(arrCoords[14]);
    HouseInfo[idx][hHel] = strval(arrCoords[15]);
    HouseInfo[idx][hArm] = strval(arrCoords[16]);
    HouseInfo[idx][hInt] = strval(arrCoords[17]);
    HouseInfo[idx][hLock] = strval(arrCoords[18]);
    HouseInfo[idx][hOwned] = strval(arrCoords[19]);
    HouseInfo[idx][hRooms] = strval(arrCoords[20]);
    HouseInfo[idx][hRent] = strval(arrCoords[21]);
    HouseInfo[idx][hRentabil] = strval(arrCoords[22]);
    HouseInfo[idx][hTakings] = strval(arrCoords[23]);
    HouseInfo[idx][hVec] = strval(arrCoords[24]);
    if(HouseInfo[idx][hVec] == 457)
    {
    HouseInfo[idx][hVec] = 411;
    }
    HouseInfo[idx][hVcol1] = strval(arrCoords[25]);
    HouseInfo[idx][hVcol2] = strval(arrCoords[26]);
    HouseInfo[idx][hDate] = strval(arrCoords[27]);
    HouseInfo[idx][hLevel] = strval(arrCoords[28]);
    HouseInfo[idx][hMuell] = strval(arrCoords[29]);
    HouseInfo[idx][hInteriorID] = strval(arrCoords[30]);
    HouseInfo[idx][hCarSpawnX] = floatstr(arrCoords[31]);
    HouseInfo[idx][hCarSpawnY] = floatstr(arrCoords[32]);
    HouseInfo[idx][hCarSpawnZ] = floatstr(arrCoords[33]);
    HouseInfo[idx][hCarSpawnRot] = floatstr(arrCoords[34]);
    HouseInfo[idx][hCID] = floatstr(arrCoords[35]);
    HouseInfo[idx][hNitro] = floatstr(arrCoords[36]);
    printf("HouseInfo:%d Owner:%s hTakings %d hVec %d",idx,HouseInfo[idx][hOwner],HouseInfo[idx][hTakings],HouseInfo[idx][hVec]);
    idx++;
    }
    fclose(file);
    }
    return 1;
    }


    Auslesen lasse ich dies bei ongamemodinit.



    hoffe ihr könnt mir helfen



    MFG


    creck

    Hallo, ich habe eine Frage , unzwar wollte ich wenn man in einem Menü ist und Enter drück das Menü direkt wieder kommt.


    new Menu:CurrentMenu = GetPlayerMenu(playerid);
    if(newkeys == 16 && (RegistrationStep[playerid] == 3))
    {
    ShowMenuForPlayer(tut, playerid);
    }


    das ist mein Code aber wenn ich im Menu Enter drücke passiert nix.


    Bitte um hilfe MFG


    creck

    Gudden ,



    Ich habe mal eine Frage wenn ich eine Input Box erstelle, wo mann zb wass eingeben kann wie zb. 30 , will ich das das dann als Geld abgezogen wird.


    Ich hab schonmal GivePlayerMoney(playerid, -inputtext); aber dies geht leider nicht


    hoffe ihr könnte mir helfen?


    :DD


    MFG


    creck