Wiki
Clone wikiEFLC-MP LUA / onPlayerChat
Description
This function is triggered when the player writes a chat message
Parameters
Int playerId, String text
String text: entire text
Return values
Bool allowChat
Example
#!lua function myChatFunction(playerid, text) if(string.sub(text, 1, 17) == "this server sucks") then sendPlayerMsg(playerid, "Thanks buddy", 0xFFFFFFFF) return false end return true end registerEvent("myChatFunction", "onPlayerChat")
Updated