pitanje & savjet

Započeo Nodze
31. Jan. 2026.
191
pregleda
19
postova
Nodze
8
Crime Lord
31. Jan. 2026.


Pitanje/savet*: Sistem Tuning od Dimia
Opis*: imam pitanje kako Napravit automatski loadovanje tuninga , jer kad igrač tunira vozilo i napise /savetuning ime tuninga kako će se sačuvat

Posle kad parkira ima Tuning , kada ode igrač relog udje na server , Tuning-a nema, kada napise /loadtuning ( ime kako si sačuvao npr: Nodzecar ) Tuning se stvori i sve dok je igrač na serveru Tuning radi.

Sad imam pitanje kako automatski Napravit loadovanje tuninga čim igrač udje na server
Dodatne informacije: evo kod sistema

https://pastebin.com/wzAiKQ38

https://sampforum.blast.hk/showthread.php?tid=563689

Mod koristim cisti Underpoint , kompletan restajling radim

Vlasnik Zajednice: Ghost Town since 2016

Vlasnik Zajednice : Spotify Ogc since 2018

ZIAN-ADRIA
4
Rookie
31. Jan. 2026.

Automatsko loadovanje moraš da uradiš u callback-u: OnPlayerSpawn ili OnPlayerConnect (u zavisnosti kako ti je sistem napravljen) 🙂

[ Web Developer | Coder ]

HTML · CSS · JavaScript

Web Development · Scripting · Servers

Cyber Security · System Safety

------------------------------------------------

Learning. Building. Securing.

Here to share knowledge and help the community.

------------------------------------------------

Nodze
8
Crime Lord
31. Jan. 2026.
ZIAN-ADRIA wrote on January 31, 2026, 7:07 pm:

Automatsko loadovanje moraš da uradiš u callback-u: OnPlayerSpawn ili OnPlayerConnect (u zavisnosti kako ti je sistem napravljen) 🙂

evo drug vec sam ti kod poslao koji je u skripti https://pastebin.com/wzAiKQ38

sad me interesuje kako je najbolje u radit ,dal loadovenje prebacit u vehicleinfo itd

Vlasnik Zajednice: Ghost Town since 2016

Vlasnik Zajednice : Spotify Ogc since 2018

ZIAN-ADRIA
4
Rookie
31. Jan. 2026.
// Maksimalno tuninga po igraču
#define MAX_TUNINGS 50

// Čuvanje tuninga u memoriji za brzi load
new TuningName[MAX_PLAYERS][MAX_TUNINGS][64];
new TuningVehicleID[MAX_PLAYERS][MAX_TUNINGS];
new TuningCount[MAX_PLAYERS];

// ==============================
// Save tuning
// ==============================
public SaveTuning(playerid, vehicleid, name[])
{
    if(TuningCount[playerid] >= MAX_TUNINGS)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You reached max tunings!");
        return 0;
    }

    new index = TuningCount[playerid];
    strcopy(TuningName[playerid][index], sizeof(TuningName[][]), name);
    TuningVehicleID[playerid][index] = vehicleid;

    // Save to ini
    new section[64];
    format(section, sizeof(section), "Tuning_%d_%d", playerid, vehicleid);

    Y_INI_SetInt("tunings.ini", section, "Color1", GetVehicleColor(vehicleid, 0));
    Y_INI_SetInt("tunings.ini", section, "Color2", GetVehicleColor(vehicleid, 1));
    Y_INI_SetInt("tunings.ini", section, "Health", GetVehicleHealth(vehicleid));
    Y_INI_SetInt("tunings.ini", section, "Nitro", GetVehicleNitro(vehicleid));
    Y_INI_SetInt("tunings.ini", section, "Engine", GetVehicleEngine(vehicleid));
    // Dodaj ostale parametre po potrebi

    TuningCount[playerid]++;
    SendClientMessage(playerid, 0x00FF00AA, "Tuning saved successfully!");
    return 1;
}

// ==============================
// Load tuning
// ==============================
public LoadTuning(playerid, vehicleid)
{
    new section[64];
    format(section, sizeof(section), "Tuning_%d_%d", playerid, vehicleid);

    if(!Y_INI_Exists("tunings.ini", section))
    {
        // tuning ne postoji
        return 0;
    }

    new color1 = Y_INI_GetInt("tunings.ini", section, "Color1", 0);
    new color2 = Y_INI_GetInt("tunings.ini", section, "Color2", 0);
    new health = Y_INI_GetInt("tunings.ini", section, "Health", 1000);
    new nitro = Y_INI_GetInt("tunings.ini", section, "Nitro", 0);
    new engine = Y_INI_GetInt("tunings.ini", section, "Engine", 100);

    SetVehicleColor(vehicleid, color1, color2);
    SetVehicleHealth(vehicleid, health);
    SetVehicleNitro(vehicleid, nitro);
    SetVehicleEngine(vehicleid, engine);
    // Dodaj ostale parametre po potrebi

    return 1;
}

