SA-MP Forums Archive
Chat not working - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Client Support (https://sampforum.blast.hk/forumdisplay.php?fid=16)
+--- Thread: Chat not working (/showthread.php?tid=389984)



Chat not working - MarkzD - 04.11.2012

In my server chat not working,
PHP код:
OnPlayerText
{
rerurn 1;

Why?


Re: Chat not working - NewerthRoleplay - 04.11.2012

pawn Код:
public OnPlayerText(playerid, text[])
{
    return 1;
}



Re: Chat not working - MarkzD - 04.11.2012

nothing


Re: Chat not working - Plovix - 04.11.2012

I have the same problem too before some months,try to remove the includes and plugins that you don't use on your script,sorry for my bad english.


Re: Chat not working - MarkzD - 05.11.2012

nothing


Re: Chat not working - MarkzD - 07.11.2012

help


Re: Chat not working - RaZVaN ^ xD - 08.11.2012

pawn Код:
public OnPlayerText ( playerid, text [ ] )
{
    return false;
}



Re: Chat not working - Roperr - 08.11.2012

Quote:
Originally Posted by RaZVaN ^ xD
Посмотреть сообщение
pawn Код:
public OnPlayerText ( playerid, text [ ] )
{
    return false;
}
You might want to check https://sampwiki.blast.hk/wiki/OnPlayerText before posting.
Returning 0 in this callback will stop the text from being sent


OT: Seems like you're using a FilterScript/Include, which has OnPlayerText redefined somewhere and chatting disabled. Open up each and every of these scripts, press CTRL+F and look for "OnPlayerText". Good luck in your search


Re: Chat not working - dannyk0ed - 08.11.2012

Don't see the problem.


Re: Chat not working - Konstantinos - 08.11.2012

Quote:
Originally Posted by Roperr
Посмотреть сообщение
[..]
Returning 0 in this callback will stop the text from being sent
[..]
The *default text*, although it'll send the custom text.

Код:
public OnPlayerText(playerid, text[])
{
    new textv2[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof (name));
    format(textv2, sizeof (textv2), "%d >> %s: %s", playerid, name, text);
    SendPlayerMessageToAll(playerid, textv2);
    return 0; // ignore the default text and send the custom one
}
The easier way to test it is to use a blank gamemode and check if it works or not.

__

If it does, then use it on your gamemode, if it doesn't work the script will be messed up with an include or Filterscript.