Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Bienvenue Guest!

Rejoignez la communauté pour avoir accès à l'entièreté du site! Une fois que vous serez enregistré, vous pourrez créer, aider, partager et discuter avec les membres de la communauté et également participer à l'amélioration du site. Alors, qu'attendez vous ? Enregistrez-vous !

Sign in to follow this  
FiveM

FiveM update - December 3rd, 2017

Recommended Posts

FiveM

@silver wrote:

We’ve :pushpin:-ed another update to FiveM production.

Summarized changelog

  • There’s an option to select a custom port for the ‘Localhost’ button, thanks to @Disquse
  • The ‘Direct connect’ tab now automatically saves the last server connected to. Thanks to @Disquse and michaelcerne for prototyping this!
  • Support for minimap GFx overlays. See the example code below, it’s pending integration in the formal documentation site when that’s done.
  • Support for a populationPedCreating event to allow manipulating population from script.
  • Mitigate servers running on low numfile ulimit values crashing by no longer trying to request /info.json on clients.
  • Minor performance improvements and other fixes.

GFx overlays

    local overlay = AddMinimapOverlay('popup_warning.gfx')
    RequestStreamedTextureDict('popup_warning')

    while (not HasMinimapOverlayLoaded(overlay)) or (not HasStreamedTextureDictLoaded('popup_warning')) do
        Wait(0)
    end

    Wait(1500)

    CallMinimapScaleformFunction(overlay, 'SHOW_POPUP_WARNING')
    PushScaleformMovieFunctionParameterFloat(500.0)
    PushScaleformMovieFunctionParameterString("ALERT")
    PushScaleformMovieFunctionParameterString("wew")
    PushScaleformMovieFunctionParameterString("~r~wtf")
    PushScaleformMovieFunctionParameterBool(true)
    PushScaleformMovieFunctionParameterInt(0)
    PopScaleformMovieFunctionVoid()

    -- overlayID, x, y, xscale, yscale, alpha
    SetMinimapOverlayDisplay(overlay, -3000.0, -3000.0, 100.0, 100.0, 80.0)
-- resource.lua
file 'popup_warning.gfx' -- copy this from scaleform RPFs in the game folder to the resource

Population interception

CreateThread(function()
    RequestModel('s_m_y_cop_01')
end)

AddEventHandler('populationPedCreating', function(x, y, z, model, setters)
    Citizen.Trace(('making cop at %s %s %s plus a bit (was %s)\n'):format(tostring(x), tostring(y), tostring(z), tostring(model)))

    setters.setModel('s_m_y_cop_01') -- you can use a hash as well
    setters.setPosition(x, y, z + 5.5)

    -- you can also CancelEvent() to skip creating the ped
end)

Posts: 7

Participants: 7

Read full topic

Afficher l’article complet

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

En utilisant ce site, vous acceptez les présents règlements Terms of Use, Privacy Policy,Guidelines.