02.08.2010, 20:40
pawn Код:
if(strcmp(cmd, "/l", true) == 0 || strcmp(cmd, "/local", true) == 0)
{
new message[256], Float:x, Float:y, Float:z;
GetPlayerName(playerid, sendername, sizeof(sendername));
message = strrest(cmdtext, idx);
if(!strlen(message))
{
SendClientMessage(playerid, COLOR_PINK,"USAGE: /l(ocal) [message]");
return 1;
}
for(new i=0; i <= GetMaxPlayers(); i++)
{
GetPlayerPos(playerid, x, y, z);
if(PlayerToPoint(10.0, playerid, x, y, z))
{
format(string, sizeof(string),"%s(%d) says: %s", sendername, playerid, message);
SendClientMessageToAll(COLOR_PURPLE, string);
return 1;
}
}
}
return 1;
}