06.11.2010, 13:59
In my script I spawn all the vehicles form a txt, it looks like this:
vehicles.txt:
Hope this could help you.
pawn Код:
new File:vehicles=fopen("vehicles.txt", io_read);
new idx;
while(fread(vehicles, string)){
idx = 0
modelid = strval(strtok(string,idx));
X = floatstr(strtok(string,idx));
Y = floatstr(strtok(string,idx));
Z = floatstr(strtok(string,idx));
rot = floatstr(strtok(string,idx));
c1 = strval(strtok(string,idx));
c2 = strval(strtok(string,idx));
AddStaticVehicle(modelid,X,Y,Z,rot,c1,c2);
}
Код:
(...)411 2034.5016 1912.5874 11.9048 0.2909 123 1 411 2172.1682 1988.8643 10.5474 89.9151 116 1(...)