• NutScript - Nutty name, serious framework
    2,778 replies, posted
[QUOTE=Austin1456;47354580]I guess it might be time to learn .LUA, which'll be hard.[/QUOTE] You should not make a server in the first place if you're oblivious of the programming languaged used vividly in every aspect of the game.
[QUOTE=mib999;47355125]You should not make a server in the first place if you're oblivious of the programming languaged used vividly in every aspect of the game.[/QUOTE] That is why i said: Not a proper server...
Is there a vortigaunt faction in NS 1.1? I can't add it... Sorry to seem stupid.. Also could you add /charsetcustomclass again?
[QUOTE=KillerLP;47412749]Is there a vortigaunt faction in NS 1.1? I can't add it... Sorry to seem stupid.. Also could you add /charsetcustomclass again?[/QUOTE] There is literally no reason to use this thread. Chessnut made a new one for 1.1 [url=http://facepunch.com/showthread.php?t=1457905]here[/url]
Hey everyone. Anyone know if there's an installation guide I can follow? Thanks.
[QUOTE=Monkah;47418119]Hey everyone. Anyone know if there's an installation guide I can follow? Thanks.[/QUOTE] this one's outdated, see [url]http://facepunch.com/showthread.php?t=1457905[/url]
i know we're moving on to ns 1.1 but it's advanced and it scares me, so does anyone know how to get rid of the sadcolors? e: nvm got it figured out
Go to line 98 of hooks/cl_hooks.lua in HL2 RP and change [lua] DrawColorModify(color) [/lua] to [lua] -- DrawColorModify(color) [/lua]
oh, cool lol thanks e: ok now i'm having a problem with the crafting plugin. there are no lua errors, but nothing shows up on the crafting table menu.
How can i change font size in nutscript 1.1? i can't find value on any lua file! help me!
[QUOTE=ppabba;47449915]How can i change font size in nutscript 1.1? i can't find value on any lua file! help me![/QUOTE] [url]http://facepunch.com/showthread.php?t=1457905[/url]
In 1.1 I have created a schema, but it appears Nutscript is failing to get clients to download the default NS Vignette. This results in everyone getting a purple and black missing texture error for their whole screen. Nevermind, I fixed it.
could someone help me out? i've added this to the sv_hooks [lua]function SCHEMA:GetDefaultInv(inventory, client, data) if client:HasFlag("i") then inventory:Add("m9k_m416", 1) end end[/lua] but it won't work. it's supposed to add one of the swep items i have on the server if the player has the i flag.
The character is not set up for the player at that point. [editline]12th April 2015[/editline] The character would not have any flags at that point either.
okay, so i need to have it so that it checks for the flag when the player spawns then, right?
PlayerLoadout hook
I'm afraid I have no idea what that means. I don't know lua, I've been trying to learn but it's difficult for me to do so without a teacher.
The only teacher you need is yourself for learning GLua.
sooo... like this? [lua]function PLAYER:Loadout(inventory, client) if client:HasFlag("i") then inventory:Add("m9k_m416", 1) end end[/lua]
[url]http://wiki.garrysmod.com/page/GM/PlayerLoadout[/url] I'm not sure if you're using 1.0 or 1.1 since you are confusing the styles. If you're using 1.0: - The inventory is not an object. If you're using 1.1: - It is inventory:add() not inventory:Add() - client:HasFlag() does not exist
using 1.0. still no idea what i'm doing. e: i want the player to spawn with the items in their inventories, not on their weapon wheel.
[QUOTE=Blazer232;47523538]using 1.0. still no idea what i'm doing. e: i want the player to spawn with the items in their inventories, not on their weapon wheel.[/QUOTE] If you do not have an item file created for the M416, then it will not work. If you do have an item file, hurray, you kind of know what you're doing. [code] function SCHEMA:PlayerLoadout(client) if client:HasFlag("i") and !client:HasItem("m9k_m416") then client:UpdateInv("m9k_m416", 1, {}, true) end end [/code] Don't overwrite the schema playerloadout function, but take what I have inside the function and add it to the one inside sv_hooks.lua
ah, thank you so much. and yeah, i had the item file lol. i've worked with NS before, just not much with lua in general unfortunately. now i gotta figure out how to make commands that change body groups :p
[url=https://github.com/Chessnut/NutScript/blob/1.1/gamemode/core/sh_commands.lua#L157]/charsetbodygroup[/url]?
Not quite. I want a command that would toggle between a bodygroup with a helmet and one without. I got code from another guy that doesn't seem to work. Haven't messed around with it much. [lua]nut.command.Register( { text = "Toggle Helmet", onMenu = function( menu, icon, client, command ) LocalPlayer( ):ConCommand( 'say /helmet' ) end, onRun = function( client, arguments ) SCHEMA:CheckArmor( client ) if !client.character:GetData( "Headwear" ) then client.character:SetData( "Headwear", 0 ) end if client.character:GetData( "Headwear" ) == 2 then client.character:SetData( "Headwear", 0 ) client:SetBodygroup( 3, 0 ) nut.util.Notify( "You've taken off your helmet.", client ) else client.character:SetData( "Headwear", 2 ) client:SetBodygroup( 3, 2 ) nut.util.Notify( "You've put on your helmet.", client ) end end }, "helmet" ) [/lua]
For some reason the characters and players do not show up on the scoreboard on my server i'm using nutscript1.1 only one faction shows up, the others say its apart of the joining/connecting faction
[QUOTE=Joker79787;48187329]For some reason the characters and players do not show up on the scoreboard on my server i'm using nutscript1.1 only one faction shows up, the others say its apart of the joining/connecting faction[/QUOTE] [url]http://facepunch.com/showthread.php?t=1457905[/url]
[IMG]https://i.gyazo.com/69c24dcb69f58cb0a105ab7c3afb47e1.png[/IMG] I get this as a server and client side error eveytime. Literally i just took a fresh sample schema and it gives me this backtalk, someone halp me!
[B][U]NUTSCRIPT 1.0 SCHEMAS DON'T WORK WITH 1.1[/U][/B] [B][U]NUTSCRIPT 1.0 SCHEMAS DON'T WORK WITH 1.1[/U][/B] [B][U]NUTSCRIPT 1.0 SCHEMAS DON'T WORK WITH 1.1[/U][/B] [B][U]NUTSCRIPT 1.0 SCHEMAS DON'T WORK WITH 1.1[/U][/B] [B][U]NUTSCRIPT 1.0 SCHEMAS DON'T WORK WITH 1.1[/U][/B] [B][U]NUTSCRIPT 1.0 SCHEMAS DON'T WORK WITH 1.1[/U][/B] [B][U]NUTSCRIPT 1.0 SCHEMAS DON'T WORK WITH 1.1[/U][/B] [B][U]NUTSCRIPT 1.0 SCHEMAS DON'T WORK WITH 1.1[/U][/B]
Anyone got a fix for the Civil Protection injury text stuck on the screen?
Sorry, you need to Log In to post a reply to this thread.