06.04.2009, 17:40
Hello,
when a car spawn, it should change the position. But it doesn't work.
Edit: https://sampwiki.blast.hk/wiki/SetVehiclePos
Who know how i set a vehicle used when it spawn?
when a car spawn, it should change the position. But it doesn't work.
Код:
public OnVehicleSpawn(vehicleid) { motors[vehicleid] = 0; if(vehicleid > 215 && vehicleid < 240) { new Float:X, Float:Y, Float:Z; new string[256]; format(string, sizeof(string), "%dx", vehicleid); X = dini_Float("Autohaus2.ini", string); format(string, sizeof(string), "%dy", vehicleid); Y = dini_Float("Autohaus2.ini", string); format(string, sizeof(string), "%dz", vehicleid); Z = dini_Float("Autohaus2.ini", string); if(X == 999 && Y == 999 && Z == 999) { } else { SetVehiclePos(vehicleid, X, Y, Z); } } return 1; }
Quote:
Important note: This function ONLY works if someone has been in the vehicle since it spawn. |