loading position + z 5 - 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: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: loading position + z 5 (
/showthread.php?tid=136679)
loading position + z 5 -
rbN. - 26.03.2010
How do you load position with a vehicle and then put +Z 5 ? Like, if you load your position and if your in a vehicle, you go 5 meter higher then normal
Re: loading position + z 5 -
[cA]Unforseen - 26.03.2010
here:
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x,y,z);
if(vehicleid == 0)
{
SetPlayerPos(playerid, x,y,z+5);
}
return 1;
}
replace 0 with the vehicle id you want.
Re: loading position + z 5 -
woot - 26.03.2010
pawn Код:
// The function where to store the players position:
new Float:eCoordinates[3];
GetPlayerPos(playerid, eCoordinates[0], eCoordinates[1], eCoordinates[2]);
// When loading the position
SetPlayerPos(playerid, eCoordinates[0], eCoordinates[1], eCoordinates[2] + 5); // + 5 meaning +5 to the z coord