// ==============================
// Automatski load pri spawn-u
// ==============================
public OnPlayerSpawn(playerid)
{
    for(new i = 0; i < MAX_TUNINGS; i++)
    {
        new vehicleid = TuningVehicleID[playerid][i];
        if(vehicleid != 0 && IsVehicleStreamedInForPlayer(vehicleid, playerid))
        {
            LoadTuning(playerid, vehicleid);
        }
    }
    return 1;
}

// ==============================
// ZCMD komande
// ==============================
CMD:savetuning(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You must be in a vehicle to save tuning!");
        return 0;
    }

    new name[32];
    if(sscanf(params, "s[32]", name))
    {
        SendClientMessage(playerid, 0xFF0000AA, "Usage: /savetuning [name]");
        return 0;
    }

    SaveTuning(playerid, vehicleid, name);
    return 1;
}

CMD:loadtuning(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You must be in a vehicle to load tuning!");
        return 0;
    }

    LoadTuning(playerid, vehicleid);
    return 1;
}

[ Web Developer | Coder ]

HTML · CSS · JavaScript

Web Development · Scripting · Servers

Cyber Security · System Safety

------------------------------------------------

Learning. Building. Securing.

Here to share knowledge and help the community.

------------------------------------------------

ajdind17
1
Rookie
1. Feb. 2026.
ZIAN-ADRIA wrote on January 31, 2026, 9:27 pm:
// Maksimalno tuninga po igraču
#define MAX_TUNINGS 50

// Čuvanje tuninga u memoriji za brzi load
new TuningName[MAX_PLAYERS][MAX_TUNINGS][64];
new TuningVehicleID[MAX_PLAYERS][MAX_TUNINGS];
new TuningCount[MAX_PLAYERS];

// ==============================
// Save tuning
// ==============================
public SaveTuning(playerid, vehicleid, name[])
{
    if(TuningCount[playerid] >= MAX_TUNINGS)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You reached max tunings!");
        return 0;
    }

    new index = TuningCount[playerid];
    strcopy(TuningName[playerid][index], sizeof(TuningName[][]), name);
    TuningVehicleID[playerid][index] = vehicleid;

    // Save to ini
    new section[64];
    format(section, sizeof(section), "Tuning_%d_%d", playerid, vehicleid);

    Y_INI_SetInt("tunings.ini", section, "Color1", GetVehicleColor(vehicleid, 0));
    Y_INI_SetInt("tunings.ini", section, "Color2", GetVehicleColor(vehicleid, 1));
    Y_INI_SetInt("tunings.ini", section, "Health", GetVehicleHealth(vehicleid));
    Y_INI_SetInt("tunings.ini", section, "Nitro", GetVehicleNitro(vehicleid));
    Y_INI_SetInt("tunings.ini", section, "Engine", GetVehicleEngine(vehicleid));
    // Dodaj ostale parametre po potrebi

    TuningCount[playerid]++;
    SendClientMessage(playerid, 0x00FF00AA, "Tuning saved successfully!");
    return 1;
}

// ==============================
// Load tuning
// ==============================
public LoadTuning(playerid, vehicleid)
{
    new section[64];
    format(section, sizeof(section), "Tuning_%d_%d", playerid, vehicleid);

    if(!Y_INI_Exists("tunings.ini", section))
    {
        // tuning ne postoji
        return 0;
    }

    new color1 = Y_INI_GetInt("tunings.ini", section, "Color1", 0);
    new color2 = Y_INI_GetInt("tunings.ini", section, "Color2", 0);
    new health = Y_INI_GetInt("tunings.ini", section, "Health", 1000);
    new nitro = Y_INI_GetInt("tunings.ini", section, "Nitro", 0);
    new engine = Y_INI_GetInt("tunings.ini", section, "Engine", 100);

    SetVehicleColor(vehicleid, color1, color2);
    SetVehicleHealth(vehicleid, health);
    SetVehicleNitro(vehicleid, nitro);
    SetVehicleEngine(vehicleid, engine);
    // Dodaj ostale parametre po potrebi

    return 1;
}

// ==============================
// Automatski load pri spawn-u
// ==============================
public OnPlayerSpawn(playerid)
{
    for(new i = 0; i < MAX_TUNINGS; i++)
    {
        new vehicleid = TuningVehicleID[playerid][i];
        if(vehicleid != 0 && IsVehicleStreamedInForPlayer(vehicleid, playerid))
        {
            LoadTuning(playerid, vehicleid);
        }
    }
    return 1;
}

// ==============================
// ZCMD komande
// ==============================
CMD:savetuning(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You must be in a vehicle to save tuning!");
        return 0;
    }

    new name[32];
    if(sscanf(params, "s[32]", name))
    {
        SendClientMessage(playerid, 0xFF0000AA, "Usage: /savetuning [name]");
        return 0;
    }

    SaveTuning(playerid, vehicleid, name);
    return 1;
}

CMD:loadtuning(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You must be in a vehicle to load tuning!");
        return 0;
    }

    LoadTuning(playerid, vehicleid);
    return 1;
}

Bratu chatGPT napisao, bravoo

