[Include] SetPlayerPositionWithVehicle(playerid, x, y, z); - 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: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] SetPlayerPositionWithVehicle(playerid, x, y, z); (
/showthread.php?tid=300959)
SetPlayerPositionWithVehicle(playerid, x, y, z); -
[ITS]StatickShock - 02.12.2011
hi all, today I have made a simple include, with this function can set the player position when the player is in the car.
Код:
SetPlayerPositionWithVehicle(playerid, x, y, z);
this is the script:
Код:
#include <a_samp>
SetPlayerPosWithVehicle(playerid, Float:X, Float:Y, Float:Z)
{
SetPlayerPosEx(playerid,X,Y,Z);
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid),X,Y,Z);
LinkVehicleToInterior(GetPlayerVehicleID(playerid),0);
PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0);
SetVehicleZAngle(GetPlayerVehicleID(playerid),0.0);
}
}
SetPlayerPosEx(playerid, Float:X, Float:Y, Float:Z)
{
SetPlayerPos(playerid,X,Y,Z);
SetPlayerInterior(playerid,0);
SetPlayerWorldBounds(playerid, 99999.0, -99999.0, 99999.0, -99999.0);
}
DOWNLOAD:
http://solidfiles.com/d/6fd244e65c/
Re: SetPlayerPositionWithVehicle(playerid, x, y, z); -
System64 - 02.12.2011
what did I posted in the useful functions thread?
Re: SetPlayerPositionWithVehicle(playerid, x, y, z); -
Fool - 02.12.2011
Useful Snippets
Re: SetPlayerPositionWithVehicle(playerid, x, y, z); -
pagie1111 - 02.12.2011
You should make it SetPlayerPosWithVehicle(playerid,Float: p_x,Float: p_y,Float: p_z,Float:veh_a);
What if you don't want the 0.0 facing angle with the car...?
Re: SetPlayerPositionWithVehicle(playerid, x, y, z); -
Dark_Kostas - 02.12.2011
Are you sure this is working if the player is in a vehicle? Because if you set his position then he can't be the "Driver", so everything after setting his normal position won't work.
Respuesta: SetPlayerPositionWithVehicle(playerid, x, y, z); -
[Nikk] - 04.12.2011
Woow, very nice