14.07.2011, 19:48
How to make script that will say character is too far away, if he will? please?
IsPlayerInRangeOfPoint(playerid,radius,x,y,z);
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;
}
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
}
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 |