Script Related Question-Position
#1

Hi, I Just started Learning scripting, I started with easy commands like /fixveh, /nos...I'm Adding a /repair command, But I need the player to be in a specific location, So I wonder how Can I do that? Exp: I want to verify if the player is in the mechanic place or 10Meters far, If not he'll get a checkpoint!
So All I want is; Is there any function to verify If the player is at the wanted location or not? I can't find one in Wiki
Reply
#2

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10.0, X, Y, Z))
{
// code
}

else SetPlayerCheckpoint(playerid, x, y, z, size);
https://sampwiki.blast.hk/wiki/Function:SetPlayerCheckpoint
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Reply
#3

thanks!! That's exactly what I've been looking for!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)