• NutScript - Nutty name, serious framework
    2,778 replies, posted
[QUOTE=Chessnut;42525987]A and B is the new X and Y, old man.[/QUOTE] Actually, that would be C and D.
[QUOTE=NightmareX91;42526817]Actually, that would be C and D.[/QUOTE] He's an amateur at algedrah lets not get too advanced here
The name of the parameter doesn't matter, only the value does ^^
I dunno if anyone asked, but how to I setup myself as administrator on Nutscript?
[QUOTE=EvilAnarchist;42545591]I dunno if anyone asked, but how to I setup myself as administrator on Nutscript?[/QUOTE] nut_setowner in the server console
One plus thing, how do I set the props to be permanently on the map? In CW is /addstatic and I don't remember the rest, but what is the command in NS?
There isnt a need for a command, GMod has a persistent prop feature where you just hold C, right click on props, and press Persist.
[QUOTE=Chessnut;42557663]There isnt a need for a command, GMod has a persistent prop feature where you just hold C, right click on props, and press Persist.[/QUOTE] Thanks Chessnut ;)
Got another problem, I'm trying to whitelist my friend, but it just goes the faction I want him to be as an "Invalid faction". I've already tested it as an open faction, that doesn't require whitelist, but I can't whitelist him. The code is here: [CODE]FACTION_MARINE = 3 local FACTION = {} FACTION.name = "Marine" FACTION.uniqueID = "marine" FACTION.desc = "Teste." FACTION.color = Color(20, 150, 15) FACTION.maleModels = { "models/jessev92/player/halo/unsc_m01.mdl", "models/jessev92/player/halo/unsc_m02.mdl", "models/jessev92/player/halo/unsc_m03.mdl", "models/jessev92/player/halo/unsc_m04.mdl", "models/jessev92/player/halo/unsc_m05.mdl", "models/jessev92/player/halo/unsc_m06.mdl", "models/jessev92/player/halo/unsc_m07.mdl", "models/jessev92/player/halo/unsc_m08.mdl", "models/jessev92/player/halo/unsc_m09.mdl", "models/jessev92/player/halo/unsc_m11.mdl" } FACTION.femaleModels = FACTION.maleModels FACTION.isDefault = false nut.faction.Register(FACTION_MARINE, FACTION)[/CODE] I've already tried /plywhitelist Higor 3 /plywhitelist Higor marine /plywhitelist Higor Marine And all of them gives the same thing. I don't have any idea how to do this now.
Check if there were any errors in the server console.
Are there any current plugins for saving the current ammunition, as well as displaying it somehow?
You can find available plugins here: [url]https://github.com/Chessnut/NSPlugins[/url]
I have multiple classes for a faction like : -Initiate -Senior Initiate ... How can I make me(and only me) as the High Elder(the highest rank) and how can I make the ranks upgrade with kills ?
Define a function CLASS:CanPlayerJoin(client) and only return true for your steamID
is there a way to disable weapons being lowered? I know you can set some weapons to always be raised like the toolgun and such but I want all weapons to be raised without having to add them in there. additionally, I've been trying to get spy's [url=http://steamcommunity.com/sharedfiles/filedetails/?id=180507408]Firearms source[/url] weapons to work with this, however the weapon select menu overrides the keys for customization. is there a way around this? please forgive me if these are really easy fixes, I'm pretty bad at reading lua.
[QUOTE=MrBunneh;42615656]is there a way to disable weapons being lowered? I know you can set some weapons to always be raised like the toolgun and such but I want all weapons to be raised without having to add them in there. additionally, I've been trying to get spy's [url=http://steamcommunity.com/sharedfiles/filedetails/?id=180507408]Firearms source[/url] weapons to work with this, however the weapon select menu overrides the keys for customization. is there a way around this? please forgive me if these are really easy fixes, I'm pretty bad at reading lua.[/QUOTE] To make weapons usable through the framework you have to create items for them. So for instance you would go to your sample_schema or schema_name>gamemode>schema>items then you would go to your folder labeled weapons and create a new sh_weapon.lua file. In that file you would put the following code: [CODE]ITEM.name = "Weapon name here" ITEM.uniqueID = "an id for your weapon to be used in other parts of the schema ie. example_weapon" ITEM.class = "the class or the actualy swep, so for instance if you go to your tab with the weapons, you'd copy to clipboard the weapon. ie. weapon_crowbar" ITEM.type = "what type, pistol, shotgun, ect. I think" ITEM.model = Model( "the world model for the weapon which can be found in the folder labeled addons from your Q menu, ie. models/weapons/w_crowbar.mdl" ) ITEM.desc = "A Crowbar ( EXAMPLE ITEM )"[/CODE] If I made a mistake in this someone correct me, still getting used to the framework :P But I think this should work if you want the weapons to appear in the business menu in your schema so you don't have to spawn the weapons from your Q menu. If I completely missed the question you asked sorry, I hope this helped DX
[QUOTE=Apple_Bloom;42620218]To make weapons usable through the framework you have to create items for them. So for instance you would go to your sample_schema or schema_name>gamemode>schema>items then you would go to your folder labeled weapons and create a new sh_weapon.lua file. In that file you would put the following code: [CODE]ITEM.name = "Weapon name here" ITEM.uniqueID = "an id for your weapon to be used in other parts of the schema ie. example_weapon" ITEM.class = "the class or the actualy swep, so for instance if you go to your tab with the weapons, you'd copy to clipboard the weapon. ie. weapon_crowbar" ITEM.type = "what type, pistol, shotgun, ect. I think" ITEM.model = Model( "the world model for the weapon which can be found in the folder labeled addons from your Q menu, ie. models/weapons/w_crowbar.mdl" ) ITEM.desc = "A Crowbar ( EXAMPLE ITEM )"[/CODE] If I made a mistake in this someone correct me, still getting used to the framework :P But I think this should work if you want the weapons to appear in the business menu in your schema so you don't have to spawn the weapons from your Q menu. If I completely missed the question you asked sorry, I hope this helped DX[/QUOTE] oh yes I know this bit entirely hahah. and as for one of my questions dealing with the customization I've since been able to fix myself. and I guess for a bandaid fix for the weapon raising I'll just add all the names manually to that list :v:
Oh, just saying you don't [i]need[/i] ITEM.uniqueID as it will be set to the file's name (excluding the prefix and extension) for you.
would be nice if the UI was made a little better in terms of usability stuff like the middle of the screen chatbox feels like a huge waste of screen real estate at the bottom and isn't where it is traditionally placed
Created a chatbox x and y convar to solve the issue :) To-do: Settings menu.
[QUOTE=Chessnut;42624240]Oh, just saying you don't [i]need[/i] ITEM.uniqueID as it will be set to the file's name (excluding the prefix and extension) for you.[/QUOTE] Oh, well that will make things easier! I actually have a question about something as well, I'm still quite new to a few things in gmod lua, and I wanted to know how to create derma panels in nutscript, is it the same as for gmod derma? I wanted to create a sort of PDA item for a stalker rp schema for nutscript. Thought it would be a fun twist.
NutScript doesn't change anything related to menus, so it is just regular derma.
[url]https://www.youtube.com/watch?v=o7suEkx4JKg&feature=c4-overview&list=UUC2XyP1Rxdgx5UIDt8DAGIg[/url] [CODE]# memode/init.lua' Using map cycle file 'mapcycle.txt'. ('cfg/mapcycle.txt' was not found.) Nav File is wrong or something (4) Unknown command "sbox_plpldamage" Server logging enabled. Server logging data to file logs\L1027004.log L 10/27/2013 - 09:19:08: Log file started (file "logs\L1027004.log") (game "C:\TCAFiles\Users\jnevins\511\garrysmod") (version "5354") Unknown command "sv_allow_wait_command" NutScript could not connect to the database! Access denied for user 'root'@'localhost' (using password: YES) Client "[FL:RP] Nevy" connected (------). [[FL:RP] Nevy|2|STEAM_0:0:18452963] Lua Error: [ERROR] gamemodes/nutscript/gamemode/libs/sh_faction.lua:142: Attempt to register faction without an actual faction table! 1. error - [C]:-1 2. Register - gamemodes/nutscript/gamemode/libs/sh_faction.lua:142 3. unknown - gamemodes/sample/gamemode/schema/factions/sh_citizen.lua:8 4. include - [C]:-1 5. Include - gamemodes/nutscript/gamemode/sh_util.lua:17 6. Load - gamemodes/nutscript/gamemode/libs/sh_faction.lua:176 7. Init - gamemodes/nutscript/gamemode/libs/sh_schema.lua:29 8. unknown - gamemodes/sample/gamemode/cl_init.lua:3 [[FL:RP] Nevy|2|STEAM_0:0:18452963] Lua Error: [ERROR] gamemodes/nutscript/gamemode/libs/sh_faction.lua:142: Attempt to register faction without an actual faction table! 1. error - [C]:-1 2. Register - gamemodes/nutscript/gamemode/libs/sh_faction.lua:142 3. unknown - gamemodes/sample/gamemode/schema/factions/sh_metrocop.lua:17 4. include - [C]:-1 5. Include - gamemodes/nutscript/gamemode/sh_util.lua:17 6. Load - gamemodes/nutscript/gamemode/libs/sh_faction.lua:176 7. Init - gamemodes/nutscript/gamemode/libs/sh_schema.lua:29 8. unknown - gamemodes/sample/gamemode/cl_init.lua:3 [[FL:RP] Nevy|2|STEAM_0:0:18452963] Lua Error: [ERROR] gamemodes/nutscript/gamemode/libs/sh_class.lua:14: attempt to index local 'classTable' (a nil value) 1. Register - gamemodes/nutscript/gamemode/libs/sh_class.lua:14 2. unknown - gamemodes/sample/gamemode/schema/classes/sh_cp_recruit.lua:9 3. include - [C]:-1 4. Include - gamemodes/nutscript/gamemode/sh_util.lua:17 5. Load - gamemodes/nutscript/gamemode/libs/sh_class.lua:60 6. Init - gamemodes/nutscript/gamemode/libs/sh_schema.lua:30 7. unknown - gamemodes/sample/gamemode/cl_init.lua:3 [[FL:RP] Nevy|2|STEAM_0:0:18452963] Lua Error: [ERROR] gamemodes/nutscript/gamemode/libs/sh_class.lua:15: Attempt to register class without faction! (cp_recruit) 1. error - [C]:-1 2. Register - gamemodes/nutscript/gamemode/libs/sh_class.lua:15 3. Load - gamemodes/nutscript/gamemode/libs/sh_class.lua:61 4. Init - gamemodes/nutscript/gamemode/libs/sh_schema.lua:30 5. unknown - gamemodes/sample/gamemode/cl_init.lua:3 [[FL:RP] Nevy|2|STEAM_0:0:18452963] Lua Error: Couldn't Load Init Script: 'sample/gamemode/cl_init.lua' Dropped [FL:RP] Nevy from server (Disconnect by user.) Fetching Workshop Addons.. host_workshop_collection is unset Adding Path: [C:\content\cstrike] FIND [C:\content\cstrike\*.vpk] ADDING [C:\content\cstrike\cstrike_pak_000.vpk] Adding Path: [C:\content\tf] FIND [C:\content\tf\*.vpk] ADDING [C:\content\tf\tf2_misc_000.vpk] Adding Path: [C:\content\csgo] FIND [C:\content\csgo\*.vpk] ADDING [C:\content\csgo\pak01_000.vpk] Adding Path: [C:\content\hl2mp] FIND [C:\content\hl2mp\*.vpk] ADDING [C:\content\hl2mp\hl2mp_pak_000.vpk] Adding Path: [C:\content\dod] FIND [C:\content\dod\*.vpk] ADDING [C:\content\dod\dod_pak_000.vpk] Changing gamemode to Sample (sample) Adding Path: [C:\content\cstrike] FIND [C:\content\cstrike\*.vpk] ADDING [C:\content\cstrike\cstrike_pak_000.vpk] Adding Path: [C:\content\tf] FIND [C:\content\tf\*.vpk] ADDING [C:\content\tf\tf2_misc_000.vpk] Adding Path: [C:\content\csgo] FIND [C:\content\csgo\*.vpk] ADDING [C:\content\csgo\pak01_000.vpk] Adding Path: [C:\content\hl2mp] FIND [C:\content\hl2mp\*.vpk] ADDING [C:\content\hl2mp\hl2mp_pak_000.vpk] Adding Path: [C:\content\dod] FIND [C:\content\dod\*.vpk] ADDING [C:\content\dod\dod_pak_000.vpk] "host_workshop_collection" = "" game WARNING: Port 27005 was unavailable - bound to port 27007 instead Network: IP xx.xx.xx.xx, mode MP, dedicated Yes, ports 27020 SV / 27007 CL PREP OK Lua JIT is DISABLED! NutScript using SQLite for database. NutScript using SQLite for database. [ERROR] gamemodes/nutscript/gamemode/libs/sh_faction.lua:142: Attempt to register faction without an actual faction table! 1. error - [C]:-1 2. Register - gamemodes/nutscript/gamemode/libs/sh_faction.lua:142 3. unknown - gamemodes/sample/gamemode/schema/factions/sh_citizen.lua:8 4. include - [C]:-1 5. Include - gamemodes/nutscript/gamemode/sh_util.lua:17 6. Load - gamemodes/nutscript/gamemode/libs/sh_faction.lua:176 7. Init - gamemodes/nutscript/gamemode/libs/sh_schema.lua:29 8. unknown - gamemodes/sample/gamemode/init.lua:3 [ERROR] gamemodes/nutscript/gamemode/libs/sh_faction.lua:142: Attempt to register faction without an actual faction table! 1. error - [C]:-1 2. Register - gamemodes/nutscript/gamemode/libs/sh_faction.lua:142 3. unknown - gamemodes/sample/gamemode/schema/factions/sh_metrocop.lua:17 4. include - [C]:-1 5. Include - gamemodes/nutscript/gamemode/sh_util.lua:17 6. Load - gamemodes/nutscript/gamemode/libs/sh_faction.lua:176 7. Init - gamemodes/nutscript/gamemode/libs/sh_schema.lua:29 8. unknown - gamemodes/sample/gamemode/init.lua:3 [ERROR] gamemodes/nutscript/gamemode/libs/sh_class.lua:14: attempt to index local 'classTable' (a nil value) 1. Register - gamemodes/nutscript/gamemode/libs/sh_class.lua:14 2. unknown - gamemodes/sample/gamemode/schema/classes/sh_cp_recruit.lua:9 3. include - [C]:-1 4. Include - gamemodes/nutscript/gamemode/sh_util.lua:17 5. Load - gamemodes/nutscript/gamemode/libs/sh_class.lua:60 6. Init - gamemodes/nutscript/gamemode/libs/sh_schema.lua:30 7. unknown - gamemodes/sample/gamemode/init.lua:3 [ERROR] gamemodes/nutscript/gamemode/libs/sh_class.lua:15: Attempt to register class without faction! (cp_recruit) 1. error - [C]:-1 2. Register - gamemodes/nutscript/gamemode/libs/sh_class.lua:15 3. Load - gamemodes/nutscript/gamemode/libs/sh_class.lua:61 4. Init - gamemodes/nutscript/gamemode/libs/sh_schema.lua:30 5. unknown - gamemodes/sample/gamemode/init.lua:3 Couldn't Load Init Script: 'sample/gamemode/init.lua' Using map cycle file 'mapcycle.txt'. ('cfg/mapcycle.txt' was not found.) Nav File is wrong or something (4) Unknown command "sbox_plpldamage" Server logging enabled. Server logging data to file logs\L1027005.log L 10/27/2013 - 09:33:22: Log file started (file "logs\L1027005.log") (game "C:\TCAFiles\Users\jnevins\511\garrysmod") (version "5354") Unknown command "sv_allow_wait_command" Client "[FL:RP] Nevy" connected (---------). [[FL:RP] Nevy|2|STEAM_0:0:18452963] Lua Error: [ERROR] gamemodes/nutscript/gamemode/libs/sh_faction.lua:142: Attempt to register faction without an actual faction table! 1. error - [C]:-1 2. Register - gamemodes/nutscript/gamemode/libs/sh_faction.lua:142 3. unknown - gamemodes/sample/gamemode/schema/factions/sh_citizen.lua:8 4. include - [C]:-1 5. Include - gamemodes/nutscript/gamemode/sh_util.lua:17 6. Load - gamemodes/nutscript/gamemode/libs/sh_faction.lua:176 7. Init - gamemodes/nutscript/gamemode/libs/sh_schema.lua:29 8. unknown - gamemodes/sample/gamemode/cl_init.lua:3 [[FL:RP] Nevy|2|STEAM_0:0:18452963] Lua Error: [ERROR] gamemodes/nutscript/gamemode/libs/sh_faction.lua:142: Attempt to register faction without an actual faction table! 1. error - [C]:-1 2. Register - gamemodes/nutscript/gamemode/libs/sh_faction.lua:142 3. unknown - gamemodes/sample/gamemode/schema/factions/sh_metrocop.lua:17 4. include - [C]:-1 5. Include - gamemodes/nutscript/gamemode/sh_util.lua:17 6. Load - gamemodes/nutscript/gamemode/libs/sh_faction.lua:176 7. Init - gamemodes/nutscript/gamemode/libs/sh_schema.lua:29 8. unknown - gamemodes/sample/gamemode/cl_init.lua:3 [[FL:RP] Nevy|2|STEAM_0:0:18452963] Lua Error:
NutScript could not connect to the database! Access denied for user 'root'@'localhost' (using password: YES) you're using MySQL intentionally right
You need to update your factions, take a look at Dissolution:[url]https://github.com/Chessnut/Dissolution/blob/master/gamemode/schema/factions/sh_citizen.lua[/url]
i posted this on the dissolution thread too but here it is again on here: who would use a temperature script if i made it? aka you can die of hypothermia, staying warm can be effected by clothing, fires/heat source and of course being in doors. And being wet will be taken into account as well. would you use it?
ahahahaha the wiki was invaded by spam bots. click random page. [editline]27th October 2013[/editline] [url]http://ns.chessnut.info/Colon_Pure_Cleanse[/url]
[QUOTE=LauScript;42668242]i posted this on the dissolution thread too but here it is again on here: who would use a temperature script if i made it? aka you can die of hypothermia, staying warm can be effected by clothing, fires/heat source and of course being in doors. And being wet will be taken into account as well. would you use it?[/QUOTE] I would.
[QUOTE=LauScript;42668242]i posted this on the dissolution thread too but here it is again on here: who would use a temperature script if i made it? aka you can die of hypothermia, staying warm can be effected by clothing, fires/heat source and of course being in doors. And being wet will be taken into account as well. would you use it?[/QUOTE] Fucking yessss
Nutscript is awesome!
Sorry, you need to Log In to post a reply to this thread.