custom jobs

Post Reply
frankie
New to forums
New to forums
Posts: 2
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sun Feb 22, 2015 11:26 am

custom jobs

Post by frankie »

ok im so confused maybe i forgot a comma? im not sure why its creating a error this is the code

TEAM_SWAT CHIEF = DarkRP.createJob("SWAT CHIEF", {
color = Color(0, 0, 255, 255),
model = "models/player/swat.mdl",
description = [[You are swat do swat stuff]],
weapons = {"m9k_usc","m9k_m92beretta","stunstick","weaponchecker","arrest_stick","door_ram"},
command = "swatmember",
max = 1,
salary = 75,
admin = 0,
vote = true,
hasLicense = true,


})



-- Code generated with help from: TCB's DarkRP 2.5 Tools | www.thecodingbeast.com
TEAM_SWAT Member = DarkRP.createJob("SWAT MEMBER", {
color = Color(0, 0, 255, 255),
model = "models/player/gasmask.mdl","models/player/urban.mdl",
description = [[You are swat follow your leader]],
weapons = {"arrest_stick","stunstick","weaponchecker","m9k_mp9","m9k_m92beretta"},
command = "swatmember",
max = 5,
salary = 65,
admin = 0,
vote = true,
hasLicense = true,


})

TEAM_ROBBER = DarkRP.createJob("Robber", {
color = Color(2, 1, 3, 255),
model = "models/player/arctic.mdl",
description = [[You are a robber rob people.]],
weapons = {"m9k_glock","lockpick"},
command = "robber",
max = 4,
salary = 50,
admin = 0,
vote = false,
hasLicense = false,

})

TEAM_Thief = DarkRP.createJob("", {
color = Color(0, 0, 0, 255),
model = "models/player/phoenix.mdl",
description = [[You are a thief steal things.]],
weapons = {"lockpick"},
command = "thief",
max = 5,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,


})




the lua error in console is
---------------------------------------------------------------------------
Attempting to create unknown particle system 'water_faucet'
There is 1 Lua problem!
Please check your console for more information!
[ERROR] Lua is unable to understand file "darkrp_customthings/jobs.lua" because its author made a mistake around line number 21.
The best help I can give you is this:

Right before the 'LEADER', Lua expected to read an '='-sign, but it didn't.

Hints:
- Did you simply forget the '='-sign?
- Did you forget a comma?
- Is this supposed to be a local variable?

------- End of Simplerr error -------

what am i doing wrong its in darkrp customstuff or whatever then its in jobs.lua. should there to be lines after this })? ex end at line 65 starts new line at 66
Obligated
New to forums
New to forums
Posts: 12
Joined: Wed Mar 18, 2015 3:39 pm

Re: custom jobs

Post by Obligated »

You Had alot of stuff wrong, if I was you I would not use generators.

Code: Select all

 TEAM_SWATCHIEF = DarkRP.createJob("SWAT CHIEF", {
	color = Color(0, 0, 255, 255),
	model = "models/player/swat.mdl",
	description = [[You are swat do swat stuff]],
	weapons = {"m9k_usc", "m9k_m92beretta", "stunstick", "weaponchecker", "arrest_stick", "door_ram"},
	command = "swatcheif",
	max = 1,
	salary = 75,
	admin = 0,
	vote = true,
	hasLicense = true
})

 TEAM_SWATM = DarkRP.createJob("SWAT MEMBER", {
	color = Color(0, 0, 255, 255),
	model = {
		"models/player/gasmask.mdl",
		"models/player/urban.mdl"
	},
	description = [[You are swat follow your leader]],
	weapons = {"arrest_stick", "stunstick", "weaponchecker", "m9k_mp9", "m9k_m92beretta"},
	command = "swatmember",
	max = 5,
	salary = 65,
	admin = 0,
	vote = true,
	hasLicense = true
})

 TEAM_ROBBER = DarkRP.createJob("Robber", {
	color = Color(2, 1, 3, 255),
	model = "models/player/arctic.mdl",
	description = [[You are a robber rob people.]],
	weapons = {"m9k_glock", "lockpick"},
	command = "robber",
	max = 4,
	salary = 50,
	admin = 0,
	vote = false,
	hasLicense = false
})

 TEAM_Thief = DarkRP.createJob("Thief", {
	color = Color(0, 0, 0, 255),
	model = "models/player/phoenix.mdl",
	description = [[You are a thief steal things.]],
	weapons = {"lockpick"},
	command = "thief",
	max = 5,
	salary = 45,
	admin = 0,
	vote = false,
	hasLicense = false
})
Post Reply