17.07.2016, 12:00
pawn Код:
[CMD:say(playerid,params[])// /say command
{
new string[128], say[100];// Store the intial action
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(sscanf(params, "s[100]",say)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /s [Action]");//Error handling
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerInRangeOfPoint(i, 25.0, x, y, z))
{
format(string,sizeof(string),"*%s says\58 \34%s\34",GetName(playerid),say);//Formats the /shout cmd output
SendClientMessage(i,COLOR_LIGHTBLUE,string);
}
else SendClientMessage(playerid, COLOR_SILVER, "You spoke but nobody heard you...");
break;
}
return 1;
}