24.02.2010, 21:22
I got another question, I'm kinda noob in scripting so..
Now I got this:
[img width=1024 height=640]http://i46.tinypic.com/j8kx0w.png[/img]
Text above head.. but now in the chat I want to keep (WHISPER): Name(ID) text
and in chatbubble I only want the text, how am I going to do that?
EDIT: Sorry for double post.
Now I got this:
Код:
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); SetPlayerChatBubble(playerid, string, COLOR_WHITE, 150.0, 10000); 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); SetPlayerChatBubble(playerid, string, COLOR_WHITE, 150.0, 10000); SendClientMessage(i,COLOR_YELLOW,string); } } } return 1; } } return 0; }
Text above head.. but now in the chat I want to keep (WHISPER): Name(ID) text
and in chatbubble I only want the text, how am I going to do that?
EDIT: Sorry for double post.