SA-MP Forums Archive
My car system - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: My car system (/showthread.php?tid=244049)



My car system - austin070 - 25.03.2011

Hey guys. I just attempted to make a vehicle system. It saves all of the vehicle information to an ini file using dini correctly. However, the vehicles won't spawn OnGameModeInit. Here is what I have to make them spawn:
pawn Код:
for(new i = 1; i<MAX_VEHICLES; i++) {
        format(file, sizeof(file),VEHICLE, i);
        CreateVehicle(VehicleInfo[i][Model],VehicleInfo[i][vx],VehicleInfo[i][vy],VehicleInfo[i][vz], VehicleInfo[i][va],VehicleInfo[i][Color1],VehicleInfo[i][Color2], 99999);
        strcat(VehicleInfo[i][Owner], dini_Get(file, "Owner"), 50);
}
If any more info is needed, just ask.


Re: My car system - AK47317 - 25.03.2011

CreateVehicle


Re: My car system - austin070 - 25.03.2011

Quote:
Originally Posted by AK47317
Посмотреть сообщение
I know the parameters for CreateVehicle. I can't get my code to spawn the vehicles from the ini files.


Re: My car system - AK47317 - 25.03.2011

the re spawn delay too long for 99999 lol change it to 1

maybe..


Re: My car system - austin070 - 25.03.2011

Quote:
Originally Posted by AK47317
Посмотреть сообщение
the re spawn delay too long for 99999 lol change it to 1

maybe..
That wouldn't cause it.


Re: My car system - AK47317 - 25.03.2011

respawn_delay The delay until the car is respawned without a driver in seconds.


Re: My car system - austin070 - 25.03.2011

Quote:
Originally Posted by AK47317
Посмотреть сообщение
respawn_delay The delay until the car is respawned without a driver in seconds.
That's the REspawn.


Re: My car system - AK47317 - 25.03.2011

never though that happen :P


Re: My car system - Mike Garber - 25.03.2011

Type -1 in the respawn delay and it will never respawn.
And you don't seem to load the vehicle data before creating the vehicle.


Re: My car system - austin070 - 25.03.2011

Quote:
Originally Posted by Mike Garber
Посмотреть сообщение
Type -1 in the respawn delay and it will never respawn.
And you don't seem to load the vehicle data before creating the vehicle.
So.. Do you have any idea of how to fix my problem?