24.02.2010, 20:56
Alright I got this whisper command
Now, how am I going to show the string (message typed by player) above the players character?
Код:
if(strcmp("/w", cmdtext, true, 2)==0) { if(strlen(cmdtext) <= 3) { SendClientMessage(playerid,COLOR_RED,"USAGE: /w (msg)"); return 1; } new output[150]; new pname[24]; new string[128]; GetPlayerName(playerid, pname, 24); strmid(output,cmdtext,2,strlen(cmdtext)); format(string, sizeof(string), "(WHISPER): %s(%d) %s",pname,playerid,output); printf("%s", string); for(new i=0;i<MAX_PLAYERS;i++) { if(IsPlayerConnected(i) && GetDistanceBetweenPlayers(playerid,i) < 10) { { format(string, sizeof(string), "(WHISPER): %s(%d) %s",pname,playerid,output); format(string, sizeof(string), SendClientMessage(i,COLOR_YELLOW,string); } } } return 1; } } return 0; }
Now, how am I going to show the string (message typed by player) above the players character?