โšกEvents

Caught Trigger

Trigged when player is caught speeding, includes the players car, and the cameras data

-- CLIENT
RegisterNetEvent("infin-speedcameras:caught")
AddEventHandler('infin-speedcameras:caught', function(Playercar, cameradata)
    print("Speed camera caught a car!")
    print("Player Car: " .. Playercar)
    print("Camera Fine Amount: " .. tostring(cameradata.fineAmount))
    print("Camera Coords " .. tostring(cameradata.coords))
    print("Camera Top Speed" .. tostring(cameradata.speed))
    
end)

-- SERVER
RegisterServerEvent("infin-speedcameras:caught")
AddEventHandler('infin-speedcameras:caught', function(Playercar, cameradata)
    print("Speed camera caught a car!")
    print("Player Car: " .. Playercar)
    print("Camera Fine Amount: " .. tostring(cameradata.fineAmount))
    print("Camera Coords " .. tostring(cameradata.coords))
    print("Camera Top Speed" .. tostring(cameradata.speed))
    
end)

Last updated