17.08.2016, 07:15
pawn Код:
public OnPlayerText(playerid, text[])
{
if(!PlayerLogin[playerid]) return 0;
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && !PlayerCuffed{playerid})
{
if(!IsAGang(playerid)) ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.0, 0, 1, 1, 1, 1, 1);
else
{
new gsign[7][9] = {"gsign2", "gsign4LH", "gsign3LH", "gsign4", "gsign2LH", "gsign5", "gsign5LH"};
ApplyAnimation(playerid, "GHANDS", gsign[random(7)], 4.0, 0, 1, 1, 1, 1, 1);
}
SetTimerEx("ClearAnim", 2000, 0, "i", playerid);
}
new string[144], rdist, c = 0xFFFFFFFF, myWorld = GetPlayerVirtualWorld(playerid);
if(!FormaFrac[playerid]) format(string, sizeof(string), "- %s (%s)[%d]", text, PlayerInfo[playerid][pNamePlayer], playerid);
else format(string, sizeof(string), "- %s {%s}(%s)[%d]", text, GetFractionColor[PlayerInfo[playerid][pMember]], PlayerInfo[playerid][pNamePlayer], playerid);
foreach(new i: Player)
{
if(myWorld != GetPlayerVirtualWorld(i)) continue;
rdist = floatround(GetPlayerDistanceToPlayer(playerid, i));
if(rdist > 14.0) continue;
if(rdist > 8.0) c = 0xAAAAAAFF;
else if(rdist > 4.0) c = 0xCCCCCCFF;
SendClientMessage(i, c, string);
}
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 20.0, 10000);
return 0;
}