06.01.2013, 14:35
I want my whisper command to send clientmessage to all players around by 15 steps,but it only sends it to the player and creates the chat bubble string.
pawn Код:
COMMAND:w(playerid,params[])
{
new string[128];
if(sscanf(params,"s[250]",string)) return SendClientMessage(playerid,RED,"USAGE:/w [message]");
SetPlayerChatBubble(playerid,string,YELLOW,35,10000);
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
new pName[24];
GetPlayerName(playerid,pName,sizeof(pName));
new string2[128];
format(string2,sizeof(string2),"%s(%d): %s",pName,playerid,string);
for(new i=0;i<=MAX_PLAYERS;i++)
{
if(IsPlayerInRangeOfPoint(i,15.0,x,y,z)) return SendClientMessage(playerid,YELLOW,string2);
}
return 1;
}