SA-MP Forums Archive
Help in OnPlayerText - 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: Help in OnPlayerText (/showthread.php?tid=229007)



Help in OnPlayerText - MBX97 - 20.02.2011

Hey All
I Have a Problem with OnPlayerText and here it is : CLICK ME xD

So i just wanted to make when the admin talk in the chat , the server says : Admin %s (%d) : %s , u know what i mean like : Admin NoBody(ID : 13) : Hi all
And Thats all , please try to fix it cuz it repeat in the chat , like this : Here The Pic
Cya All


Re: Help in OnPlayerText - xRyder - 20.02.2011

Please don't use text like that. It's barely readable.
Edit it, you'll help us and maybe yourself.


Edit: You just need to return OnPlayerText() callback as false and that's all.


Re: Help in OnPlayerText - Cameltoe - 20.02.2011

pawn Код:
public OnPlayerText(playerid, text[])
{
     if(IsPlayerAdmin(playerid))
     {
          new string[128], pName[MAX_PLAYER_NAME];
          GetPlayerName(playerid, pName, sizeof(pName));
          format(string, sizeof(string), "Admin %s(%d): %s", pName, playerid, text);
          SendClientMessageToAll(COLOR_BLUE, string);
          return 0;
     }
     return 1;
}
Should work


Re: Help in OnPlayerText - MBX97 - 20.02.2011

k thanks all , i try now , brb


Re: Help in OnPlayerText - MBX97 - 20.02.2011

its working, thanks guys and sooo much appreciate