12.06.2013, 13:35
First sorry for my bad english. I have problem with OnPlayerText...
This is how it's look:
public OnPlayerText(playerid, text[])
{
new sendername[MAX_PLAYER_NAME];
new string[128];
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "You cannot speak, while you are silenced.");
return 1;
}
if(realchat == 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);
return 1;
}
return 0;
}
The problem is that when i type something it's look like %s: %s (name, text), not %s says: %s (name, text). And only ID 0 in game see it. And when i mute someone, he is still allowed to talk.
This is how it's look:
public OnPlayerText(playerid, text[])
{
new sendername[MAX_PLAYER_NAME];
new string[128];
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "You cannot speak, while you are silenced.");
return 1;
}
if(realchat == 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);
return 1;
}
return 0;
}
The problem is that when i type something it's look like %s: %s (name, text), not %s says: %s (name, text). And only ID 0 in game see it. And when i mute someone, he is still allowed to talk.