FiveM Helmet Script


 RemoveBikeHelmet = true --Change this to your liking, I reccomend that you leave this at true.

player = GetPlayerPed(-1) RegisterCommand("helmet", function(source, args, raw) -- adjust command name here if (args[1] == "off") then SavedHelmet = GetPedPropIndex(player, 0) -- Get helmet ID of the source player SavedHelmetTexture = GetPedPropTextureIndex(player, 0) -- Get helmet texture ID of the source player ClearPedProp(player, 0) else --if the text after helmet is anything but "off" --TODO, use the saved ped helmet, and requip that. SetPedPropIndex(player, 0, SavedHelmet, SavedHelmetTexture, true) end end, false) -- false, allow everyone to run it if RemoveBikeHelmet then Citizen.CreateThread( function() while true do Citizen.Wait(0) --Edit this if the resource is using too much resources. local playerVeh = GetVehiclePedIsUsing(player) if PlayerVeh ~= 0 then SetPedConfigFlag(player, 35, false) end end end) end