Cross-posting to the HL2RP thread because I don't want to personally pester Chessnutt. Sorry for the bump.
I'm using HL2RP as a base for a NS schema I'm working on, so it probably goes here best.
Something I've noticed with the holdtypes is that for the stock HL2 weapons it has a nice, fluid set of citizen animations for aiming and raising the weapon, and a different set of holdtypes for when holding it lowered. With my custom SWEPs, however, the holding animation is just arms at the side - not a big problem with pistols, but for larger weapons this is quite an issue. On the inverse, whenever I raise the weapon it appears fine (if not jerky due to the lack of a proper transition) for larger weapons, but with pistols the holdtype is a bit awkward unless I'm using the USP Match or .357. Anything I can do to my SWEPs, their item files, or the base to fix this?
The SWEPs themselves work fine without any issue and use their proper holdtypes in Sandbox. It's only in Nutscript that issues arise.
TL;DR The holdtypes are pretty awful on all but stock HL2 weapons.
I made a video to help illustrate my point - note the lack of a proper holdtype for my custom SWEPs and the jerky transition animations.
[url]https://www.youtube.com/watch?v=SX_xKOotsdU[/url]
Well what do you expect from HL2 NPC animations? The citizen models are NOT player models, that's why it is different than what you would see in sandbox. They're from the citizen NPCs, so they are limited in the weapon animations as not every NPC uses every weapon. As for the pistol SWEP make sure the SWEP holdtype is set to pistol [U]correctly[/U].
I added a function from the Baton SWEP and it works now, as I said on the NS forums. It broke scopes for the M9K base I was using, but that's minor.
workshop addon url? please its cool addon i want add this for my server
It's a gamemode.
[QUOTE=mib999;50912873]It's a gamemode.[/QUOTE]
Also a pretty dead gamemode judging by the GitHub and this thread. Shame really.
[QUOTE=GTbrawlers;50913173]Also a pretty dead gamemode judging by the GitHub and this thread. Shame really.[/QUOTE]
Please tell me you are joking.
[QUOTE=Kemerd;50920236]Please tell me you are joking.[/QUOTE]
"Latest commit fc39925 on 25 Aug 2015"
[ERROR] gamemodes/hl2rp/gamemode/cl_init.lua:3: attempt to index field 'schema' (a nil value)
1. unknown - gamemodes/hl2rp/gamemode/cl_init.lua:3
Couldn't Load Init Script: 'hl2rp/gamemode/cl_init.lua'
Couldn't include file 'hl2rp\schema\sh_schema.lua' (File not found) (@gamemodes/nutscript/gamemode/core/sh_util.lua (line 17))
[ERROR] gamemodes/hl2rp/plugins/radio/sh_plugin.lua:73: attempt to call field 'Register' (a nil value)
1. unknown - gamemodes/hl2rp/plugins/radio/sh_plugin.lua:73
2. include - [C]:-1
3. include - gamemodes/nutscript/gamemode/core/sh_util.lua:17
4. load - gamemodes/nutscript/gamemode/core/libs/sh_plugin.lua:44
5. loadFromDir - gamemodes/nutscript/gamemode/core/libs/sh_plugin.lua:175
6. initialize - gamemodes/nutscript/gamemode/core/libs/sh_plugin.lua:166
7. unknown - gamemodes/nutscript/gamemode/shared.lua:65
[ERROR] gamemodes/hl2rp/plugins/searching/sh_plugin.lua:5: attempt to call field 'Include' (a nil value)
1. unknown - gamemodes/hl2rp/plugins/searching/sh_plugin.lua:5
2. include - [C]:-1
3. include - gamemodes/nutscript/gamemode/core/sh_util.lua:17
4. load - gamemodes/nutscript/gamemode/core/libs/sh_plugin.lua:44
5. loadFromDir - gamemodes/nutscript/gamemode/core/libs/sh_plugin.lua:175
6. initialize - gamemodes/nutscript/gamemode/core/libs/sh_plugin.lua:166
7. unknown - gamemodes/nutscript/gamemode/shared.lua:65
If i join on the Server it is just "NutScript" and Leave
NutScript 1.0 and NutScript 1.1 are [b]not[/b] compatible with each other.
How can i get an other version?!
[QUOTE=Chessnut;50926530]NutScript 1.0 and NutScript 1.1 are [b]not[/b] compatible with each other.[/QUOTE]
How can i get an other version?!
[AddCSLuaFile] Couldn't find 'nutscript/gamemode/cl_init.lua' (@gamemodes/hl2rp/gamemode/init.lua (line 1))
Couldn't include file 'nutscript\gamemode\init.lua' (File not found) (@gamemodes/hl2rp/gamemode/init.lua (line 1))
Couldn't Load Init Script: 'nutscript/gamemode/init.lua'
[ERROR] gamemodes/hl2rp/gamemode/init.lua:3: attempt to index global 'nut' (a nil value)
1. unknown - gamemodes/hl2rp/gamemode/init.lua:3
Couldn't Load Init Script: 'hl2rp/gamemode/init.lua'
[QUOTE=starfuture;51254842][AddCSLuaFile] Couldn't find 'nutscript/gamemode/cl_init.lua' (@gamemodes/hl2rp/gamemode/init.lua (line 1))
Couldn't include file 'nutscript\gamemode\init.lua' (File not found) (@gamemodes/hl2rp/gamemode/init.lua (line 1))
Couldn't Load Init Script: 'nutscript/gamemode/init.lua'
[ERROR] gamemodes/hl2rp/gamemode/init.lua:3: attempt to index global 'nut' (a nil value)
1. unknown - gamemodes/hl2rp/gamemode/init.lua:3
Couldn't Load Init Script: 'hl2rp/gamemode/init.lua'[/QUOTE]
Are you using the NutScript Schema?
A question
If the scanner dies why I do not respawn?
NECRO GET OUT OF HERE
364 more days and it will show both of them as "1 year ago". The future people visiting will never know it was posted 6 days after that one!
Why is not working the beta ranks?
sh_schema
SCHEMA.name = "Half-Life"
SCHEMA.introName = "NutScript Half-Life RP for Singleplayer and Listen Servers"
SCHEMA.author = "Chillycheese"
SCHEMA.desc = "Under occupation of the Combine Empire."
function SCHEMA:isCombineFaction(faction)
return faction == FACTION_CP or faction == FACTION_OW
end
do
local playerMeta = FindMetaTable("Player")
function playerMeta:isCombine()
return SCHEMA:isCombineFaction(self:Team())
end
function playerMeta:getCombineRank()
local name = self:Name()
for k, v in ipairs(SCHEMA.scnRanks) do
local rank = string.PatternSafe(v)
if (name:find("[%D+]"..rank.."[%D+]")) then
return v
end
end
for k, v in ipairs(SCHEMA.rctRanks) do
local rank = string.PatternSafe(v)
if (name:find("[%D+]"..rank.."[%D+]")) then
return v
end
end
for k, v in ipairs(SCHEMA.unitRanks) do
local rank = string.PatternSafe(v)
if (name:find("[%D+]"..rank.."[%D+]")) then
return v
end
end
for k, v in ipairs(SCHEMA.eliteRanks) do
local rank = string.PatternSafe(v)
if (name:find("[%D+]"..rank.."[%D+]")) then
return v
end
end
for k, v in ipairs(SCHEMA.betaRanks) do
local rank = string.PatternSafe(v)
if (name:find("[%D+]"..rank.."[%D+]")) then
return v
end
end
end
function playerMeta:isCombineRank(rank)
if (type(rank) == "table") then
local name = self:Name()
for k, v in ipairs(rank) do
local rank = string.PatternSafe(v)
if (name:find("[%D+]"..rank.."[%D+]")) then
return v
end
end
return false
else
return self:getCombineRank() == rank
end
end
function playerMeta:getRank()
for k, v in ipairs(team.GetPlayers(FACTION_CP)) do
local eliteRanks = string.Explode(",", nut.config.get("rankElite", "RCT"):gsub("%s", ""))
local unitRanks = string.Explode(",", nut.config.get("rankUnit", "RCT"):gsub("%s", ""))
local betaRanks = string.Explode(",", nut.config.get("rankBeta", "RCT"):gsub("%s", ""))
local name = string.PatternSafe(v:Name())
for k, v in ipairs(eliteRanks) do
if (name:find(v)) then
return CLASS_CP_ELITE
end
end
for k, v in ipairs(unitRanks) do
if (name:find(v)) then
return CLASS_CP_UNIT
end
end
return CLASS_CP_RCT
return CLASS_CP_BETA
end
end
sh_config
-- Civil Protection name prefix.
SCHEMA.cpPrefix = "CP-"
SCHEMA.OWPrefix = "TOW-"
-- How long the Combine digits are.
SCHEMA.digitsLen = 5
-- Rank information.
SCHEMA.rctRanks = {"RCT"}
SCHEMA.unitRanks = {"05", "04", "03", "02", "01", "OfC"}
SCHEMA.eliteRanks = {"EpU", "DvL", "SeC"}
SCHEMA.scnRanks = {"SCN", "CLAW.SCN"}
SCHEMA.BetaRanks = {"Beta"}
-- What model each rank should be.
SCHEMA.rankModels = {
["RCT"] = "models/dpfilms/metropolice/hl2beta_police.mdl",
[SCHEMA.unitRanks] = "models/dpfilms/metropolice/hl2concept.mdl",
["OfC"] = "models/dpfilms/metropolice/urban_police.mdl",
["EpU"] = "models/dpfilms/metropolice/elite_police.mdl",
["DvL"] = "models/dpfilms/metropolice/police_bt.mdl",
["SeC"] = "models/dpfilms/metropolice/phoenix_police.mdl",
["SCN"] = "models/combine_scanner.mdl",
["CLAW.SCN"] = "models/shield_scanner.mdl",
["Beta"] = "models/combine_soldier.mdl"
}
sh_cp_beta
CLASS.name = "Combine Overwatch Beta"
CLASS.desc = "The bottom of the Overwatch."
CLASS.faction = FACTION_CP
function CLASS:onCanBe(client)
return client:isCombineRank(SCHEMA.betaRanks)
end
CLASS_CP_BETA = CLASS.index
This is old thread mate, you can go to Discord and get some help @neoengihun
Sorry, you need to Log In to post a reply to this thread.