CSGO nut
3axap opened this issue · comments
Hello, thank you scripting examples! Searched for examples, found you.
Can you help me a little bit? I’m not a programmer, I just can’t understand how to make a nut csgo vscript for two thing:
add prop: (line hummer or stripper)
add:
{
"classname" "prop_dynamic"
"angles" "0 0 0"
"DisableBoneFollowers" "0"
"disablereceiveshadows" "0"
"disableshadows" "1"
"ExplodeDamage" "0"
"ExplodeRadius" "0"
"fademaxdist" "0.0"
"fademindist" "0.0"
"fadescale" "1"
"health" "0"
"MaxAnimTime" "10"
"MinAnimTime" "5"
"model" "models/props/de_dust/hr_dust/dust_crates/dust_crate_style_01_32x16x64.mdl"
"modelscale" "1.0"
"PerformanceMode" "0"
"pressuredelay" "0"
"RandomAnimation" "0"
"renderamt" "255"
"rendercolor" "255 255 255"
"renderfx" "0"
"rendermode" "0"
"SetBodyGroup" "0"
"skin" "0"
"solid" "6"
"spawnflags" "0"
"targetname" ""
"origin" "563.26495 2359.2424 14.054579"
}
And how i can remove class or models?
// (stripper like)
remove:
{
"classname" "func_buyzone"
}
//
remove:
{
"models" "models/props/de_dust/hr_dust/dust_crates/dust_crate_style_01_32x16x64.mdl"
}
Thank you very much in advance!
You can create a prop_dynamic
using
newEnt <- Entities.CreateByClassname("prop_dynamic");
newEnt.SetModel("...");
newEnt.SetOrigin(Vector(0, 0, 0));
You can remove entities by first finding them, and then calling .Destroy()
on them:
local ent = null;
while ((ent = Entities.FindByClassname(ent, "func_buyzone")) != null) {
ent.Destroy();
}
You can of course replace .FindByClassname(...)
with whichever find function you want.
Thank you very much!
One more qestion, for de_dust2.nut?
function TestDel()
{
local ent = null;
while ((ent = Entities.FindByClassname(ent, "func_buyzone") != null) {
ent.Destroy();
}
}
And for add model?
function TestAdd()
{
newEnt <- Entities.CreateByClassname("prop_dynamic");
newEnt.SetModel("...");
newEnt.SetOrigin(Vector(0, 0, 0));
// more prop_dynamic options
}
Yes. You will obviously need to replace the "..."
and Vector(0, 0, 0)
with whatever you want.
Thank you again!