• NutScript - Nutty name, serious framework
    2,778 replies, posted
[QUOTE=Boom Rainbow;46436221]Here, this is how you make a weapon, for example I have this m9k weapon: [lua] ITEM.name = "H&K G36 Compact" ITEM.uniqueID = "m9k_g36" ITEM.category = "Weapons" ITEM.model = Model("models/weapons/w_hk_g36c.mdl") ITEM.class = "m9k_g36" ITEM.type = "primary" ITEM.price = 800 ITEM.desc = "A black assault rifle engineered in Germany.\nThere are %ClipOne|0% shots left in the magazine." ITEM.data = { Equipped = false, CombineLocked = 0, ClipOne = -1 } [/lua] All you have to do is copy the entities name to clip board and paste it into ITEM.class and ITEM.unique ID. The item model should be the w_model of the weapon so when you drop it, it looks like the gun you're holding. That's all, simple as that.[/QUOTE] Ok, that seemed to work eventually, thank you. Now ammo wont work because it's a custom type of ammo. I'm using Simonovs DOD WWII Weapon Pack
You'd have to make a new ammo item and see what type of ammo the guns use and then make that ammo item give that "type" of ammo. You'll see what I mean.
[QUOTE=Boom Rainbow;46436845]You'd have to make a new ammo item and see what type of ammo the guns use and then make that ammo item give that "type" of ammo. You'll see what I mean.[/QUOTE] I have created a new ammo file, but when I press 'Use' on it in game, it does nothing. The ammo vanishes with the normal sound effect, but the gun is still unloadable and unuseable.
What did you set the ammo type to? What kind of ammo does the swep file say it uses?
[QUOTE=Boom Rainbow;46436959]What did you set the ammo type to? What kind of ammo does the swep file say it uses?[/QUOTE] This is my ammo file. [lua] ITEM.name = "7.92mm Ammo" ITEM.weight = 0.6 ITEM.price = 65 ITEM.desc = "A blue box containing 7.92mm Rounds" ITEM.type = "sim_ent_ammo_792mm" ITEM.amount = 16 ITEM.flag = "v" ITEM.model = Model("models/items/boxmrounds.mdl") ITEM.base = "base_ammo" [/lua] That's the type of ammo the weapon uses too, as I've tested it many times in singleplayer.
Are you sure that's not just a copy of the entity's name in ITEM.type? It has to be the ammo type listed in the weapon's lua files.
[QUOTE=Boom Rainbow;46437200]Are you sure that's not just a copy of the entity's name in ITEM.type? It has to be the ammo type listed in the weapon's lua files.[/QUOTE] I see now, and it works. You're a lifesaver. But now I've run into another issue. When I try to go "/plywhitelist [charactername] [faction]" it doesn't work. Actually nothing happens. No message, no whitelist. Nothing. This has happened once before and I don't recall ever fixing it, or needing to fix it. Is there a way to fix it though?
I've gone into the 3dtext plugin but i can't find out how to change the font mind telling me? :) (i've created the font in the hooks.lua)
[QUOTE=thexant;46437217]I see now, and it works. You're a lifesaver. But now I've run into another issue. When I try to go "/plywhitelist [charactername] [faction]" it doesn't work. Actually nothing happens. No message, no whitelist. Nothing. This has happened once before and I don't recall ever fixing it, or needing to fix it. Is there a way to fix it though?[/QUOTE] Not exactly sure, I've never ran into that issue. As for the 3dtext, I think if you look in sh_commands you can maybe set the font there? Not 100% sure about that though.
Ok we fixed the factions, it was a small thing we missed. Thanks though.
A new issue has arisen. With our weapons. When we "Equip" them they appear on the floor, and you can pick them up as entities, but in your inventory they can still be equipped, but you already have a weapon in the "Whatever" slot. Here is our code for one of the two weapons we're having issues with, I'm inexperienced in lua so I know it's something I've done wrong. [lua] ITEM.base = "base_wep" ITEM.name = "Luger" ITEM.uniqueID = "luger" ITEM.class = "sim_ent_luger" ITEM.model = Model("models/weapons/b_p3b.mdl") ITEM.desc = "A small pistol generally used by high ranking German Officers." ITEM.price = 100 ITEM.loweredOrigin = Vector(3, 0, -4) ITEM.loweredAngles = Angle(0, 45, 0) ITEM.attachmentBone = "ValveBiped.Bip01_Spine" ITEM.attachmentOffsetAngles = Angle(0, 0, 0) ITEM.attachmentOffsetVector = Vector(-2, 5, 4) [/lua]
ITEM.class must be the same as ITEM.uniqueID
[QUOTE=Boom Rainbow;46456131]ITEM.class must be the same as ITEM.uniqueID[/QUOTE] Really? I never heard of this.. That's weird.
ITEM.class the weapon class. ITEM.uniqueID is a way to store the item in the database.
[QUOTE=Chessnut;46457629]ITEM.class the weapon class. ITEM.uniqueID is a way to store the item in the database.[/QUOTE] So it doesn't have to be the same, I guess?
Didn't there used to be a zombie schema for this? If so, where is it at and is it still functional?
[url]https://github.com/Chessnut/Dissolution/[/url] It should still work.
Hey chessnut, i want to test nutscript 1.1 but where can i get schema for nutscript 1.1 ?
[url]https://github.com/Chessnut/NutScript/tree/1.1[/url]
[t]http://cloud-4.steampowered.com/ugc/23970208838655421/57A79B48ABEE3E085CFD03488DF2E15FB0E72EA0/[/t] Rejected yet again by Nutscript 1.1 :'(
[QUOTE=Zelpa;46500467][t]http://cloud-4.steampowered.com/ugc/23970208838655421/57A79B48ABEE3E085CFD03488DF2E15FB0E72EA0/[/t] Rejected yet again by Nutscript 1.1 :'([/QUOTE] Same error :(
I try to fix sit animation but..... [url]http://steamcommunity.com/sharedfiles/filedetails/?id=342501783[/url] :C Anyone fixed this problem ? +bonus [url]http://steamcommunity.com/sharedfiles/filedetails/?id=342501801[/url]
[QUOTE=ppabba;46501581]I try to fix sit animation but..... [url]http://steamcommunity.com/sharedfiles/filedetails/?id=342501783[/url] :C Anyone fixed this problem ? +bonus [url]http://steamcommunity.com/sharedfiles/filedetails/?id=342501801[/url][/QUOTE] Still Figuring about that [QUOTE=Zelpa;46500467][t]http://cloud-4.steampowered.com/ugc/23970208838655421/57A79B48ABEE3E085CFD03488DF2E15FB0E72EA0/[/t] Rejected yet again by Nutscript 1.1 :'([/QUOTE] We'll release test schema if it's stable enough to make new stuffs without fixing framework.
[QUOTE=rebel1324;46502501]Still Figuring about that We'll release test schema if it's stable enough to make new stuffs without fixing framework.[/QUOTE] What is your thoughts on realese date? Dieing for this NS 1.1
[QUOTE=Austin1456;46502740]What is your thoughts on realese date? Dieing for this NS 1.1[/QUOTE] Most of my plugins are converted. Also City schema is near complete. Only few problems persist. It won't take so long I think
Probably a question asked a thousand times, but how does one make an item visible on a player's model when equipped? Also, how does one make something equippable that isn't a weapon or full piece of clothing? Say I wanted a gas mask that appeared on the user's head when equipped, how would I do that?
[QUOTE=CrAzYfReAk101;46508958]Probably a question asked a thousand times, but how does one make an item visible on a player's model when equipped? Also, how does one make something equippable that isn't a weapon or full piece of clothing? Say I wanted a gas mask that appeared on the user's head when equipped, how would I do that?[/QUOTE] Make an item on the part base. That's what I have.
[QUOTE=rebel1324;46503219]Most of my plugins are converted. Also City schema is near complete. Only few problems persist. It won't take so long I think[/QUOTE] Awesome keep up the good work!
You can not create a character if there are no factions available.
Citizen Normal sit animations [url]http://steamcommunity.com/sharedfiles/filedetails/?id=343916687[/url]
Sorry, you need to Log In to post a reply to this thread.