20.06.2011, 14:43
You could use a function from the GF script which is the "ProxDetecor" or make a callback that sends the message to all the players around him/her.
Try this:
I didn't test the code though, hope it works.
Try this:
Код:
forward SlashMe(playerid, string[], Float:x, Float:y, Float:z); public SlashMe(playerid, string[], Float:x, Float:y, Float:z) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerInRangeOfPoint(i, 5.0, x, y, z)) { SendClientMessage(i, 0xCE6FD9FF, string); } } } if(strcmp(cmd, "/tazer", true) == 0) { if(IsPlayerConnected(playerid)) { new pos[3], text[64], playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, sizeof(playername) GetPlayerPos(playerid, pos[0], pos[1], pos[2]); // do something here format(text, sizeof(text), "* %s unholsters their taze.", playername); SlashMe(playerid, text, pos[0], pos[1], pos[2]); } return 1; }