17.05.2014, 11:48
Hello guys!
Haven't been here for a while .
I'm encountering the problem.Everything is working fine:
Haven't been here for a while .
I'm encountering the problem.Everything is working fine:
- The colors
- Chat bubble
- Animation
- And range
pawn Код:
public OnPlayerText(playerid, text[])
{
if(!IsPlayerInAnyVehicle(playerid))
{
new Length = strlen(text);
new aTime = Length*200;
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,1,1,1,0,aTime);
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
SetPlayerChatBubble(playerid, text, COL_ADMINGREEN, 50.0, 4000);
return 0;
}
else if(PlayerInfo[playerid][pAdmin] == 0)
{
SetPlayerChatBubble(playerid, text, COL_WHITE, 50.0, 4000);
return 0;
}
new name[MAX_PLAYER_NAME],string[150],Float:X,Float:Y,Float:Z;
GetPlayerName(playerid, name, sizeof(name));
GetPlayerPos(playerid, X, Y, Z);
format(string, sizeof(string), ""TCWHITE"["TCRED"%s"TCRED"]: "TCCYAN"%s", name, text[0]);
strreplace(name, '_', ' ');
for(new i = 0; i < MAX_PLAYERS; ++i)
{
if(IsPlayerInRangeOfPoint(i, 5, X, Y, Z))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessage(i,COL_ADMINGREEN,string);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] == 0)
{
SendClientMessage(i,COL_WHITE,string);
return 1;
}
}
}
return 0;
}