CrewPhone

How to fix Crewphone (number problem ###-####) – Tutorial

Hello!

Did you get the Crewphone/gcPhone and have a problem with generating the number?

If you have a problem with the number-generation or number-showing and they are like ###-#### ?

The solution is easy!

Add this function to the es_extended client.lua:

TriggerServerEvent(‘crew:onPlayerLoaded’, GetPlayerServerId(PlayerId()))

Here’s an example:

AddEventHandler('esx:restoreLoadout', function()
	local playerPed = PlayerPedId()
	local ammoTypes = {}
	RemoveAllPedWeapons(playerPed, true)
	for k,v in ipairs(ESX.PlayerData.loadout) do
		local weaponName = v.name
		GiveWeaponToPed(playerPed, weaponName, 0, false, false)
		SetPedWeaponTintIndex(playerPed, weaponName, v.tintIndex)
		local ammoType = GetPedAmmoTypeFromWeapon(playerPed, weaponName)
		for k2,v2 in ipairs(v.components) do
			local componentHash = ESX.GetWeaponComponent(weaponName, v2).hash
			GiveWeaponComponentToPed(playerPed, weaponName, componentHash)
		end
		if not ammoTypes[ammoType] then
			AddAmmoToPed(playerPed, weaponName, v.ammo)
			ammoTypes[ammoType] = true
		end
	end
	TriggerServerEvent('crew:onPlayerLoaded', GetPlayerServerId(PlayerId()))
	isLoadoutLoaded = true
end)

or:

unknown

Leave a Reply

Your email address will not be published. Required fields are marked *

100% Premium Quality

Experience the pinnacle of gaming with our premium quality code. Authenticated and leak-free for an unparalleled gaming experience.

Risk-Free

Shop with confidence – our FiveM scripts come with a satisfaction guarantee and a hassle-free refund policy.

Instant Access

Elevate your game immediately with our instantly available FiveM mods. No delays, just game-changing add-ons.

Certified Safe

Boost your gameplay with 100% safe-to-use resources. Rigorously tested and verified for your peace of mind.

en_USEnglish