Vehicle spawning
#1

Why doesn't this work? I'm trying to make a code that will spawn vehicles from the info in scriptfiles folder,(every car has its own .ini by its ID ) i menaged to dini_Create all .inis but why doesnt this work? Any help? Doesnt have to be with a timer... Thanks.
Код:
public SpawnCar(vehicleid)
{
for(new i=0; i < MAX_VEHICLES; i++)
{

new pFile2[100];
format(pFile2, sizeof(pFile2), CARS_PATH,i);
CreateVehicle(dini_Int(pFile2,"Model"),dini_Float(pFile2,"X"),dini_Float(pFile2,"Y"),dini_Float(pFile2,"Z"),dini_Float(pFile2,"A"),2,2,999);
}
    return 1;
}
public OnGameModeInit()
{
SetTimerEx("SpawnCar",1000/*one second */,true,"d",i);

}
Reply


Messages In This Thread
Vehicle spawning - by Aleksalaz - 02.06.2012, 10:56
Re: Vehicle spawning - by Niko_boy - 02.06.2012, 11:04
Re: Vehicle spawning - by Aleksalaz - 02.06.2012, 11:14

Forum Jump:


Users browsing this thread: 1 Guest(s)