31.08.2011, 21:08
I recommend using sscanf and zcmd. The way you could do this with these is....
PHP код:
CMD:me(playerid, params[])
{
new action[256], string[256], name[24], Float:x, Float:y, Float:z;
if(sscanf(params, "s[256]", action))
{
SendClientMessage(playerid, COLOR, "USAGE: /me [action]");
}
else
{
GetPlayerName(playerid, name, 24);
GetPlayerPos(playerid, x, y, z);
format(string, 256, "* %s %s *", name, action);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 10, x, y, z))
{
SendClientMessage(i, COLOR, string);
}
}
}
return 1;
}

