SA-MP Forums Archive
[HELP] car creating free slot id - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] car creating free slot id (/showthread.php?tid=463873)



[HELP] car creating free slot id - Luca12 - 14.09.2013

Hello everyone I have huge problem. I have a great car ownership but the problem is when player buy a car oke in the folder cars is create car_0 and inside is a name of a car owner position's and that kind of staff but he problem is when second player buy a car then it should be create car_1 but instead it's replaced with car_0 and change everything for last player who buy a car if you know what I mean. Please help. Thanks


Re : [HELP] car creating free slot id - 1Geek - 14.09.2013

Can you give the ownership system?


Re: [HELP] car creating free slot id - Luca12 - 14.09.2013

what you need ?


edit: I use this code for creating file boat_0 boat_1 that work's, and the same code I use for cars but it doesn't work I don't know why?

pawn Код:
stock GetNextID()
{
    new c = 0,file4[512];
    for(new i = 0; i < MAX_AUTA; i++)//Promeni NEKI_BROJ_MAX_ZA_COS to je broj kola koliko je maksimalno posto si tako radio
    {
        format(file4, sizeof(file4), FPATH,i);
        if(fexist(file4)) c++;
    }
    return c;
}