01.06.2013, 15:57
[pawn]
{
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You cannot speak, you have been silenced");
return 0;
}
if(Mobile[playerid] != 255)
{
new string[128], sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
sendername[strfind(sendername,"_")] = ' ';
format(string, sizeof(string), "%s Says (cellphone): %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);
}
if (realchat == 0)
{
new sendername[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
sendername[strfind(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);
new lengthtime = strlen(text);
new time = lengthtime*50;
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0, 0,0,time);
return 0;
}
return 1;
}
[pawn]
This is my code but the chat is till global and there is no affect on it can any one tell me why? I placed it under on Player Text
{
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You cannot speak, you have been silenced");
return 0;
}
if(Mobile[playerid] != 255)
{
new string[128], sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
sendername[strfind(sendername,"_")] = ' ';
format(string, sizeof(string), "%s Says (cellphone): %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);
}
if (realchat == 0)
{
new sendername[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
sendername[strfind(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);
new lengthtime = strlen(text);
new time = lengthtime*50;
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0, 0,0,time);
return 0;
}
return 1;
}
[pawn]
This is my code but the chat is till global and there is no affect on it can any one tell me why? I placed it under on Player Text