ViniciusMc478 Posted June 23, 2019 Share Posted June 23, 2019 Hello Mta dayz vehicle_spawns.Lua function checkVehicleInWater () local randomPlayer = getRandomPlayer() triggerClientEvent(randomPlayer,"checkVehicleInWaterClient",randomPlayer) end setTimer(checkVehicleInWater,1800000,0) Error console: Bad argument @ ' triggerClientEvent' [Expected string at argument 1, got boolean] Link to comment
DNL291 Posted June 23, 2019 Share Posted June 23, 2019 Make sure that getRandomPlayer is returning a player-element, if the server is empty it will return false. function checkVehicleInWater () local randomPlayer = getRandomPlayer() if randomPlayer then triggerClientEvent(randomPlayer,"checkVehicleInWaterClient",randomPlayer) end end setTimer(checkVehicleInWater,1800000,0) 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now