04.01.2014, 14:20
There are few problems with the code:
x, y, z parameters must have Float tag.
In SetVehiclePosEx:
Assuming you wanted to set the vehicle's vw but you wrote the above by accident. It should be:
You forgot to add the semicolon (;) at the end of these:
Atleast, you could try compiling it first before posting it (I read it from pastebin - I don't know if it's the same for the other link).
Also one suggestion. Instead of declaring and storing to two (kind of pointless) variables that are used only once:
You could do that directly:
pawn Код:
stock SetVehiclePosEx(id, x, y, z, vw, int)
pawn Код:
stock SetVehiclePosEx(id, Float: x, Float: y, Float: z, vw, int)
pawn Код:
SetPlayerVirtualWorld(playerid, vw);
pawn Код:
SetVehicleVirtualWorld(id, vw);
pawn Код:
SetVehiclePos(id, x, y, z)
pawn Код:
SetVehiclePosEx(vehid, x, y, z, vw, int)
Also one suggestion. Instead of declaring and storing to two (kind of pointless) variables that are used only once:
pawn Код:
new vw = GetPlayerVirtualWorld(playerid);
new int = GetPlayerInterior(playerid);
SetVehiclePosEx(vehid, x, y, z, vw, int);
pawn Код:
SetVehiclePosEx(vehid, x, y, z, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));