Just made a cooking things plugin for NutScript. Now we can eat some cooked food not melon or banana shits.
[media]http://www.youtube.com/watch?v=2kJNCYhjgso&feature=youtu.be[/media]
[QUOTE=rebel1324;41489224]Just made a cooking things plugin for NutScript. Now we can eat some cooked food not melon or banana shits.
[media]http://www.youtube.com/watch?v=2kJNCYhjgso&feature=youtu.be[/media][/QUOTE]
Looks excellent, keep up the good work! I, as well as everyone else on here I'm sure will be hoping you make this plugin available for public use!
Adding food and hunger stuffs
Yes, this will be pulbic.
[media]http://www.youtube.com/watch?v=aX1tnmRyWyY[/media]
Beginner-question here. We should not make any changes in the framework itself but is there a way to override functions?
For example let's take the notification system. Whenever a notification appears on the screen, a sound is played. Now I could just go into "cl_notification.lua" and remove or change the line:
[CODE]LocalPlayer():EmitSound("buttons/button14.wav", 40)[/CODE]
But I'm wondering if you can simply override the function from your scheme somehow.
I'll add hooks for that in the near future.
Added:
bool NoticeShouldAppear(message)
nil NoticeCreated(noticePanel)
nil NoticeRemoved(noticePanel)
I created another schema and added two factions. I get these errors when I start the server and join the game.
[IMG]http://puu.sh/3Ge8x.png[/IMG]
I did not receive this error with the two factions in the sample schema and they're nearly identical.
Prevented that issue by giving errors for invalid arguments when registering a faction.
[QUOTE=Chessnut;41281239]
[b]Do not use this for an actual RP server.[/b]
[/QUOTE]
Do you mean you don't want this to be used yet, or you advise not to?
[editline]21st July 2013[/editline]
Also, are you going to setup any documentation, for example, what hooks are available to plugins ?
I've had a look at the code and think it's a good base, would like to see others contributing/developing.
Get this as soon as i load in.
[ERROR] gamemodes/nutscript/gamemode/libs/sh_class.lua:11: Attempt to register class without faction! (cp_rct)
1. error - [C]:-1
2. Register - gamemodes/nutscript/gamemode/libs/sh_class.lua:11
3. unknown - gamemodes/sample/gamemode/schema/classes/sh_cp_recruit.lua:8
4. include - [C]:-1
5. Include - gamemodes/nutscript/gamemode/sh_util.lua:15
6. IncludeDir - gamemodes/nutscript/gamemode/sh_util.lua:40
7. Init - gamemodes/nutscript/gamemode/libs/sh_schema.lua:28
8. unknown - gamemodes/sample/gamemode/cl_init.lua:3
[QUOTE=jaooe;41540204]Do you mean you don't want this to be used yet, or you advise not to?
[editline]21st July 2013[/editline]
Also, are you going to setup any documentation, for example, what hooks are available to plugins ?
I've had a look at the code and think it's a good base, would like to see others contributing/developing.[/QUOTE]
I wouldn't reccommend one uses this to run an actual server since it is in development and things may change (e.g. SQL tables).
Theres the hooks.txt file in the main directory, but documentation will be finished once the gamemode starts being "polished." And, the plugin system will accept all hooks, just like gamemodes do in addition to custom ones called by NutScript.
[QUOTE=scopedbyluck;41548107]Get this as soon as i load in.
[ERROR] gamemodes/nutscript/gamemode/libs/sh_class.lua:11: Attempt to register class without faction! (cp_rct)
1. error - [C]:-1
2. Register - gamemodes/nutscript/gamemode/libs/sh_class.lua:11
3. unknown - gamemodes/sample/gamemode/schema/classes/sh_cp_recruit.lua:8
4. include - [C]:-1
5. Include - gamemodes/nutscript/gamemode/sh_util.lua:15
6. IncludeDir - gamemodes/nutscript/gamemode/sh_util.lua:40
7. Init - gamemodes/nutscript/gamemode/libs/sh_schema.lua:28
8. unknown - gamemodes/sample/gamemode/cl_init.lua:3[/QUOTE]
Made changes to the class system, so I forgot to update the sample schema. I've been working on another schema to release along with NutScript so most of my changes has been going to that schema. I'll be sure to update the sample schema further when I get the time.
Hello, is there a way that we can use no sql?
-snip-
[QUOTE=Chessnut;41548437]
Made changes to the class system, so I forgot to update the sample schema. I've been working on another schema to release along with NutScript so most of my changes has been going to that schema. I'll be sure to update the sample schema further when I get the time.[/QUOTE]
Ohh ok thank you!
[QUOTE=soliddzn;41548889]Hello, is there a way that we can use no sql?[/QUOTE]
If you mean without an external MySQL database, there's a config in sv_config.lua that is: nut.config.dbModule. If you set it to sqlite (which it is by default), no MySQL setup will be required. You can set it to tmysql4 or mysqloo if you want a MySQL database.
Heh, I joined this a few weeks back when you put it up for testing.
I was [HZ]Cpl. Jay Gatsby at the time.
My Zombie RP scheme is on progress. I'm working on this when I have some free time from making my own gamemode, underdone: reborn. NutScript surprisingly easy to develop with.
[media]http://www.youtube.com/watch?v=x7xdamozHwI[/media]
That looks awesome
Anyone here that would like to try and explain the class creation steps to me?
Made an outfit system.
[thumb]http://cloud-3.steampowered.com/ugc/920144122774219854/B9E4F2DE133A9BA4F0EB6F0C043962D8FBD7B37F/[/thumb]
[thumb]http://cloud-2.steampowered.com/ugc/920144122774217312/221E26B8F04838A39CB71D2F97F71EEC0754164F/[/thumb]
[thumb]http://cloud-2.steampowered.com/ugc/920144122774215313/A3B2ED6D4F7A912CBCE7016FD63E21A6B649E557/[/thumb]
[thumb]http://cloud-2.steampowered.com/ugc/920144122774213199/5550203F16496D8665F28B6D579D084D98D454FA/[/thumb]
[thumb]http://cloud-2.steampowered.com/ugc/920144122774208952/A3031C375642C09BAEBF337F27C4C2F49420FFA1/[/thumb]
[thumb]http://cloud-2.steampowered.com/ugc/920144122763160580/425B09B1206DF330F6FB601C62CEA0B9F38FFA97/[/thumb]
Rebel that is really nice, are you gonna release that or something?
[QUOTE=scopedbyluck;41677945]Rebel that is really nice, are you gonna release that or something?[/QUOTE]
I push some necessary plug-ins to NutScript GitHub Repository. Just like 'cookfood' plug-in. It will be pushed to the repo if it need so.
[QUOTE=rebel1324;41678035]I push some necessary plug-ins to NutScript GitHub Repository. Just like 'cookfood' plug-in. It will be pushed to the repo if it need so.[/QUOTE]
Oh ok I understand, great work by the way.
[url=https://github.com/Chessnut/NutScript/issues?state=open]Put some enhancement ideas + a bug (and a half-bug half-unimplemented-thing regarding the weapon menu) on the github issue tracker[/url].
Any more news on this?
Working on various plug-ins
[media]http://www.youtube.com/watch?v=mJmKCbx6F_Y[/media]
[thumb]http://cloud-4.steampowered.com/ugc/920144122775947626/BF9F765285F99A06334924299CAA2885C17E5BB9/[/thumb]
[thumb]http://cloud-3.steampowered.com/ugc/920144122843953055/BEB9C9D0B447721B749BC48EB0F9AF1D9032C67C/[/thumb]
[thumb]http://cloud-2.steampowered.com/ugc/920144122836448744/6D8C554390D30038E6A87B2741DAAAE38736B85B/[/thumb]
[thumb]http://cloud-2.steampowered.com/ugc/920144122775615235/D0B19D464BE127D9A122ECC0F9C3A2015FBD428B/[/thumb]
Currently Working on: Crafting( for my theme ), New Grabbing, Re-making Weapon Selection HUD.
mmmmmm looks really good
Looking good so far mate. Keep it up.
One of my friends suggested the ability to hold down E and click mouse1 to unholster a weapon. I took it a step further and did reholstering, too.
[lua]
function holster(ply, key)
if key == IN_ATTACK or key == IN_ATTACK2 then
local client = ply
local weapon = client:GetActiveWeapon()
if (!IsValid(weapon)) then
return
end
if (weapon.AlwaysRaised or nut.config.alwaysRaised[weapon:GetClass()]) then
return
end
if (client:WepRaised() and client:KeyDown(IN_USE) and client:KeyDown(IN_ATTACK2)) then
RunConsoleCommand("say", "/toggleraise") -- fuck i'm lazy
elseif (!client:WepRaised() and client:KeyDown(IN_USE) and client:KeyDown(IN_ATTACK)) then
RunConsoleCommand("say", "/toggleraise")
end
end
end
hook.Add("KeyPress", "Holster/unholster easily", holster)
[/lua]
(In case somebody wants a similar system)
It works great on my side.
(worthwhile page king)
Now then, anybody know how to run a function when an item is dropped? ie an onItemDrop hook or something? I've added in my own way of adding a function to be run when an item's dropped, but I'd like a better (and official) way of doing it.
So that I can do this:
[img]http://i.imgur.com/vUidWJv.png[/img]
AND FINALLY
In order for an item to keep track of ammo, should I add the amount of ammo the gun currently has to the item data?
[QUOTE=AndrewPH;41716684]Now then, anybody know how to run a function when an item is dropped? ie an onItemDrop hook or something? I've added in my own way of adding a function to be run when an item's dropped, but I'd like a better (and official) way of doing it.
[/QUOTE]
Just 2 snips from one of my clockwork items.
[lua]
-- Called when a player drops the item.
function ITEM:OnDrop(player, position) end;
-- Called when the item entity has spawned. This is used to set the material.
function ITEM:OnEntitySpawned(entity)
entity:SetMaterial("models/flesh");
end;
[/lua]
I think the second function is more what you are looking for as spawned refers to when it is dropped out of your inventory. As you may have guessed, the first function tells the item where to be spawned when dropped.
[QUOTE=GTbrawlers;41720660]Just 2 snips from one of my clockwork items.
[lua]
-- Called when a player drops the item.
function ITEM:OnDrop(player, position) end;
-- Called when the item entity has spawned. This is used to set the material.
function ITEM:OnEntitySpawned(entity)
entity:SetMaterial("models/flesh");
end;
[/lua]
I think the second function is more what you are looking for as spawned refers to when it is dropped out of your inventory. As you may have guessed, the first function tells the item where to be spawned when dropped.[/QUOTE]
Will it get fired with nutscript?
edit: nope.jpg. I know what I want, there's just no way of running a function when an item is dropped atm.
Sorry, you need to Log In to post a reply to this thread.