Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
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.