Steam installeren
inloggen
|
taal
简体中文 (Chinees, vereenvoudigd)
繁體中文 (Chinees, traditioneel)
日本語 (Japans)
한국어 (Koreaans)
ไทย (Thai)
Български (Bulgaars)
Čeština (Tsjechisch)
Dansk (Deens)
Deutsch (Duits)
English (Engels)
Español-España (Spaans - Spanje)
Español - Latinoamérica (Spaans - Latijns-Amerika)
Ελληνικά (Grieks)
Français (Frans)
Italiano (Italiaans)
Bahasa Indonesia (Indonesisch)
Magyar (Hongaars)
Norsk (Noors)
Polski (Pools)
Português (Portugees - Portugal)
Português - Brasil (Braziliaans-Portugees)
Română (Roemeens)
Русский (Russisch)
Suomi (Fins)
Svenska (Zweeds)
Türkçe (Turks)
Tiếng Việt (Vietnamees)
Українська (Oekraïens)
Een vertaalprobleem melden
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.