Need a fix on this code.
#6

Код:
 new accent[64]; 
    GetPlayerAccent(playerid, accent); 
    if(PlayerInfo[playerid][pAccent] != 0 && PlayerInfo[playerid][pAccent] != 1) 
    { 
        if (PlayerInfo[playerid][pMask] == 1) 
        { 
        format(string, sizeof(string), "Stranger says: %s ",  text); 
        ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); 
        SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000); 
        } 
        else 
        { 
        format(string, sizeof(string), "%s %s says: %s", accent, sendername, text); 
        ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); 
        SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000); 
        } 
    }  
    else 
    { 
        if (PlayerInfo[playerid][pMask] == 1) 
        { 
            format(string, sizeof(string), "Stranger says: %s ",  text); 
            ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); 
            SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000); 
        } 
        else 
        { 
            format(string, sizeof(string), "%s says: %s", sendername, text); 
            ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); 
            SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000); 
        } 
    }  
*/
You can do like that
Код:
CMD:l(playerid, params[])
{
new string[128];
      if(sscanf(params, "s[128]", params))return SCM(playerid, -1, "[SYSTEM] :  /l(low) [message]");
 	new Float:x,Float:y,Float:z;
	GetPlayerPos(playerid,x,y,z); 
 new accent[64]; 
    GetPlayerAccent(playerid, accent); 
    if(PlayerInfo[playerid][pAccent] != 0 && PlayerInfo[playerid][pAccent] != 1) 
    { 
        if (PlayerInfo[playerid][pMask] == 1) 
        { 
        format(string, sizeof(string), "Stranger says: %s ",  params); 
 	foreach(Player, i)
 		if( IsPlayerInRangeOfPoint(i,20.0, x, y, z))
		{
			SendClientMessage(i,COLOR_WHITE,string);
		}
        SetPlayerChatBubble(playerid,string,COLOR_WHITE,20.0,5000); 
        } 
        else 
        { 
        format(string, sizeof(string), "%s %s says: %s", accent, sendername, params); 
 	foreach(Player, i)
 		if( IsPlayerInRangeOfPoint(i,20.0, x, y, z))
		{
			SendClientMessage(i,COLOR_WHITE,string);
		}
        SetPlayerChatBubble(playerid,string,COLOR_WHITE,20.0,5000); 
        } 
    } 
else
        if (PlayerInfo[playerid][pMask] == 1) 
        { 
        format(string, sizeof(string), "Stranger says: %s ",  params); 
 	foreach(Player, i)
 		if( IsPlayerInRangeOfPoint(i,20.0, x, y, z))
		{
			SendClientMessage(i,COLOR_WHITE,string);
		}
        SetPlayerChatBubble(playerid,string,COLOR_WHITE,20.0,5000); 
        } 
        else 
        { 
        format(string, sizeof(string), "%s %s says: %s", accent, sendername, params); 
 	foreach(Player, i)
 		if( IsPlayerInRangeOfPoint(i,20.0, x, y, z))
		{
			SendClientMessage(i,COLOR_WHITE,string);
		}
        SetPlayerChatBubble(playerid,string,COLOR_WHITE,20.0,5000); 
        } 
    return 1;
}
Reply


Messages In This Thread
Need a fix on this code. [Solved] - by SoFahim - 04.12.2015, 04:42
Re: Need a fix on this code. - by Kevln - 04.12.2015, 05:48
Re: Need a fix on this code. - by SoFahim - 04.12.2015, 05:52
Re: Need a fix on this code. - by JaKe Elite - 04.12.2015, 08:11
Re: Need a fix on this code. - by SoFahim - 04.12.2015, 08:15
Re: Need a fix on this code. - by MBilal - 04.12.2015, 08:28
Re: Need a fix on this code. - by JessThompson - 04.12.2015, 08:35
Re: Need a fix on this code. - by SoFahim - 04.12.2015, 09:44

Forum Jump:


Users browsing this thread: 1 Guest(s)