ULX

Author Topic: Gmod Nutscript Server How To Set Factions Health  (Read 6131 times)

0 Members and 1 Guest are viewing this topic.

Offline Capin

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Gmod Nutscript Server How To Set Factions Health
« on: May 31, 2016, 02:33:23 PM »
I have no idea how I'm supposed to setup the health that a faction spawns with, could someone please tell me what kind of function I need to put in that factions lua file?

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Gmod Nutscript Server How To Set Factions Health
« Reply #1 on: May 31, 2016, 03:15:52 PM »
I don't know exactly what you're talking about, but I believe the Entity:SetMaxHealth line might help you here.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline Capin

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: Gmod Nutscript Server How To Set Factions Health
« Reply #2 on: May 31, 2016, 03:34:59 PM »
That doesn't work

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Gmod Nutscript Server How To Set Factions Health
« Reply #3 on: May 31, 2016, 03:36:30 PM »
Can I see the code that you have right now? Please post it using the (code=lua) tag (with brackets [] not parentheses)
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: Gmod Nutscript Server How To Set Factions Health
« Reply #4 on: May 31, 2016, 04:56:37 PM »
Can I see the code that you have right now? Please post it using the (code=lua) tag (with brackets [] not parentheses)
[offtopic]
You can use [nobbc][/nobbc] tags to disable BBCode parsing for anything between them.
Example:
[b]bold[/b]                ---> bold
[nobbc][b]bold[/b][/nobbc] ---> [b]bold[/b]

[/offtopic]
bw81@ulysses-forums ~ % whoami
Homepage

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Gmod Nutscript Server How To Set Factions Health
« Reply #5 on: May 31, 2016, 04:59:04 PM »
[offtopic]
You can use [nobbc][/nobbc] tags to disable BBCode parsing for anything between them.
Example:
[b]bold[/b]                ---> bold
[nobbc][b]bold[/b][/nobbc] ---> [b]bold[/b]

[/offtopic]

I was looking how to do that, thanks lol
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline Capin

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: Gmod Nutscript Server How To Set Factions Health
« Reply #6 on: May 31, 2016, 05:14:50 PM »
FACTION.name = "Deathwatch"
FACTION.desc = "Space Marine battle brother of the Sons of Dorn"
FACTION.color = Color(85,85,85)
FACTION.models = {
"models/player/group01/female_01.mdl",
"models/player/group01/female_02.mdl",
"models/player/group01/female_03.mdl",
"models/player/group01/female_04.mdl",
"models/player/group01/female_05.mdl",
"models/player/group01/female_06.mdl",
"models/player/group01/male_01.mdl",
"models/player/group01/male_02.mdl",
"models/player/group01/male_03.mdl",
"models/player/group01/male_04.mdl",
"models/player/group01/male_05.mdl",
"models/player/group01/male_06.mdl",
"models/player/group01/male_07.mdl",
"models/player/group01/male_08.mdl",
"models/player/group01/male_09.mdl",
}
FACTION.isDefault = false
SetMaxHealth(1000)
FACTION_DEATHWATCH = FACTION.index

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given