Elevator - 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)
+--- Thread: Elevator (
/showthread.php?tid=545881)
Elevator -
trapstar2020 - 11.11.2014
So i'm trying to remake ls elevator somewhere and having problems with the cords
Is there someway to detect if the player is standing in the elevator i tried many different methods even stream dynamic area but no luck ...
Re: Elevator -
HY - 11.11.2014
Check if him it's in range of point. In elevator. In your command to move lift:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, RANGE, X, Y, Z))
Replace Range, and X,Y,Z, with your coordinates !
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Re: Elevator -
trapstar2020 - 11.11.2014
Have you look at the Ls_Elevator script ? ... i'm trying to determine if the player is inside or outside the elevator... that's won't be of any use to me in what i'm trying to do...
Re: Elevator -
dominik523 - 11.11.2014
The best way would be this function:
Код:
stock IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY)
{
return 1;
}
return 0;
}