Need a fix on this code.
#1

Quote:

It don't show Stranger if also Pmask = 1 . Please help me here.
PHP код:
    new accent[64];
    
GetPlayerAccent(playeridaccent);
    if(
PlayerInfo[playerid][pAccent] != && PlayerInfo[playerid][pAccent] != 1)
    {
        if (
PlayerInfo[playerid][pMask] == 1)
        {
        
format(stringsizeof(string), "Stranger says: %s ",  text);
        
ProxDetector(20.0playeridstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
        
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
        }
        else
        {
        
format(stringsizeof(string), "%s %s says: %s"accentsendernametext);
        
ProxDetector(20.0playerid,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(stringsizeof(string), "Stranger says: %s ",  text);
            
ProxDetector(20.0playeridstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
        }
        else
        {
            
format(stringsizeof(string), "%s says: %s"sendernametext);
            
ProxDetector(20.0playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
        }
    } 
Fixed
Reply
#2

This is what I understood.

pawn Код:
new accent[64];
GetPlayerAccent(playerid, accent);

if(PlayerInfo[playerid][pAccent] != 0 && PlayerInfo[playerid][pAccent] != 1)
{
    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
{
    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);
}
Reply
#3

Quote:
Originally Posted by Kevln
Посмотреть сообщение
This is what I understood.

pawn Код:
new accent[64];
GetPlayerAccent(playerid, accent);

if(PlayerInfo[playerid][pAccent] != 0 && PlayerInfo[playerid][pAccent] != 1)
{
    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
{
    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);
}
But, Their need to me Pmask . Like i have added there.
also, Please don't copy paste other scripted thing here. You just gave me this code from other script.
Reply
#4

Did you make sure you have bought something (That will set their PMask to one) ??

Shouldn't this part

Код:
if(PlayerInfo[playerid][pAccent] != 0 && PlayerInfo[playerid][pAccent] != 1)
Should be like this

Код:
if(PlayerInfo[playerid][pAccent] != 0)
Reply
#5

Quote:
Originally Posted by JaKe Elite
Посмотреть сообщение
Did you make sure you have bought something (That will set their PMask to one) ??

Shouldn't this part

Код:
if(PlayerInfo[playerid][pAccent] != 0 && PlayerInfo[playerid][pAccent] != 1)
Should be like this

Код:
if(PlayerInfo[playerid][pAccent] != 0)
That for pAccent only right?

I just want to liek

If(......[PMask] = 1
{Will show with stranger says : }
else
{ Same as normal + accent , if that !=0 } Even if Accent on or not.
Reply
#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
#7

Код:
    new accent[64]; 
    GetPlayerAccent(playerid, accent); 
    if(PlayerInfo[playerid][pAccent] != 0) 
    { 
        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); 
        } 
    }

Try this
Reply
#8

Quote:
Originally Posted by MBilal
Посмотреть сообщение
Код:
 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;
}
I just need only for normal chat. I have already scripted /l .

Quote:
Originally Posted by JessThompson
Посмотреть сообщение
Код:
    new accent[64]; 
    GetPlayerAccent(playerid, accent); 
    if(PlayerInfo[playerid][pAccent] != 0) 
    { 
        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); 
        } 
    }

Try this
Not worked

BTW, I have fixed it myself Thanks for the help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)