(HELP) Chracter is too far away
#1

How to make script that will say character is too far away, if he will? please?
Reply
#2

PHP код:
IsPlayerInRangeOfPoint(playerid,radius,x,y,z); 
Reply
#3

IsPlayerInRangeOfPlayer is your friend.
Reply
#4

It's an example of a command.
pawn Код:
CMD:check(playerid, params[]) {
    if(!IsPlayerInRangeOfPoint(playerid, radius, x,y,z)) return SendClintMessage(playerid, -1, "You are not near the POSITION!"); // Change X, Y, Z, RADIUS.
    // Do whatever you want to open when he is close.
    return 1;
}
Reply
#5

Thanks, but this is not what i need..
Reply
#6

pawn Код:
new Float:Position[3];

GetPlayerPos(PersonWhoYourTooFarAwayFrom, Position[0], Position[1], Position[2]);

if(!IsPlayerinRangeOfPoint(playerid, 30, Position[0], Position[1], Position[2])) return SendClientMessage(playerid, -1, "You're too far away!");
else
{
//your code
}
Is that what you're looking for?
Reply
#7

Quote:

CarLicenses.pwn(299) : error 029: invalid expression, assumed zero
CarLicenses.pwn(299) : warning 215: expression has no effect
CarLicenses.pwn(299) : warning 215: expression has no effect
CarLicenses.pwn(299) : warning 215: expression has no effect
CarLicenses.pwn(299) : error 001: expected token: ";", but found ")"
CarLicenses.pwn(299) : error 029: invalid expression, assumed zero
CarLicenses.pwn(299) : fatal error 107: too many error messages on one line

This errors i get
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)