[QUOTE=NightmareX91;42397042][code]
-- Define it as a whitelisted faction.
FACTION.isDefault = false
[/code][/QUOTE]
Thanks!
[QUOTE=Red Toaster;42397057]ITEM.weight doesn't do anything -- what's up with that? does the parameter have to be something other than an integer?[/QUOTE]
I don't think it has a function yet, if ever.
[QUOTE=NightmareX91;42397083]I don't think it has a function yet, if ever.[/QUOTE]
According to the github issue list there is a ITEM.weight function.
[editline]3rd October 2013[/editline]
Also, I noticed that /givemoney gives money to both the person receiving the money and the person giving the money.
Sorry for asking a lot of questions. This is more likely the last one.
How do I set people's money? And make them start off with it.
-Thanks!
[QUOTE=soap755;42397529]Sorry for asking a lot of questions. This is more likely the last one.
How do I set people's money? And make them start off with it.
-Thanks![/QUOTE]
You have to edit the SQL to set a specific person's money
[QUOTE=Red Toaster;42397684]You have to edit the SQL to set a specific person's money[/QUOTE]
Actually, there's a setting in sv_config.lua for starting amounts.
[code]
-- The starting amount of money.
nut.config.startingAmount = 0
[/code]
[QUOTE=NightmareX91;42397769]Actually, there's a setting in sv_config.lua for starting amounts.
[code]
-- The starting amount of money.
nut.config.startingAmount = 0
[/code][/QUOTE]
That's different from changing the amount of money specific person has.
[QUOTE=Red Toaster;42397832]That's different from changing the amount of money specific person has.[/QUOTE]
I know, but he also asked about starting amounts.
[QUOTE=NightmareX91;42397843]I know, but he also asked about starting amounts.[/QUOTE]
Right, fair enough. And do you know of a quick fix for the /givemoney command? Presently, it gives the money to both the giver and the receiver, which has some obviously bad implications.
[QUOTE=Red Toaster;42397906]Right, fair enough. And do you know of a quick fix for the /givemoney command? Presently, it gives the money to both the giver and the receiver, which has some obviously bad implications.[/QUOTE]
Looking through the command's function, I can't see why that would be happening. Looks perfectly fine to me.
[QUOTE=NightmareX91;42398052]Looking through the command's function, I can't see why that would be happening. Looks perfectly fine to me.[/QUOTE]
Yeah I took a look at it myself. I think the problem is that the player who's giving the money is not actually being set as 'entity', and is considered 'client' along with the person being targeted, but I don't know how to rectify that.
[QUOTE=Red Toaster;42398104]Yeah I took a look at it myself. I think the problem is that the player who's giving the money is not actually being set as 'entity', and is considered 'client' along with the person being targeted, but I don't know how to rectify that.[/QUOTE]
Submit it as an issue on GitHub.
[QUOTE=NightmareX91;42398120]Submit it as an issue on GitHub.[/QUOTE]
Done.
[QUOTE=Red Toaster;42397057]ITEM.weight doesn't do anything -- what's up with that? does the parameter have to be something other than an integer?[/QUOTE]
[img]http://i.imgur.com/kLR9pNV.png[/img]
It controls the capacity of items in your inventory.
Purchases made from a vendor now display the correct pricing but do not take away the players money nor stop them from purchasing it even if they have zero currency.
Hey, I'm trying to add a faction, but it seems that the model goes as an error. The code is like this:
[CODE]FACTION_MARINE = 3
local FACTION = {}
FACTION.name = "Marine"
FACTION.uniqueID = "marine"
FACTION.desc = "Teste."
FACTION.color = Color(20, 150, 15)
FACTION.maleModels = {
"models/unsc_m01.mdl"
}
FACTION.femaleModels = FACTION.maleModels
FACTION.isDefault = true
nut.faction.Register(FACTION_MARINE, FACTION)[/CODE]
I've copy and pasted the CP model and used it, but I want to add more models, and when I put, it creates so many LUA errors I get kicked from the server!
-snip- I'm bad at code.
Will fix tomorow, but for now just set the price through the admin tab.
[QUOTE=Garrison;42401234][CODE]FACTION.maleModels = {
"models/model.mdl",
"models/model.mdl",
"models/model.mdl"
}[/CODE]
Make sure the last model on the list doesn't have a comma by the way, that always ruined my code a while back.[/QUOTE]
Thanks, but it seems that the models are errors as playermodels... I unpacked the addon that contained the playermodels, and putted the models into the /models folder, but it seems that continues as an error...
If they appear as errors, it isn't the Lua's fault.
Is there a function to check whether a player has a specific item in their inventory?
Is there any form of complete documentation? I want to port a few Clockwork plugins, but there are some core functions in which I need to know if there is a NutScript equivalent.
[QUOTE=NightmareX91;42406367]Is there any form of complete documentation? I want to port a few Clockwork plugins, but there are some core functions in which I need to know if there is a NutScript equivalent.[/QUOTE]
[url]http://ns.chessnut.info/Main_Page[/url]
here you go.
[QUOTE=soliv;42406864][url]http://ns.chessnut.info/Main_Page[/url]
here you go.[/QUOTE]
That's incomplete. I'm looking for an alternative, but somewhat complete documentation - instead of having to search through the NutScript source myself.
[QUOTE=NightmareX91;42406919]That's incomplete. I'm looking for an alternative, but somewhat complete documentation - instead of having to search through the NutScript source myself.[/QUOTE]
ctrl+f
[QUOTE=Johnny Guitar;42406974]ctrl+f[/QUOTE]
good enough.