OnPlayerText
#1

Hey i have a problem, i have a code so i can see my (id) while i am chatting, but if i type something i will get 2 messages.

http://imageshack.us/f/201/samp007wo.png/

And the code:
pawn Код:
public OnPlayerText(playerid, text[])
{
    new textstring[128];
    format(textstring, sizeof(textstring), "(%i) %s", playerid, text);
    SendPlayerMessageToAll(playerid, textstring);
    return 1;
}
Reply
#2

Returning 0 under OnPlayerText gets rid of the default SA-MP chat, and shows the one you scripted only.
pawn Код:
public OnPlayerText(playerid, text[])
{
    new textstring[128];
    format(textstring, sizeof(textstring), "(%i) %s", playerid, text);
    SendPlayerMessageToAll(playerid, textstring);
    return 0; // this
}
Reply
#3

Thanks it worked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)