BALKAN ELITE

ZIAN-ADRIA
4
Rookie
1. Feb. 2026.
ajdind17 wrote on February 1, 2026, 8:40 am:
ZIAN-ADRIA wrote on January 31, 2026, 9:27 pm:
// Maksimalno tuninga po igraču
#define MAX_TUNINGS 50

// Čuvanje tuninga u memoriji za brzi load
new TuningName[MAX_PLAYERS][MAX_TUNINGS][64];
new TuningVehicleID[MAX_PLAYERS][MAX_TUNINGS];
new TuningCount[MAX_PLAYERS];

// ==============================
// Save tuning
// ==============================
public SaveTuning(playerid, vehicleid, name[])
{
    if(TuningCount[playerid] >= MAX_TUNINGS)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You reached max tunings!");
        return 0;
    }

    new index = TuningCount[playerid];
    strcopy(TuningName[playerid][index], sizeof(TuningName[][]), name);
    TuningVehicleID[playerid][index] = vehicleid;

    // Save to ini
    new section[64];
    format(section, sizeof(section), "Tuning_%d_%d", playerid, vehicleid);

    Y_INI_SetInt("tunings.ini", section, "Color1", GetVehicleColor(vehicleid, 0));
    Y_INI_SetInt("tunings.ini", section, "Color2", GetVehicleColor(vehicleid, 1));
    Y_INI_SetInt("tunings.ini", section, "Health", GetVehicleHealth(vehicleid));
    Y_INI_SetInt("tunings.ini", section, "Nitro", GetVehicleNitro(vehicleid));
    Y_INI_SetInt("tunings.ini", section, "Engine", GetVehicleEngine(vehicleid));
    // Dodaj ostale parametre po potrebi

    TuningCount[playerid]++;
    SendClientMessage(playerid, 0x00FF00AA, "Tuning saved successfully!");
    return 1;
}

// ==============================
// Load tuning
// ==============================
public LoadTuning(playerid, vehicleid)
{
    new section[64];
    format(section, sizeof(section), "Tuning_%d_%d", playerid, vehicleid);

    if(!Y_INI_Exists("tunings.ini", section))
    {
        // tuning ne postoji
        return 0;
    }

    new color1 = Y_INI_GetInt("tunings.ini", section, "Color1", 0);
    new color2 = Y_INI_GetInt("tunings.ini", section, "Color2", 0);
    new health = Y_INI_GetInt("tunings.ini", section, "Health", 1000);
    new nitro = Y_INI_GetInt("tunings.ini", section, "Nitro", 0);
    new engine = Y_INI_GetInt("tunings.ini", section, "Engine", 100);

    SetVehicleColor(vehicleid, color1, color2);
    SetVehicleHealth(vehicleid, health);
    SetVehicleNitro(vehicleid, nitro);
    SetVehicleEngine(vehicleid, engine);
    // Dodaj ostale parametre po potrebi

    return 1;
}

// ==============================
// Automatski load pri spawn-u
// ==============================
public OnPlayerSpawn(playerid)
{
    for(new i = 0; i < MAX_TUNINGS; i++)
    {
        new vehicleid = TuningVehicleID[playerid][i];
        if(vehicleid != 0 && IsVehicleStreamedInForPlayer(vehicleid, playerid))
        {
            LoadTuning(playerid, vehicleid);
        }
    }
    return 1;
}

// ==============================
// ZCMD komande
// ==============================
CMD:savetuning(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You must be in a vehicle to save tuning!");
        return 0;
    }

    new name[32];
    if(sscanf(params, "s[32]", name))
    {
        SendClientMessage(playerid, 0xFF0000AA, "Usage: /savetuning [name]");
        return 0;
    }

    SaveTuning(playerid, vehicleid, name);
    return 1;
}

CMD:loadtuning(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You must be in a vehicle to load tuning!");
        return 0;
    }

    LoadTuning(playerid, vehicleid);
    return 1;
}

Bratu chatGPT napisao, bravoo

Ako nemaš šta konkretno reći o samom kodu bug, optimizaciju ili prijedlog onda je potpuno nebitno ko ga je ili kako pisao. Tema je rješenje, ne tvoja pretpostavka. LP 🙂

[ Web Developer | Coder ]

HTML · CSS · JavaScript

Web Development · Scripting · Servers

Cyber Security · System Safety

------------------------------------------------

Learning. Building. Securing.

Here to share knowledge and help the community.

------------------------------------------------

Foxyyy
10
Made Man
🔥52
2. Feb. 2026.
ZIAN.null wrote on February 1, 2026, 3:05 pm:
ajdind17 wrote on February 1, 2026, 8:40 am:
ZIAN-ADRIA wrote on January 31, 2026, 9:27 pm:
// Maksimalno tuninga po igraču
#define MAX_TUNINGS 50

// Čuvanje tuninga u memoriji za brzi load
new TuningName[MAX_PLAYERS][MAX_TUNINGS][64];
new TuningVehicleID[MAX_PLAYERS][MAX_TUNINGS];
new TuningCount[MAX_PLAYERS];

