Optimisation de l'ulx
Budget de
20€(Négociable)
DATE LIMITE
Pas de date limite
3 personnes ont déjà postulé à cette annonce !
Tu as la même demande ?
Publie ton offre pour recevoir des candidatures et recruter la personne qu'il te faut !
Détails de l'offre
Dès qu'un joueur rejoint mon serveur, il arrive souvent d'avoir des énormes freezes, j'ai donc utiliser un addon pour voir les hooks ralentissants. Votre but étant d'optimiser les 2 bouts de scripts Identifier ------------------------------------------------------------ Impact Executions Mean t /f Max time Event "PlayerInitialSpawn", hook "sendAutoCompletes" 278.50% 1 343.775us 97975.8us in "addons/ulx/lua/ulx/base.lua" (lines 77 to 85), Addon hooks Conflict Finder not available Event "PlayerAuthed", hook "ULibAuth" 277.62% 1 342.686us 97665.6us in "addons/ulib/lua/ulib/server/ucl.lua" (lines 1113 to 1117), Addon hooks Conflict Finder not available local function sendAutocompletes( ply ) if ply:query( "ulx map" ) or ply:query( "ulx votemap2" ) then -- Only send if they have access to this. ULib.clientRPC( ply, "ulx.populateClMaps", ulx.maps ) ULib.clientRPC( ply, "ulx.populateClGamemodes", ulx.gamemodes ) end ULib.clientRPC( ply, "ulx.populateClVotemaps", ulx.votemaps ) ULib.clientRPC( ply, "ulx.populateKickReasons", ulx.common_kick_reasons ) end hook.Add( ULib.HOOK_UCLAUTH, "sendAutoCompletes", sendAutocompletes ) hook.Add( "PlayerInitialSpawn", "sendAutoCompletes", sendAutocompletes ) -- Move garry's auth function so it gets called sooner local playerAuth = hook.GetTable().PlayerInitialSpawn.PlayerAuthSpawn hook.Remove( "PlayerInitialSpawn", "PlayerAuthSpawn" ) -- Remove from original spot local function newPlayerAuth( ply, ... ) ucl.authed[ ply:UniqueID() ] = nil -- If the player ent is removed before disconnecting, we can have this hanging out there. playerAuth( ply, ... ) -- Put here, slightly ahead of ucl. ucl.probe( ply, ... ) end hook.Add( "PlayerAuthed", "ULibAuth", newPlayerAuth, HOOK_MONITOR_HIGH )
Publiée le 01/01/2024