How to load vehicles from file? - 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: How to load vehicles from file? (
/showthread.php?tid=132588)
How to load vehicles from file? -
Torran - 08.03.2010
Hello,
Im making a park command and im wondering how to load vehicle coordinates from a file, But only if its named a certain thing,
Lets say i typed /park, And in parkedcars.ini it would say Torran - XCoord, YCoord, ZCoord, Angle
But in my script how would i load them coordinates, ONLY if the names torran,
Re: How to load vehicles from file? -
aircombat - 08.03.2010
idk what u mean but take a look at that code :
Код:
new total_vehicles_from_files=0;
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
if(strcmp("/park", cmd, true) == 0) {
if(strcmp(name, "Torran") == 0) {
total_vehicles_from_files += LoadStaticVehiclesFromFile("parkedcars.ini"); // should be in scriptfiles
return 1;
}
else return SendClientMessage(playerid, COLOR_RED, " You Aren't Torran");
}
________
IOLITE PORTABLE BUTANE VAPORIZER
Re: How to load vehicles from file? -
Torran - 08.03.2010
That would load the code,
And id need it for other people too,
Like roleplay /park commands