-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathclient.lua
More file actions
22 lines (18 loc) · 772 Bytes
/
client.lua
File metadata and controls
22 lines (18 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
local hashText = false -- prevents the chat message from being sent continuously
CreateThread(function()
while true do
local ped = PlayerPedId()
if IsPedInAnyVehicle(ped, false) then
if not hashText then
hashText = true
local vehHash = GetEntityModel(GetVehiclePedIsIn(ped, false))
TriggerEvent("chatMessage", "[^3Hash Grabber^7]", { 255, 255, 255 }, string.format("%s is the %s hash!", vehHash, GetDisplayNameFromVehicleModel(vehHash))) -- chat message displaying the vehicle display name and model hash that the player is driving
end
else
if hashText == true then
hashText = false
end
end
Wait(50)
end
end)