01.02.2011, 17:17
Hmmm...Why using ProxDetector for /me command?? When you can use NearByMessage function
And I suggest you to use ZCMD.
Function:
And I suggest you to use ZCMD.
pawn Код:
COMMAND:me(playerid, params[])
{
new string[128], MText[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(!sscanf(params, "s[128]",MText))
{
format(string, sizeof(string), "** %s %s", name, params[0]);
NearByMessage(playerid, 0xBC43B9FF, string);
}
else return SendClientMessage(playerid, COLOR_WHITE, "[INFO]: /me [Action]");
return 1;
}
pawn Код:
forward NearByMessage(playerid, colour, string[]);
public NearByMessage( playerid, colour, string[])
{
new Float: PlayerX, Float: PlayerY, Float: PlayerZ;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnectedEx( i ) && IsPlayerSpawned( playerid ) )
{
GetPlayerPos( playerid, PlayerX, PlayerY, PlayerZ);
if(IsPlayerInRangeOfPoint(i, 12, PlayerX, PlayerY, PlayerZ) )
{
if(GetPlayerVirtualWorld( playerid ) == GetPlayerVirtualWorld( i ) && GetPlayerInterior( playerid ) == GetPlayerInterior( i ) )
{
SendClientMessage(i, colour, string);
}
}
}
}
return true;
}