// ==============================
// Save tuning
// ==============================
public SaveTuning(playerid, vehicleid, name[])
{
    if(TuningCount[playerid] >= MAX_TUNINGS)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You reached max tunings!");
        return 0;
    }

    new index = TuningCount[playerid];
    strcopy(TuningName[playerid][index], sizeof(TuningName[][]), name);
    TuningVehicleID[playerid][index] = vehicleid;

    // Save to ini
    new section[64];
    format(section, sizeof(section), "Tuning_%d_%d", playerid, vehicleid);

    Y_INI_SetInt("tunings.ini", section, "Color1", GetVehicleColor(vehicleid, 0));
    Y_INI_SetInt("tunings.ini", section, "Color2", GetVehicleColor(vehicleid, 1));
    Y_INI_SetInt("tunings.ini", section, "Health", GetVehicleHealth(vehicleid));
    Y_INI_SetInt("tunings.ini", section, "Nitro", GetVehicleNitro(vehicleid));
    Y_INI_SetInt("tunings.ini", section, "Engine", GetVehicleEngine(vehicleid));
    // Dodaj ostale parametre po potrebi

    TuningCount[playerid]++;
    SendClientMessage(playerid, 0x00FF00AA, "Tuning saved successfully!");
    return 1;
}

// ==============================
// Load tuning
// ==============================
public LoadTuning(playerid, vehicleid)
{
    new section[64];
    format(section, sizeof(section), "Tuning_%d_%d", playerid, vehicleid);

    if(!Y_INI_Exists("tunings.ini", section))
    {
        // tuning ne postoji
        return 0;
    }

    new color1 = Y_INI_GetInt("tunings.ini", section, "Color1", 0);
    new color2 = Y_INI_GetInt("tunings.ini", section, "Color2", 0);
    new health = Y_INI_GetInt("tunings.ini", section, "Health", 1000);
    new nitro = Y_INI_GetInt("tunings.ini", section, "Nitro", 0);
    new engine = Y_INI_GetInt("tunings.ini", section, "Engine", 100);

    SetVehicleColor(vehicleid, color1, color2);
    SetVehicleHealth(vehicleid, health);
    SetVehicleNitro(vehicleid, nitro);
    SetVehicleEngine(vehicleid, engine);
    // Dodaj ostale parametre po potrebi

    return 1;
}

// ==============================
// Automatski load pri spawn-u
// ==============================
public OnPlayerSpawn(playerid)
{
    for(new i = 0; i < MAX_TUNINGS; i++)
    {
        new vehicleid = TuningVehicleID[playerid][i];
        if(vehicleid != 0 && IsVehicleStreamedInForPlayer(vehicleid, playerid))
        {
            LoadTuning(playerid, vehicleid);
        }
    }
    return 1;
}

// ==============================
// ZCMD komande
// ==============================
CMD:savetuning(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You must be in a vehicle to save tuning!");
        return 0;
    }

    new name[32];
    if(sscanf(params, "s[32]", name))
    {
        SendClientMessage(playerid, 0xFF0000AA, "Usage: /savetuning [name]");
        return 0;
    }

    SaveTuning(playerid, vehicleid, name);
    return 1;
}

CMD:loadtuning(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You must be in a vehicle to load tuning!");
        return 0;
    }

    LoadTuning(playerid, vehicleid);
    return 1;
}

Bratu chatGPT napisao, bravoo

Ako nemaš šta konkretno reći o samom kodu bug, optimizaciju ili prijedlog onda je potpuno nebitno ko ga je ili kako pisao. Tema je rješenje, ne tvoja pretpostavka. LP 🙂

A misliš da se nema šta reći, čovjek iznad je u pravu da ti je kod napisao chatgpt, a prije 10 min sam ti odgovorio na post gdje nudis ljudima pomoc ili uslugu oko skriptanja, web sajtova itd, čitav tekst ti je napisao chatgpt i samo sam iznio misljenje da i sam trazis pomoc, i evo sad sam se uvjerio u to.

Kao npr očigledno je da uopste ne poznajes kod i nemoj se sramotit više sa chatgpt dečko evo navest cu ti najbanalnije primjere i skontat ces sam kolko si u crnjaku

SetVehicleNitro - ova funkcija uopste ne postoji nego se koristi "AddVehicleComponent"

GetVehicleEngine - ovu glupost necu ni da komentarišem jer ovo da nije smiješno bilo bi za plakanje

Y_INI_SetInt("tunings.ini", ...) i Y_INI_GetInt(...) gdje si našao ove funkcije ljubi te brat jel znaš kako yini uopste radi?

Ovo što si ti poslao dečku kao "pomoć" je nešto najgluplje što sam do sad vidio...

ZIAN-ADRIA
4
Rookie
2. Feb. 2026.
sparrowww.aMx wrote on February 2, 2026, 4:17 am:
ZIAN.null wrote on February 1, 2026, 3:05 pm:
ajdind17 wrote on February 1, 2026, 8:40 am:
ZIAN-ADRIA wrote on January 31, 2026, 9:27 pm:
// Maksimalno tuninga po igraču
#define MAX_TUNINGS 50

