Instalar Steam
iniciar sesión
|
idioma
简体中文 (chino simplificado)
繁體中文 (chino tradicional)
日本語 (japonés)
한국어 (coreano)
ไทย (tailandés)
Български (búlgaro)
Čeština (checo)
Dansk (danés)
Deutsch (alemán)
English (inglés)
Español de Hispanoamérica
Ελληνικά (griego)
Français (francés)
Italiano
Bahasa Indonesia (indonesio)
Magyar (húngaro)
Nederlands (holandés)
Norsk (noruego)
Polski (polaco)
Português (Portugués de Portugal)
Português-Brasil (portugués de Brasil)
Română (rumano)
Русский (ruso)
Suomi (finés)
Svenska (sueco)
Türkçe (turco)
Tiếng Việt (vietnamita)
Українська (ucraniano)
Comunicar un error de traducción
and i gues i have to add Enhanced PlayerModel Selector to the server resurce list to?
Step 1: Uncheck Enforce Playermodel in settings for EPMS, client settings for EPMS (each player will have to do this), and TTT2 settings.
Step 2: On server create folder structure: garrysmod\addons\applymodels\lua\server\applymodels.lua
Step 3: Write the following to applymodels.lua
hook.Add( "TTTPrepareRound", "RandomizeTPercentage", function()
for k, v in pairs( player.GetAll() ) do
RunConsoleCommand("ulx_logecho", "0")
RunConsoleCommand("ulx", "cexec", tostring(v:GetName()), "playermodel_apply")
RunConsoleCommand("ulx_logecho", "1")
end
end )
hook.Add( "TTTBeginRound", "UpdatePlayerModels", function()
for k, v in pairs ( player.GetAll() ) do
RunConsoleCommand("ulx_logecho", "0")
RunConsoleCommand("ulx", "cexec", tostring(v:GetName()), "playermodel_apply")
RunConsoleCommand("ulx_logecho", "1")
end
end )
Step 4: Save your applymodels.lua file and either change maps or restart your server, not sure which is required.
This will make the server send a "playermodel_apply" to each active player at the start of each prep phase and round start. Much better than binding a key and spamming it.
timer.Simple(1, function() round = true end)
for k, v in pairs ( player.GetAll() ) do
RunConsoleCommand("ulx_logecho", "0")
RunConsoleCommand("ulx", "cexec", tostring(v:GetName()), "playermodel_apply")
RunConsoleCommand("ulx_logecho", "1")
end
end )
hook.Add( "PlayerSpawn", "PlayerLoadingOut", function( ply )
RunConsoleCommand("ulx_logecho", "0")
RunConsoleCommand("ulx", "cexec", tostring(ply:GetName()), "playermodel_apply")
RunConsoleCommand("ulx_logecho", "1")
end )
Ended up working better for me in the end, to get players to respawn with their model if they respawn in the middle of a round. Have not yet stability tested.