11.12.2010, 17:44
Correct, you cant print a complete function, but if you put it in print, it prints whatever it returns, rather than the information in the function.
I have a stock that should load a specified vehicle from a file. Here is the stock - You will be able to see that i am trying to attach that vehicle to an array.
I have a stock that should load a specified vehicle from a file. Here is the stock - You will be able to see that i am trying to attach that vehicle to an array.
pawn Код:
stock LoadVehicle(vid)
{
DestroyVehicle(Vehicles[vid]);
DestroyDynamic3DTextLabel(VehicleText[vid]);
new file[64], string[64], Float:x, Float:y, Float:z;
format(file, sizeof(file), "vehicles/%i.veh", vid);
Vehicles[vid] = CreateVehicle(dini_Int(file, "Model"), dini_Float(file, "x"), dini_Float(file, "y"), dini_Float(file, "z"), dini_Float(file, "rot"), dini_Int(file, "Colour1"), dini_Int(file, "Colour2"), 23);
printf("%i", Vehicles[vid]); //Here i tried to print the id, it still gave -1.
format(string, sizeof(string), "This vehicle is owned by %s\nIt cost %i", dini_Get(file, "Owner"), dini_Int(file, "Cost"));
GetVehiclePos(Vehicles[vid], x, y, z);
VehicleText[vid] = CreateDynamic3DTextLabel(string, COLOUR, x, y, z, 5.0, -1, Vehicles[vid], 0, -1, -1, -1, 100.0);
}