Elevator
#1

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 ...
Reply
#2

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
Reply
#3

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...
Reply
#4

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)