11.03.2010, 03:10
How do i make it so player cant chat from a certain distance...
public OnPlayerText(playerid,text[])
{
if(IsPlayerInRangeOfPoint(playerid,distance, X, Y, Z))
{
SendClientMessage(playerid,ERROR,"You are too far away from whatever. You may not speak.");
return 0;
}
return 1;
}
stock IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z)
{
new
Float:px,
Float:py,
Float:pz;
GetPlayerPos(playerid, px, py, pz);
px -= x;
py -= y;
pz -= z;
return ((px * px) + (py * py) + (pz * pz)) < (range * range);
}
Originally Posted by Backwardsman97
pawn Код:
|
C:\Users\KeeBoo~MR.Xbox.Live\Desktop\GTA Samp\gamemodes\rlrp.pwn(445) : error 017: undefined symbol "distance" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Originally Posted by Keeboo13
Код:
C:\Users\KeeBoo~MR.Xbox.Live\Desktop\GTA Samp\gamemodes\rlrp.pwn(445) : error 017: undefined symbol "distance" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
Originally Posted by Keeboo13
wat is da range most servers use
|
public OnPlayerText(playerid,text[]) { if(IsPlayerInRangeOfPoint(playerid,10.0,10.0,10.0)) { SendClientMessage(playerid,COLOR_GRAD1,"You are too far away from whatever. You may not speak."); return 0; } return 1; }
C:\Users\Boy ifdsg\TA Samp\gamemodes\rlrp.pwn(2436) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
Originally Posted by Keeboo13
Код:
C:\Users\Boy ifdsg\TA Samp\gamemodes\rlrp.pwn(2436) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning. |