// Čuvanje tuninga u memoriji za brzi load
new TuningName[MAX_PLAYERS][MAX_TUNINGS][64];
new TuningVehicleID[MAX_PLAYERS][MAX_TUNINGS];
new TuningCount[MAX_PLAYERS];

// ==============================
// Save tuning
// ==============================
public SaveTuning(playerid, vehicleid, name[])
{
    if(TuningCount[playerid] >= MAX_TUNINGS)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You reached max tunings!");
        return 0;
    }

    new index = TuningCount[playerid];
    strcopy(TuningName[playerid][index], sizeof(TuningName[][]), name);
    TuningVehicleID[playerid][index] = vehicleid;

    // Save to ini
    new section[64];
    format(section, sizeof(section), "Tuning_%d_%d", playerid, vehicleid);

    Y_INI_SetInt("tunings.ini", section, "Color1", GetVehicleColor(vehicleid, 0));
    Y_INI_SetInt("tunings.ini", section, "Color2", GetVehicleColor(vehicleid, 1));
    Y_INI_SetInt("tunings.ini", section, "Health", GetVehicleHealth(vehicleid));
    Y_INI_SetInt("tunings.ini", section, "Nitro", GetVehicleNitro(vehicleid));
    Y_INI_SetInt("tunings.ini", section, "Engine", GetVehicleEngine(vehicleid));
    // Dodaj ostale parametre po potrebi

    TuningCount[playerid]++;
    SendClientMessage(playerid, 0x00FF00AA, "Tuning saved successfully!");
    return 1;
}

// ==============================
// Load tuning
// ==============================
public LoadTuning(playerid, vehicleid)
{
    new section[64];
    format(section, sizeof(section), "Tuning_%d_%d", playerid, vehicleid);

    if(!Y_INI_Exists("tunings.ini", section))
    {
        // tuning ne postoji
        return 0;
    }

    new color1 = Y_INI_GetInt("tunings.ini", section, "Color1", 0);
    new color2 = Y_INI_GetInt("tunings.ini", section, "Color2", 0);
    new health = Y_INI_GetInt("tunings.ini", section, "Health", 1000);
    new nitro = Y_INI_GetInt("tunings.ini", section, "Nitro", 0);
    new engine = Y_INI_GetInt("tunings.ini", section, "Engine", 100);

    SetVehicleColor(vehicleid, color1, color2);
    SetVehicleHealth(vehicleid, health);
    SetVehicleNitro(vehicleid, nitro);
    SetVehicleEngine(vehicleid, engine);
    // Dodaj ostale parametre po potrebi

    return 1;
}

// ==============================
// Automatski load pri spawn-u
// ==============================
public OnPlayerSpawn(playerid)
{
    for(new i = 0; i < MAX_TUNINGS; i++)
    {
        new vehicleid = TuningVehicleID[playerid][i];
        if(vehicleid != 0 && IsVehicleStreamedInForPlayer(vehicleid, playerid))
        {
            LoadTuning(playerid, vehicleid);
        }
    }
    return 1;
}

// ==============================
// ZCMD komande
// ==============================
CMD:savetuning(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You must be in a vehicle to save tuning!");
        return 0;
    }

    new name[32];
    if(sscanf(params, "s[32]", name))
    {
        SendClientMessage(playerid, 0xFF0000AA, "Usage: /savetuning [name]");
        return 0;
    }

    SaveTuning(playerid, vehicleid, name);
    return 1;
}

CMD:loadtuning(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You must be in a vehicle to load tuning!");
        return 0;
    }

    LoadTuning(playerid, vehicleid);
    return 1;
}

Bratu chatGPT napisao, bravoo

Ako nemaš šta konkretno reći o samom kodu bug, optimizaciju ili prijedlog onda je potpuno nebitno ko ga je ili kako pisao. Tema je rješenje, ne tvoja pretpostavka. LP 🙂

A misliš da se nema šta reći, čovjek iznad je u pravu da ti je kod napisao chatgpt, a prije 10 min sam ti odgovorio na post gdje nudis ljudima pomoc ili uslugu oko skriptanja, web sajtova itd, čitav tekst ti je napisao chatgpt i samo sam iznio misljenje da i sam trazis pomoc, i evo sad sam se uvjerio u to.

Kao npr očigledno je da uopste ne poznajes kod i nemoj se sramotit više sa chatgpt dečko evo navest cu ti najbanalnije primjere i skontat ces sam kolko si u crnjaku

SetVehicleNitro - ova funkcija uopste ne postoji nego se koristi "AddVehicleComponent"

GetVehicleEngine - ovu glupost necu ni da komentarišem jer ovo da nije smiješno bilo bi za plakanje

Y_INI_SetInt("tunings.ini", ...) i Y_INI_GetInt(...) gdje si našao ove funkcije ljubi te brat jel znaš kako yini uopste radi?

