Local System need
#1

message 40 meters close neighborhood read System --" /local and /l "commands with use

Message :Chat Box and player above get color :0x0074F6AA
Reply
#2

Use IsPlayerInRangeOfPoint.
Reply
#3

Quote:
Originally Posted by maramizo
Посмотреть сообщение
Use IsPlayerInRangeOfPoint.
Reply
#4

SEE THIS
Reply
#5

Quote:
Originally Posted by Medal Of Honor team
Посмотреть сообщение
no this not
Reply
#6

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.
Reply
#7

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;
}
Reply
#8

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
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)