25.12.2008, 13:04
Here, I'll show you my /l (local chat) command and I hope it helps you out.
Код:
if(strcmp(cmd,"/l",true)==0 || strcmp(cmd,"/b",true)==0) { new tmp[256]; new playername[24]; new string[150]; tmp=strtokmsg(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid,White,"USAGE : /l [text]"); return 1; } for(new i = 0; i < MAX_PLAYERS; i++) { GetPlayerName(playerid,playername,sizeof(playername)); format(string,sizeof(string),"Local Chat~ %s : %s",playername,tmp); if(GetDistanceBetweenPlayers(playerid,i)<125) { SendClientMessage(i,White,string); } } return 1; }