Ovo što si ti poslao dečku kao "pomoć" je nešto najgluplje što sam do sad vidio...

Ovo nije rasprava o autorstvu nego o rješenju. Ako nemaš konkretan kod ili prijedlog nema potrebe za daljnjim komentarima. LP 🙂

[ Web Developer | Coder ]

HTML · CSS · JavaScript

Web Development · Scripting · Servers

Cyber Security · System Safety

------------------------------------------------

Learning. Building. Securing.

Here to share knowledge and help the community.

------------------------------------------------

Foxyyy
10
Made Man
🔥52
2. Feb. 2026.
ZIAN.null wrote on February 2, 2026, 4:25 am:
sparrowww.aMx wrote on February 2, 2026, 4:17 am:
ZIAN.null wrote on February 1, 2026, 3:05 pm:
ajdind17 wrote on February 1, 2026, 8:40 am:
ZIAN-ADRIA wrote on January 31, 2026, 9:27 pm:
// Maksimalno tuninga po igraču
#define MAX_TUNINGS 50

// Čuvanje tuninga u memoriji za brzi load
new TuningName[MAX_PLAYERS][MAX_TUNINGS][64];
new TuningVehicleID[MAX_PLAYERS][MAX_TUNINGS];
new TuningCount[MAX_PLAYERS];

// ==============================
// Save tuning
// ==============================
public SaveTuning(playerid, vehicleid, name[])
{
    if(TuningCount[playerid] >= MAX_TUNINGS)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You reached max tunings!");
        return 0;
    }

    new index = TuningCount[playerid];
    strcopy(TuningName[playerid][index], sizeof(TuningName[][]), name);
    TuningVehicleID[playerid][index] = vehicleid;

    // Save to ini
    new section[64];
    format(section, sizeof(section), "Tuning_%d_%d", playerid, vehicleid);

    Y_INI_SetInt("tunings.ini", section, "Color1", GetVehicleColor(vehicleid, 0));
    Y_INI_SetInt("tunings.ini", section, "Color2", GetVehicleColor(vehicleid, 1));
    Y_INI_SetInt("tunings.ini", section, "Health", GetVehicleHealth(vehicleid));
    Y_INI_SetInt("tunings.ini", section, "Nitro", GetVehicleNitro(vehicleid));
    Y_INI_SetInt("tunings.ini", section, "Engine", GetVehicleEngine(vehicleid));
    // Dodaj ostale parametre po potrebi

    TuningCount[playerid]++;
    SendClientMessage(playerid, 0x00FF00AA, "Tuning saved successfully!");
    return 1;
}

// ==============================
// Load tuning
// ==============================
public LoadTuning(playerid, vehicleid)
{
    new section[64];
    format(section, sizeof(section), "Tuning_%d_%d", playerid, vehicleid);

    if(!Y_INI_Exists("tunings.ini", section))
    {
        // tuning ne postoji
        return 0;
    }

    new color1 = Y_INI_GetInt("tunings.ini", section, "Color1", 0);
    new color2 = Y_INI_GetInt("tunings.ini", section, "Color2", 0);
    new health = Y_INI_GetInt("tunings.ini", section, "Health", 1000);
    new nitro = Y_INI_GetInt("tunings.ini", section, "Nitro", 0);
    new engine = Y_INI_GetInt("tunings.ini", section, "Engine", 100);

    SetVehicleColor(vehicleid, color1, color2);
    SetVehicleHealth(vehicleid, health);
    SetVehicleNitro(vehicleid, nitro);
    SetVehicleEngine(vehicleid, engine);
    // Dodaj ostale parametre po potrebi

    return 1;
}

// ==============================
// Automatski load pri spawn-u
// ==============================
public OnPlayerSpawn(playerid)
{
    for(new i = 0; i < MAX_TUNINGS; i++)
    {
        new vehicleid = TuningVehicleID[playerid][i];
        if(vehicleid != 0 && IsVehicleStreamedInForPlayer(vehicleid, playerid))
        {
            LoadTuning(playerid, vehicleid);
        }
    }
    return 1;
}

// ==============================
// ZCMD komande
// ==============================
CMD:savetuning(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You must be in a vehicle to save tuning!");
        return 0;
    }

    new name[32];
    if(sscanf(params, "s[32]", name))
    {
        SendClientMessage(playerid, 0xFF0000AA, "Usage: /savetuning [name]");
        return 0;
    }

    SaveTuning(playerid, vehicleid, name);
    return 1;
}

CMD:loadtuning(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You must be in a vehicle to load tuning!");
        return 0;
    }

    LoadTuning(playerid, vehicleid);
    return 1;
}

Bratu chatGPT napisao, bravoo

Ako nemaš šta konkretno reći o samom kodu bug, optimizaciju ili prijedlog onda je potpuno nebitno ko ga je ili kako pisao. Tema je rješenje, ne tvoja pretpostavka. LP 🙂

