18.05.2012, 17:19
I was wondering How i change the LocalChat Color If you start Talking and when it Dissapear On the screen ,
I think I need to edit Those lines
When i edit Those COLOR_WHITE to COLOR_PINK it will only Dissapear when you talk but The color white will still be white on your screen how i fix that
I think I need to edit Those lines
PHP Code:
if(strcmp(cmd, "/local", true) == 0 || strcmp(cmd, "/l", true) == 0) // By CuervO_NegrO
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "** You havent logged in yet!");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
return 1;
}
new playercar = GetPlayerVehicleID(playerid);
new y,m,d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /local [local chat]");
return 1;
}
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pAdminDuty] == 1)
{
format(string, sizeof(string), "Admin Says: %s", result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid, string, COLOR_NICERED, 20.0, 8000);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Admin Local): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "Stranger Says: %s", result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid, string, COLOR_WHITE, 20.0, 8000);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Masked Loca): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 0)
{
format(string, sizeof(string), "%s Says: %s", sendername, result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid, string, COLOR_WHITE, 20.0, 8000);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Local): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
}
else
{
if(IsModelAPlane(playercar) || IsModelABike(playercar) || IsModelAHeli(playercar) || IsModelABoat(playercar) || IsModelASpecial(playercar))
{
if(PlayerInfo[playerid][pAdminDuty] == 1)
{
format(string, sizeof(string), "Admin Says: %s", result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid, string, COLOR_NICERED, 20.0, 8000);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Admin Local): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "Stranger Says: %s", result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid, string, COLOR_WHITE, 20.0, 8000);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Masked Local): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 0)
{
format(string, sizeof(string), "%s Says: %s", sendername, result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid, string, COLOR_PINK, 20.0, 8000);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Local): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
}
else
{
if(VehicleWindows[GetPlayerVehicleID(playerid)] == 0)
{
if(PlayerInfo[playerid][pAdminDuty] == 1)
{
format(string, sizeof(string), "(Windows Shut) Admin Says: %s", result);
SetPlayerChatBubble(playerid, string, COLOR_NICERED, 10.0, 8000);
ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Admin Windows Shut): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "(Windows Shut) Stranger Says: %s", result);
SetPlayerChatBubble(playerid, string, COLOR_WHITE, 10.0, 8000);
ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Masked Windows Shut): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 0)
{
format(string, sizeof(string), "(Windows Shut) %s Says: %s", sendername, result);
SetPlayerChatBubble(playerid, string, COLOR_PINK, 1.0, 8000);
ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Windows Shut): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
}
else
{
if(PlayerInfo[playerid][pAdminDuty] == 1)
{
format(string, sizeof(string), "(Windows Open) Admin Says: %s", result);
SetPlayerChatBubble(playerid, string, COLOR_NICERED, 20.0, 8000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Admin Windows Open): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "(Windows Open) Stranger Says: %s", result);
SetPlayerChatBubble(playerid, string, COLOR_WHITE, 20.0, 8000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Masked Windows Open): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 0)
{
format(string, sizeof(string), "(Windows Open) %s Says: %s", sendername, result);
SetPlayerChatBubble(playerid, string, COLOR_WHITE, 20.0, 8000);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Windows Open): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
}
}
}
}
return 1;
}