Could someone explain me a thing?[Urgently]
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
Ahh, you're complaining about after a restart - that's different. In that case why are you storing the ID in the first place? As you've seen IDs are meaningless over server restarts. Just store the data on the vehicle such as model, colour etc and recreate the vehicle every mode start, saving the returned ID in a global for that run only.
Ohh,facepalm.I didn't even think about that .
So this would be ok?

Command /buyvehicle
pawn Код:
/* PS: every vehicle has a file [1.ini;2.ini;3.ini...].*/


new veh;
for(new h = 1; h < sizeof(CarInfo); h++)//This will count the last vehicle created
{
    if(CarInfo[h][cOwned] == 1)
    {
        veh = h + 1;
        }
}
CarInfo[veh][vID] = veh;
PlayerInfo[playerid][pckey] = veh;
That's what you meant?xD
Reply


Messages In This Thread
Could someone explain me a thing?[Urgently] - by SkizzoTrick - 14.03.2011, 20:24
Re: Could someone explain me a thing?[Urgently] - by SkizzoTrick - 15.03.2011, 15:01
Re: Could someone explain me a thing?[Urgently] - by SkizzoTrick - 15.03.2011, 16:08
Re: Could someone explain me a thing?[Urgently] - by SkizzoTrick - 15.03.2011, 16:48

Forum Jump:


Users browsing this thread: 2 Guest(s)