Local System need - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Local System need (
/showthread.php?tid=240881)
Local System need -
y@sin1 - 16.03.2011
message 40 meters close neighborhood read System --" /local and /l "commands with use
Message :Chat Box and player above get color :0x0074F6AA
Re: Local System need -
maramizo - 16.03.2011
Use IsPlayerInRangeOfPoint.
Re: Local System need -
y@sin1 - 17.03.2011
Quote:
Originally Posted by maramizo
Use IsPlayerInRangeOfPoint.
|
Re: Local System need -
Medal Of Honor team - 17.03.2011
SEE THIS
Re: Local System need -
y@sin1 - 19.03.2011
Quote:
Originally Posted by Medal Of Honor team
|
no this not
Re: Local System need -
xDeadlyBoy - 19.03.2011
i don't get it...
use the IsPlayerInRangeOfPoint function in the command:
pawn Код:
if(!strcmp(cmdtext, "/local", true) || !strcmp(cmdtext, "/l", true))
{
if(!IsPlayerInRangeOfPoint(playerid, 40, x, y, z))return SendClientMessage(playerid, 0xFFFFFFAA, "You are not close enough.");
//rest of the command
return 1;
}
make sure you edit the xyz in the function.
Re: Local System need -
Sascha - 19.03.2011
pawn Код:
forward LocalMessage(playerid, text[]);
public LocalMessage(playerid, text[])
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, 40.00, x, y, z))
{
SendClientMessage(i, 0x999999AA, text);
}
}
}
return 1;
}
Re: Local System need -
y@sin1 - 20.03.2011
Quote:
Originally Posted by Sascha
pawn Код:
forward LocalMessage(playerid, text[]); public LocalMessage(playerid, text[]) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); for(new i=0; i<GetMaxPlayers(); i++) { if(IsPlayerConnected(i)) { if(IsPlayerInRangeOfPoint(i, 40.00, x, y, z)) { SendClientMessage(i, 0x999999AA, text); } } } return 1; }
|
Thanks
Re: Local System need -
y@sin1 - 20.03.2011
Quote:
Originally Posted by xDeadlyBoy
i don't get it...
use the IsPlayerInRangeOfPoint function in the command:
pawn Код:
if(!strcmp(cmdtext, "/local", true) || !strcmp(cmdtext, "/l", true)) { if(!IsPlayerInRangeOfPoint(playerid, 40, x, y, z))return SendClientMessage(playerid, 0xFFFFFFAA, "You are not close enough."); //rest of the command return 1; }
make sure you edit the xyz in the function.
|
Thanks