26.06.2011, 14:27
I made a whisper command by myself ,there are no compiling errors though,there is a problem.
Ok,so here's problem,in main chat I can't see only this (WHISPER FROM) NAME(ID):y; name is displayed but as second string I see the letter y with 2 points above it.And I can't see my message above the head,but I think that's OK,because on other server was same(I mean I couldn't see my message only on main chat.but other players could see it on mainchat and above my head also).Can some1 help?(Don't tell me just to paste a whisper command I like doing things by myself).
pawn Код:
new countn3;
new counttimer3;
new PlayerText3D:BC;
COMMAND:bc(playerid,params[])
{
new str[128],str2[128];
new whisperer[MAX_PLAYER_NAME];
new Float:x,Float:y,Float:z;
if(sscanf(params,"u",str2)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/bc [Text]");
GetPlayerPos(playerid,x,y,z);
GetPlayerName(playerid,whisperer,sizeof(whisperer));
format(str,sizeof(str),"(WHISPER FROM)%s(%d):%s",whisperer,playerid,str2);
BC = CreatePlayer3DTextLabel(playerid,str2,COLOR_YELLOW,x,y,z+0.1,5.0,playerid,INVALID_VEHICLE_ID,0);
countn3 = 40;
counttimer3 = SetTimer("WhisperCountDown",1000,true);
if(IsPlayerInRangeOfPoint(playerid,5.0,x,y,z)) return SendClientMessageToAll(COLOR_YELLOW,str);
return true;
}
public WhisperCountDown(playerid)
{
countn3--;
if(countn3 <= -1)
{
KillTimer(counttimer3);
DeletePlayer3DTextLabel(playerid,BC);
}
return 1;
}