SA-MP Forums Archive
Not working - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Not working (/showthread.php?tid=90446)



Not working - FreeSoul - 08.08.2009

I got a problem with a code.

Quote:

if (realchat)
{
if(gPlayerLogged[playerid] == 0)
{
return 0;
}
if(Disguise[playerid] == 1)
{
format(string, sizeof(string), "Unknown Says: %s",text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);
}
else if(Disguise[playerid] != 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 0;
}
}

If the player has Disguise = 1,instead of sending the message like Unknown says: text.It sends it like
Unknown says: text
Real Name says: text.

It sends both the first and the second message.

Thanks in advance


Re: Not working - Joe Staff - 08.08.2009

Gotta make sure it has "return 0" instead of "return 1"