A misliš da se nema šta reći, čovjek iznad je u pravu da ti je kod napisao chatgpt, a prije 10 min sam ti odgovorio na post gdje nudis ljudima pomoc ili uslugu oko skriptanja, web sajtova itd, čitav tekst ti je napisao chatgpt i samo sam iznio misljenje da i sam trazis pomoc, i evo sad sam se uvjerio u to.

Kao npr očigledno je da uopste ne poznajes kod i nemoj se sramotit više sa chatgpt dečko evo navest cu ti najbanalnije primjere i skontat ces sam kolko si u crnjaku

SetVehicleNitro - ova funkcija uopste ne postoji nego se koristi "AddVehicleComponent"

GetVehicleEngine - ovu glupost necu ni da komentarišem jer ovo da nije smiješno bilo bi za plakanje

Y_INI_SetInt("tunings.ini", ...) i Y_INI_GetInt(...) gdje si našao ove funkcije ljubi te brat jel znaš kako yini uopste radi?

Ovo što si ti poslao dečku kao "pomoć" je nešto najgluplje što sam do sad vidio...

Ovo nije rasprava o autorstvu nego o rješenju. Ako nemaš konkretan kod ili prijedlog nema potrebe za daljnjim komentarima. LP 🙂

HAHAHAHAHAHAHAHAHAHAHAHAH

Ja sad već mislim da je komplet profil AI, da ti uopste nisi stvarna osoba, pa čak i ovaj odgovor koji si mi dao je chatgpt napisao AHAHAHHA

A koje si ti rješenje dao čovjeku, dao si mu funkcije koje uopste ne postoje u sampu, dakle nema toga, on kad to upise u svoj mod dobice milion errora hahahahaha ne mogu da vjerujem

ZIAN-ADRIA
4
Rookie
2. Feb. 2026.
sparrowww.aMx wrote on February 2, 2026, 4:38 am:
ZIAN.null wrote on February 2, 2026, 4:25 am:
sparrowww.aMx wrote on February 2, 2026, 4:17 am:
ZIAN.null wrote on February 1, 2026, 3:05 pm:
ajdind17 wrote on February 1, 2026, 8:40 am:
ZIAN-ADRIA wrote on January 31, 2026, 9:27 pm:
// Maksimalno tuninga po igraču
#define MAX_TUNINGS 50

// Čuvanje tuninga u memoriji za brzi load
new TuningName[MAX_PLAYERS][MAX_TUNINGS][64];
new TuningVehicleID[MAX_PLAYERS][MAX_TUNINGS];
new TuningCount[MAX_PLAYERS];

// ==============================
// Save tuning
// ==============================
public SaveTuning(playerid, vehicleid, name[])
{
    if(TuningCount[playerid] >= MAX_TUNINGS)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You reached max tunings!");
        return 0;
    }

    new index = TuningCount[playerid];
    strcopy(TuningName[playerid][index], sizeof(TuningName[][]), name);
    TuningVehicleID[playerid][index] = vehicleid;

    // Save to ini
    new section[64];
    format(section, sizeof(section), "Tuning_%d_%d", playerid, vehicleid);

    Y_INI_SetInt("tunings.ini", section, "Color1", GetVehicleColor(vehicleid, 0));
    Y_INI_SetInt("tunings.ini", section, "Color2", GetVehicleColor(vehicleid, 1));
    Y_INI_SetInt("tunings.ini", section, "Health", GetVehicleHealth(vehicleid));
    Y_INI_SetInt("tunings.ini", section, "Nitro", GetVehicleNitro(vehicleid));
    Y_INI_SetInt("tunings.ini", section, "Engine", GetVehicleEngine(vehicleid));
    // Dodaj ostale parametre po potrebi

    TuningCount[playerid]++;
    SendClientMessage(playerid, 0x00FF00AA, "Tuning saved successfully!");
    return 1;
}

// ==============================
// Load tuning
// ==============================
public LoadTuning(playerid, vehicleid)
{
    new section[64];
    format(section, sizeof(section), "Tuning_%d_%d", playerid, vehicleid);

    if(!Y_INI_Exists("tunings.ini", section))
    {
        // tuning ne postoji
        return 0;
    }

    new color1 = Y_INI_GetInt("tunings.ini", section, "Color1", 0);
    new color2 = Y_INI_GetInt("tunings.ini", section, "Color2", 0);
    new health = Y_INI_GetInt("tunings.ini", section, "Health", 1000);
    new nitro = Y_INI_GetInt("tunings.ini", section, "Nitro", 0);
    new engine = Y_INI_GetInt("tunings.ini", section, "Engine", 100);

    SetVehicleColor(vehicleid, color1, color2);
    SetVehicleHealth(vehicleid, health);
    SetVehicleNitro(vehicleid, nitro);
    SetVehicleEngine(vehicleid, engine);
    // Dodaj ostale parametre po potrebi

    return 1;
}

// ==============================
// Automatski load pri spawn-u
// ==============================
public OnPlayerSpawn(playerid)
{
    for(new i = 0; i < MAX_TUNINGS; i++)
    {
        new vehicleid = TuningVehicleID[playerid][i];
        if(vehicleid != 0 && IsVehicleStreamedInForPlayer(vehicleid, playerid))
        {
            LoadTuning(playerid, vehicleid);
        }
    }
    return 1;
}

