• NutScript - Nutty name, serious framework
    2,778 replies, posted
I think a money printer is bigger than a pistol.
[QUOTE=Zelpa;46111537]I think a money printer is bigger than a pistol.[/QUOTE] It's not about real size, It's about balance heuhuehueuh
[QUOTE=Zelpa;46111537]I think a money printer is bigger than a pistol.[/QUOTE] you can always change the sizes too c:
[QUOTE=rebel1324;46111104]Just found to way to change spawnicon's cam position [img]http://i.imgur.com/OfR4tAi.png[/img][/QUOTE] Money printers? Yep, time to camp with moneyprinters.
1.1's new map scene plugin supports camera positions that move. Each scene displays for 30 seconds. [vid]https://dl.dropboxusercontent.com/u/24983881/ShareX/2014/09/rp_c18_v1%202014-9-30%2017-21-16.webm[/vid]
[QUOTE=Boom Rainbow;46109557]1. Hey, I don't know if anyone mentioned this, but I started to get my HL2 RP server up and running again, and I get this weird thing whenever I activate my stunstick as a CP where it moves the camera inside my mask for a second. Any idea what's going on [t]http://content.screencast.com/users/Starbyte/folders/Jing/media/c4677d7b-d587-4795-b1b9-4183e972e18c/2014-09-29_1911.png[/t] 2. Finally, I have one other question for you guys, but is there any way to add weapons into NS without causing them to give you the same initial ammo you start with each time you drop them and pick them back up? I would really love a solution to this issue I've been fighting with for a while.[/QUOTE] I still haven't solved these. Does anyone have any suggestions?
Working hard on City RP Base Schema! Well, I don't have name for that yet, but It's getting better and better. This schema is for NS 1.1, which is being developed and stabilized by developing this Reference Schema. I'm trying to use almost all of NS hooks and features with this schema. So, when you're going to develop your own new schema, just check my schema then you're ready to go. The schema currently contains follow features and stuffs: - 100MB (Planned) of Default Contents. - Books <PLUGIN>(Got pretty much example books) - Cookfood <PLUGIN>(Simplified and less Clutter.) - Doorbust <PLUGIN>(An Doorbust Item) - Grenades <PLUGIN>(Fixed and Added more stuffs) - Moneyprinter <PLUGIN>(For who don't know what to do.) - New Citizen Outfit <PLUGIN>(30 male citizen sheets, 20 female sheets, 60 facemap changes to apply.) - Radio <PLUGIN>(A Radio. What did you expected.) - Notes <PLUGIN>(A Note. You can write shit.) - Stash <PLUGIN>(Perma-Item Saving Stash. Comes with ATM.) - Property<PLUGIN>(You can earn money with purchasing property and make other players work for you.) - Handcuffs <SCHEMA>(A Schema built-in Visual Handcuff) I see lack of Schema only feature. Suggest me more then I'll consider it and will add it sooner or later. Name Suggestion is also acceptable.
[QUOTE=rebel1324;46147246]Working hard on City RP Base Schema! Well, I don't have name for that yet, but It's getting better and better. This schema is for NS 1.1, which is being developed and stabilized by developing this Reference Schema. I'm trying to use almost all of NS hooks and features with this schema. So, when you're going to develop your own new schema, just check my schema then you're ready to go. The schema currently contains follow features and stuffs: - 100MB (Planned) of Default Contents. - Books <PLUGIN>(Got pretty much example books) - Cookfood <PLUGIN>(Simplified and less Clutter.) - Doorbust <PLUGIN>(An Doorbust Item) - Grenades <PLUGIN>(Fixed and Added more stuffs) - Moneyprinter <PLUGIN>(For who don't know what to do.) - New Citizen Outfit <PLUGIN>(30 male citizen sheets, 20 female sheets, 60 facemap changes to apply.) - Radio <PLUGIN>(A Radio. What did you expected.) - Notes <PLUGIN>(A Note. You can write shit.) - Stash <PLUGIN>(Perma-Item Saving Stash. Comes with ATM.) - Property<PLUGIN>(You can earn money with purchasing property and make other players work for you.) - Handcuffs <SCHEMA>(A Schema built-in Visual Handcuff) I see lack of Schema only feature. Suggest me more then I'll consider it and will add it sooner or later. Name Suggestion is also acceptable.[/QUOTE] you should make a fp thread
Is there any way to make an item just change a bodygroup (from a model with multiple bodygroups) to a certain value?
[QUOTE=Boom Rainbow;46157352]Is there any way to make an item just change a bodygroup (from a model with multiple bodygroups) to a certain value?[/QUOTE] If its getting rid of the bodygroups set them all to 0 Example: /charsetbodygroup mike torso 0
Im getting a problem when installed newanimations it has been giving me shit tons of script errors. Spamming the same thing Sh_hooks.lua setClass is Invalid or something help please.
[QUOTE=Austin1456;46165935]Im getting a problem when installed newanimations it has been giving me shit tons of script errors. Spamming the same thing Sh_hooks.lua setClass is Invalid or something help please.[/QUOTE] Posting the error would help.
So coming back to the server (after the night) causes a player selection load hang. Console usually says MySQL server has gone away, after some query error text. Poked around on the GitHub bugs section and didn't see it listed. So I'm assuming either the error might be solvable already, has already been reported and I can't find it, or I need to make a listing.
[QUOTE=Austin1456;46162467]If its getting rid of the bodygroups set them all to 0 Example: /charsetbodygroup mike torso 0[/QUOTE] That's not at all what I asked.
[QUOTE=Boom Rainbow;46168220]That's not at all what I asked.[/QUOTE] Seeing how the clothes base is set up, you would probably need to alter it to use something that changes bodygroups (I'm making the assumption it's a clothes item) or (arguably the better option) create a new base item (whether that's just copying clothes base and changing or starting new) and using [URL="http://wiki.garrysmod.com/page/Entity/SetBodygroup"]player:SetBodyGroup()[/URL] function on a player. Unless I'm missing something of course. Edit: If it's not obvious, the reason I suggest copying the file and then just pointing any new clothes items that use bodygroups, is because that once NutScript is updated you'll need to remember to replace the file again or/and make sure it's safe from being overwritten.
[QUOTE=Boom Rainbow;46109557] [t]http://content.screencast.com/users/Starbyte/folders/Jing/media/c4677d7b-d587-4795-b1b9-4183e972e18c/2014-09-29_1911.png[/t] [/QUOTE] It means your stunstick is being activated with a hand animation; it's a good thing. Although for some reason when special anim sequences happen, it acts like you're using the act command and makes your camera go all um... weird.
[QUOTE=sants1;46166051]Posting the error would help.[/QUOTE] [ERROR] gamemodes/nutscript/gamemode/core/sh_hooks.lua:178: attempt to index local 'animClass' (a nil value)
[QUOTE=Coble;46168537]Seeing how the clothes base is set up, you would probably need to alter it to use something that changes bodygroups (I'm making the assumption it's a clothes item) or (arguably the better option) create a new base item (whether that's just copying clothes base and changing or starting new) and using [URL="http://wiki.garrysmod.com/page/Entity/SetBodygroup"]player:SetBodyGroup()[/URL] function on a player. Unless I'm missing something of course. Edit: If it's not obvious, the reason I suggest copying the file and then just pointing any new clothes items that use bodygroups, is because that once NutScript is updated you'll need to remember to replace the file again or/and make sure it's safe from being overwritten.[/QUOTE] I'm not exactly a coding wiz or anything, but could you explain how to use that function? I'd like to also make it set that bodygroup to 0 after the item is unequipped for that certain bodygroup.
[QUOTE=Boom Rainbow;46173508]I'm not exactly a coding wiz or anything, but could you explain how to use that function? I'd like to also make it set that bodygroup to 0 after the item is unequipped for that certain bodygroup.[/QUOTE] Out of curiosity what model are you trying to use this for, Enhanced Citizens by chance? Or is it something else.
[QUOTE=Coble;46176026]Out of curiosity what model are you trying to use this for, Enhanced Citizens by chance? Or is it something else.[/QUOTE] Yep, Enhanced Citizens v2.
[QUOTE=Boom Rainbow;46176250]Yep, Enhanced Citizens v2.[/QUOTE] Ha, figured as much. I'm trying to write a plugin for my server to deal with the bodygroup clothes. Seeing if there is an effective way to overwrite factions, without having to delete or alter files. (No going to well.) If I get any headway (since I'll be dealing with clothes afterwards) I'll see about just handing it over. Edit: No promises though. :)
[QUOTE=Boom Rainbow;46176250]Yep, Enhanced Citizens v2.[/QUOTE] well yo, i haven't tested this yet but it should work, it's also fairly self explanatory [lua]BASE.name = "Base Bodygroup" BASE.uniqueID = "base_bodygroup" BASE.category = "Something" BASE.data = { Equipped = false, OldBodygroup = false, } BASE.group = 0 BASE.value = false BASE.functions = { } BASE.functions.Equip = { run = function( itemTable, client, data ) if SERVER then local oldbodygroup = client:GetBodygroup( itemTable.group ) local newdata = table.Copy( data ) newdata.Equipped = true newdata.OldBodygroup = oldbodygroup client:SetBodygroup( itemTable.group, itemTable.value ) client:UpdateInv( itemTable.uniqueID, 1, newdata, true ) end end, shouldDisplay = function( itemTable, data, entity ) return !data.Equipped or data.Equipped == nil end } BASE.functions.Unequip = { run = function( itemTable, client, data ) if SERVER then local newdata = table.Copy( data ) newdata.Equipped = false newdata.OldBodygroup = false client:SetBodygroup( itemTable.group, data.OldBodygroup ) client:UpdateInv( itemTable.uniqueID, 1, newdata, true ) end end, shouldDisplay = function( itemTable, data, entity ) return data.Equipped or data.Equipped == nil end } local size = 16 local border = 4 local distance = size + border local tick = Material("icon16/tick.png") function BASE:PaintIcon(w, h) if (self.data.Equipped) then surface.SetDrawColor(0, 0, 0, 50) surface.DrawRect(w - distance - 1, w - distance - 1, size + 2, size + 2) surface.SetDrawColor(255, 255, 255) surface.SetMaterial(tick) surface.DrawTexturedRect(w - distance, w - distance, size, size) end end function BASE:CanTransfer(client, data) if (data.Equipped) then nut.util.Notify("You must unequip the item before doing that.", client) end return !data.Equipped end if SERVER then hook.Add("PlayerSpawn", "bodygruppe", function(client) timer.Simple(0.1, function() if (!IsValid(client) or !client.character) then return end for class, items in pairs(client:GetInventory()) do local itemTable = nut.item.Get(class) if (itemTable and itemTable.outfit) then for k, v in pairs(items) do if (v.data.Equipped) then client:SetBodygroup( v.data.group, v.data.value ) end end end end end) end) end[/lua] just make an item with its base set to "base_bodygroup" and make sure it has ITEM.group set to the group you want to change, such as 2 and the value to the bodygroup you want it to be
[QUOTE=a-cookie;46176887]-snip-[/QUOTE] Oh my god dude, thanks! It works like a charm!
[QUOTE=a-cookie;46176887]-snip-[/QUOTE] Well shit, beat me to the punch there. Oh well, guess I will just use my own. Learn by doing and all that. :)
Just so you're aware [URL="http://steamcommunity.com/sharedfiles/filedetails/?id=280384240"]Enhanced Citizens 3 [/URL]is a thing.
We need models though, not playermodels. That's why I didn't use enhanced citizens 3.
Player models work with NS if you set the model class to "player"
[QUOTE=Chessnut;46187249]Player models work with NS if you set the model class to "player"[/QUOTE] Mind expanding what you mean about that, not quite sure I understand.
[QUOTE=Boom Rainbow;46181783]We need models though, not playermodels. That's why I didn't use enhanced citizens 3.[/QUOTE] Use enhanced citizens redux its the npc model version.
I could throw together a pack without the player model includes so they work for Nutscript.
Sorry, you need to Log In to post a reply to this thread.