OnPlayerChat: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
{{FuncSyntax|OnPlayerChat(player, text)}} | {{FuncSyntax|OnPlayerChat(player, text)}} | ||
{{FuncSyntaxClient|OnPlayerChat(text)}} | |||
{{FuncParameters}} | {{FuncParameters}} |
Revision as of 16:49, 18 November 2019
Description
The event that gets called when you type a message in the chat.
Syntax
OnPlayerChat(player, text)
Client Syntax
OnPlayerChat(text)
Parameters
- player
The player who is texting in chat. - text
Text committed by the player.
Example
AddEvent("OnPlayerChat", function(playerid, text)
local x, y, z = GetPlayerLocation(playerid)
AddPlayerChatRange(x, y, 75.0, "<span color=\"#ffffffFF\">"..GetPlayerName(playerid).." says: "..text.."</>")
return false
end)
See also
Player
- OnPlayerServerAuth
- OnPlayerSteamAuth
- OnPlayerDownloadFile
- OnPlayerStreamIn
- OnPlayerStreamOut
- OnPlayerPickupHit
- OnPlayerJoin
- OnPlayerQuit
- OnPlayerSpawn
- OnPlayerDeath
- OnPlayerWeaponShot
- OnPlayerDamage
- OnPlayerChat
- OnPlayerChatCommand
- OnPlayerInteractDoor
- OnPlayerChangeDimension
Vehicle
- OnPlayerEnterVehicle
- OnPlayerLeaveVehicle
- OnPlayerStateChange
- OnVehicleRespawn
- OnVehicleStreamIn
- OnVehicleStreamOut
- OnVehicleDamage
- OnVehicleChangeDimension
- OnVehicleCreated
- OnVehicleDestroyed
Game
Package
NPC
- OnNPCReachTarget
- OnNPCDamage
- OnNPCSpawn
- OnNPCDeath
- OnNPCStreamIn
- OnNPCStreamOut
- OnNPCChangeDimension
- OnNPCCreated
- OnNPCDestroyed
Object
- OnObjectStopMoving
- OnObjectChangeDimension
- OnObjectCreated
- OnObjectDestroyed
- OnObjectStreamIn
- OnObjectStreamOut