// ==============================
// ZCMD komande
// ==============================
CMD:savetuning(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You must be in a vehicle to save tuning!");
        return 0;
    }

    new name[32];
    if(sscanf(params, "s[32]", name))
    {
        SendClientMessage(playerid, 0xFF0000AA, "Usage: /savetuning [name]");
        return 0;
    }

    SaveTuning(playerid, vehicleid, name);
    return 1;
}

CMD:loadtuning(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You must be in a vehicle to load tuning!");
        return 0;
    }

    LoadTuning(playerid, vehicleid);
    return 1;
}

Bratu chatGPT napisao, bravoo

Ako nemaš šta konkretno reći o samom kodu bug, optimizaciju ili prijedlog onda je potpuno nebitno ko ga je ili kako pisao. Tema je rješenje, ne tvoja pretpostavka. LP 🙂

A misliš da se nema šta reći, čovjek iznad je u pravu da ti je kod napisao chatgpt, a prije 10 min sam ti odgovorio na post gdje nudis ljudima pomoc ili uslugu oko skriptanja, web sajtova itd, čitav tekst ti je napisao chatgpt i samo sam iznio misljenje da i sam trazis pomoc, i evo sad sam se uvjerio u to.

Kao npr očigledno je da uopste ne poznajes kod i nemoj se sramotit više sa chatgpt dečko evo navest cu ti najbanalnije primjere i skontat ces sam kolko si u crnjaku

SetVehicleNitro - ova funkcija uopste ne postoji nego se koristi "AddVehicleComponent"

GetVehicleEngine - ovu glupost necu ni da komentarišem jer ovo da nije smiješno bilo bi za plakanje

Y_INI_SetInt("tunings.ini", ...) i Y_INI_GetInt(...) gdje si našao ove funkcije ljubi te brat jel znaš kako yini uopste radi?

Ovo što si ti poslao dečku kao "pomoć" je nešto najgluplje što sam do sad vidio...

Ovo nije rasprava o autorstvu nego o rješenju. Ako nemaš konkretan kod ili prijedlog nema potrebe za daljnjim komentarima. LP 🙂

HAHAHAHAHAHAHAHAHAHAHAHAH

Ja sad već mislim da je komplet profil AI, da ti uopste nisi stvarna o...

... (content truncated)

Svi ste vi neki opasni skripteri i mangupi, zato vam je 80% servera na Balkanu teško sranje. Ljudi vam koriste bagove za sve živo, a serveri vam pucaju barem jednom sedmično. 😂

[ Web Developer | Coder ]

HTML · CSS · JavaScript

Web Development · Scripting · Servers

Cyber Security · System Safety

------------------------------------------------

Learning. Building. Securing.

Here to share knowledge and help the community.

------------------------------------------------

Foxyyy
10
Made Man
🔥52
2. Feb. 2026.

Mi nismo skripteri, a ti pošto si profi skripter, mozes li mi reći gdje si našao ovu funkciju "SetVehicleNitro" pošto nije nikad postojala od kako je samp, koristi se skroz druga.....

ZIAN-ADRIA
4
Rookie
2. Feb. 2026.
sparrowww.aMx wrote on February 2, 2026, 4:41 am:

Mi nismo skripteri, a ti pošto si profi skripter, mozes li mi reći gdje si našao ovu funkciju "SetVehicleNitro" pošto nije nikad postojala od kako je samp, koristi se skroz druga.....

Uostalom, ako želiš o nečemu raspravljati, imaš privatne poruke, pa se tamo javi. Vjeruj mi da ljude ne zanima javno kako ispadaš ‘pametan’. 😂

[ Web Developer | Coder ]

HTML · CSS · JavaScript

Web Development · Scripting · Servers

Cyber Security · System Safety

------------------------------------------------

Learning. Building. Securing.

Here to share knowledge and help the community.

------------------------------------------------

RIDLIIII ADRIA
4
Rookie
3. Feb. 2026.

'SetVehicleNitro' ? nisam dugo u sampu jel ovo nesto novo ? 😂

Nodze
8
Crime Lord
3. Feb. 2026.

Manite se njega Ae vi Men pomozite

Kako najbolje Napravit load i čuvanje

Dal dodat u vozilo sistem da se zajedno čuva ili kako

😆😆😆😆😆😆

Ljubi vas brat

Vlasnik Zajednice: Ghost Town since 2016

Vlasnik Zajednice : Spotify Ogc since 2018

RIDLIIII ADRIA
4
Rookie
3. Feb. 2026.
Dzenan Levic wrote on February 3, 2026, 11:16 am:

Manite se njega Ae vi Men pomozite

Kako najbolje Napravit load i čuvanje

Dal dodat u vozilo sistem da se zajedno čuva ili kako

😆😆😆😆😆😆

Ljubi vas brat

Pitaj ChatGPT 😂

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha