Vitalik123123
Ученик
Сначала: "Nick_Name[id]: Text", следом сразу же "Nick_Name: Text"
public OnPlayerText:
[HIDE-POSTS]
[/HIDE-POSTS]
public OnPlayerText:
[HIDE-POSTS]
PHP:
public OnPlayerText(playerid, text[])
{
if(p_info[playerid][mute] > 0)
{
SendClientMessage(playerid, error, "У вас мут.");
return 0;
}
new string [128];
format ( string, sizeof ( string ), "%s[%d]: %s", p_info[playerid][name], playerid, text);
ProxDetector(20.0, playerid, string, COLOR_WHITE, COLOR_WHITE, COLOR_WHITE, COLOR_WHITE, COLOR_WHITE);
if(!IsPlayerInAnyVehicle(playerid))
{
ApplyAnimation ( playerid, "PED", "IDLE_CHAT", 4.1, 0, 1, 1, 1, 1, 1 );
SetTimerEx ("ClearAnim", 2400, false, "d", playerid );
}
SetPlayerChatBubble ( playerid, text, COLOR_WHITE, 20.0, 10000 );
new str[144];
if(GetPVarInt(playerid,"news") == 1)
{
format(str,sizeof(str),"[ЭФИР] %s[%d]: %s",get_name(playerid),playerid,text),SendClientMessageToAll(0x007fffff, str);
return 0;
}
if(GetPVarInt(playerid, "called") != 60605)
{
if (IsPlayerConnected(GetPVarInt(playerid, "called")) )
{
if(GetPVarInt(GetPVarInt(playerid, "called"),"talk"))
{
f(str, "[Телефон] %s: %s", get_name(playerid), text );
SendClientMessage(GetPVarInt(playerid, "called"),white,str);
SendClientMessage(playerid,white, str);
return false;
}
}
}
return 1;
}
