[Include] SetPlayerPosEx - 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] SetPlayerPosEx (
/showthread.php?tid=321749)
Re: SetPlayerPosEx -
Crazymax - 29.04.2012
pawn Code:
stock SetPlayerPosEx(playerid, Float:x, Float:y, Float:z, Float:a = -1.0, interior = -1, vw = -1)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vehicleid=GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid,x,y,z);
if(a == -1.0) GetVehicleZAngle(vehicleid, a);
SetVehicleZAngle(vehicleid,a);
if(interior == -1) interior = GetPlayerInterior(playerid);
LinkVehicleToInterior(vehicleid, interior);
if(vw == -1) vw = GetVehicleVirtualWorld(vehicleid);
SetVehicleVirtualWorld(vehicleid, vw);
}
else
{
SetPlayerPos(playerid, x, y, z);
if(a == -1.0) GetPlayerFacingAngle(playerid, a);
SetPlayerFacingAngle(playerid, a);
if(interior == -1) interior = GetPlayerInterior(playerid);
SetPlayerInterior(playerid, interior);
if(vw == -1) vw = GetPlayerVirtualWorld(playerid);
SetPlayerVirtualWorld(playerid, vw);
}
return 1;
}
the expanded expanded version lol, btw is there no GetVehicleInterior? weird
Respuesta: SetPlayerPosEx -
[DOG]irinel1996 - 29.04.2012
Pretty simple, but this sometimes saves time.
Re: SetPlayerPosEx -
lucas_mdr1235 - 29.04.2012
Congratulations single most useful.
Re: SetPlayerPosEx -
rscaerzx - 29.04.2012
Quote:
Originally Posted by Crazymax
the expanded expanded version lol, btw is there no GetVehicleInterior? weird
|
This is
SetPlayerPosEx, it's not
SetVehiclePosEx. Btw good job for your first include Ballu Miaa!
Re: SetPlayerPosEx -
Ballu Miaa - 30.04.2012
Quote:
Originally Posted by rscaerzx
This is SetPlayerPosEx, it's not SetVehiclePosEx. Btw good job for your first include Ballu Miaa!
|
Hey Brother thanks alot. Just thought of it to save time.
Quote:
Originally Posted by Krx17
-1.0 means not to change that value. So if interior is set to -1, it means keep the player's interior the same when he teleports.
|
Okay. Allright i forgot that. Thanks for reminding of it. Maybe i can add it on v1.2. Thanks lot guys.
Quote:
Originally Posted by Crazymax
pawn Code:
stock SetPlayerPosEx(playerid, Float:x, Float:y, Float:z, Float:a = -1.0, interior = -1, vw = -1) { if(IsPlayerInAnyVehicle(playerid)) { new vehicleid=GetPlayerVehicleID(playerid); SetVehiclePos(vehicleid,x,y,z); if(a == -1.0) GetVehicleZAngle(vehicleid, a); SetVehicleZAngle(vehicleid,a); if(interior == -1) interior = GetPlayerInterior(playerid); LinkVehicleToInterior(vehicleid, interior); if(vw == -1) vw = GetVehicleVirtualWorld(vehicleid); SetVehicleVirtualWorld(vehicleid, vw); } else { SetPlayerPos(playerid, x, y, z); if(a == -1.0) GetPlayerFacingAngle(playerid, a); SetPlayerFacingAngle(playerid, a); if(interior == -1) interior = GetPlayerInterior(playerid); SetPlayerInterior(playerid, interior); if(vw == -1) vw = GetPlayerVirtualWorld(playerid); SetPlayerVirtualWorld(playerid, vw); } return 1; }
the expanded expanded version lol, btw is there no GetVehicleInterior? weird
|
Just wanted it to be for a player bro.
Quote:
Originally Posted by lucas_mdr1235
Congratulations single most useful.
|
Thanks Bro.
PS
Glad you all liked it.
Re: SetPlayerPosEx -
FalconX - 01.05.2012
Time saving script, good work bro
-FalconX
Re: SetPlayerPosEx -
Ballu Miaa - 02.05.2012
Quote:
Originally Posted by FalconX
Time saving script, good work bro
-FalconX
|
Yeah Thanks ma bro Falcon