• DarkRP classes help.
    11 replies, posted
I made two rival gangs, and they work fine except for one issue. The "how to be the boss" info appears on the underling and instead of agendas showing up under their right classes, they only show up for each boss. I don't know if I messed up or if this is a DarkRP issue or what but... yeah here. [CODE]TEAM_MOB = AddExtraTeam("Mobster", Color(125, 125, 125, 255), { "models/player/hostage/hostage_01.mdl", "models/player/hostage/hostage_02.mdl", "models/player/hostage/hostage_03.mdl", "models/player/hostage/hostage_04.mdl"}, [[The lowest person of a crime family. A mobster generally works for the Mobboss who runs the crime family. The Mobboss sets your agenda and you follow it or you might be punished.]], {}, "mobster", 3, 30, 0, false, false) TEAM_BOSS = AddExtraTeam("Mob Boss", Color(175, 175, 175, 255), "models/player/gman_high.mdl", [[The Mobboss is the boss of the criminals in the city. With his power he coordinates the mobsters and forms an efficent crime organization. He has the ability to break into houses by using a lockpick. The Mobboss also can unarrest.]], {"unarrest_stick", "keypad_cracker"}, "mobboss", 1, 40, 0, false, false, TEAM_MOB) TEAM_GANG = AddExtraTeam("Gangster", Color(75, 75, 75, 255), { "models/player/Group03/Female_03.mdl", "models/player/Group03/Female_06.mdl", "models/player/group03/male_01.mdl", "models/player/Group03/male_03.mdl"}, [[The lowest person of crime. A gangster generally works for the Gang Lord who runs the streets. The Gang Lord sets your agenda and you follow it or you might be punished.]], {}, "gangster", 3, 30, 0, false, false) TEAM_LORD = AddExtraTeam("Gang Lord", Color(25, 25, 25, 255), "models/player/eli.mdl", [[The Gang Lord rules the streets. With his power he coordinates the gangsters to wrestle power away from the upper class. He has the ability to break into houses by using a lockpick. The Gang Lord also can unarrest.]], {"unarrest_stick", "keypad_cracker"}, "ganglord", 1, 40, 0, false, false, TEAM_GANG) [/CODE] [CODE]AddAgenda("Mobster's agenda", TEAM_BOSS, {TEAM_MOB}) AddAgenda("Gangster's agenda", TEAM_LORD, {TEAM_GANG})[/CODE]
dont know
[QUOTE] [CODE] AddAgenda("Mobster's agenda", TEAM_BOSS, {TEAM_MOB}) AddAgenda("Gangster's agenda", TEAM_LORD, {TEAM_GANG})[/CODE][/QUOTE] I think this is your problem. Remove these brackets { } Reply back with results :)
[QUOTE=nick_9_8;35200095]I think this is your problem. Remove these brackets { } Reply back with results :)[/QUOTE] You do realize that this has been posted over a month ago, right?
someone plz help me i cant figure whats wrong, when i start my darkrp my jobs don't work [CODE]TEAM_THIEF = AddExtraTeam("Thief", Color(80, 45, 0, 255), "models/player/Group03/Female_06.mdl", [[You can use your keypad cracker and your lock pick to get into peoples places to steal shipments and or Money printers]], {"keypad_cracker", "lockpick"}, "thief", 2, 60, 0, false) // TEAM_HITMAN = AddExtraTeam("Hitman", Color(0, 0, 0, 255), "models/player/e3assassin.mdl", [[People hire you to take a hit You have all the tools necaserry to get to sed person to "take care" of them Make sure when advertising for the hit you dont make it sound like a life threat]], {"keypad_cracker", "lockpick", "weapon_Knife", "weapon_glock2"}, "hitman", 1, 60, 0, true) // TEAM_WIRE = AddExtraTeam("WireTech", Color(0, 0, 255, 255), "models/player/hostage/hostage_02.mdl", [[Make things out of wire kgo]], {""}, "wire", 5, 60, 0, false) // TEAM_guard = AddExtraTeam("Guard", Color(195, 0, 255, 255), "models/player/odessa.mdl", [[Protect Gundealers etc for money.]], {"weapon_glock", "stunstick", "weaponchecker"}, "guard", 5, 60, 0, false) // TEAM_PC = AddExtraTeam("ComputerTech", Color(0, 0, 255, 255), "models/player/eli.mdl", [[Use your geeky skill, to make computers and sell them for profit]], {""}, "pctech", 5, 60, 0, false) // TEAM_SWAT = AddExtraTeam("S.W.A.T", Color(0, 0, 0, 255), {"models/player/riot.mdl", "models/player/mnu_soldier.mdl"}, [[you are the heavy, take down the criminals rank]], {"weapon_mad_glock", "weapon_mad_mp5", "keypad_cracker", "keys", "lockpickpro", "pocket", "stunstick", "taser", "door_ram", "unarrest_stick", "weapon_mad_m3", "arrest_stick"}, 's.w.a.t', 6, 120, 0, 1, true, true, TEAM_POLICE) // TEAM_LEADER = AddExtraTeam("SWAT LEADER", Color(0, 0, 0, 255), "models/player/swat.mdl", [[you are the chief of SWAT, take down the criminals and have higher authoroty than police commander]], {"weapon_mad_glock", "weapon_mad_m4", "keypad_cracker", "keys", "lockpickpro", "pocket", "weapon_mad_charge", "stunstick", "taser", "door_ram", "unarrest_stick", "weapon_mad_xm1014", "arrest_stick"}, 'LEADER', 1, 200, 0, 1, true, true, TEAM_POLICE, function(ply) return ply:CheckGroup("donator") or ply:IsAdmin() end) -- The extra check function. Enter nil or nothing to not have an extra check // TEAM_ARMY = AddExtraTeam("ARMY", Color(0, 0, 0, 255), {"models/player/urban.mdl", "models/player/ct_urban_elfa_classic_desert_marine.mdl", "models/player/pmc_goggle_up.mdl"}, [[fight for the government kill first ask questions later]], {"weapon_mad_scout", "weapon_mad_m4", "weapon_mad_usp", "weapon_mad_xm1014", "weapon_mad_grenade", "weapon_RPG", "riotshield", "weapon_mad_charge"}, 'army', 6, 200, 0, 1, false, true, function(ply) return ply:CheckGroup("donator") or ply:IsAdmin() end) -- The extra check function. Enter nil or nothing to not have an extra check // TEAM_FBI = AddExtraTeam("FBI", Color(0, 0, 0, 255), "models/humans/suits1/male_06.mdl", [[ protect the mayor and take control of the police and police chief wwhen hey cant find the criminal only you and the mayor can call in the army and swat doing his missions erns you money]], {"weapon_mad_57", "weapon_mad_glock"}, 'FBI', 4, 300, 0, false, true) // TEAM_TERRORIST = AddExtraTeam("Terrorist", Color(0, 0, 255, 255), "models/player/phoenix.mdl", [[u are a Terrorist hateing UK and US army you want to attack homeland]], {"lockpick", "pocket", "gmod_tool", "weapon_mad_deagle", "weapon_mad_pumpshotgun"}, 'terrorist', 6, 40, 0, 1, false) // TEAM_DRUG = AddExtraTeam("Drug Dealer", Color(0, 0, 255, 255), "models/player/guerilla.mdl", [[you are the Drug Dealer, make money by selling drugs, gangsters usually protect you as you work for the mob boss, you work for the mob boss so chillax]], {"weapon_mad_fiveseven"}, 'Drug', 2, 150, 0, false) // TEAM_PEADO = AddExtraTeam("Peadophile", Color(0, 0, 255, 255), "models/player/hostage/hostage_03.mdl", [[rape peole and threten them with knife then rape]], {"Assassins_Knife"}, 'peado', 2, 150, 0, 1, false) // TEAM_SMITH = AddExtraTeam("LockSmith", Color(80, 45, 0, 255), "models/player/hostage/hostage_04.mdl", [[people hire you to pick a lock, dont raid]], {"lockpickpro"}, "locksmith", 1, 140, 0, false) // TEAM_BANK = AddExtraTeam("Banker", Color(0, 0, 0, 255), "models/player/hostage/hostage_04.mdl", [[Manage peoples money]], {}, "Banker", 1, 140, 0, false) // TEAM_AOD = AddExtraTeam("Admin On Duty", Color(0, 0, 255, 255), "models/gtaiv/characters/niko.mdl", [[This rank is purley to admin, Do Not Roleplay at all No having Money printers, if you are caught abusing this you will be demoted also Do not spawn an entities at all They are there for testing purposes only DO NOT TOUCH THEM!]], {"Admin_keypad_cracker", "weapon_real_cs_admin_weapon"}, "admin", 1, 0, 1, false) // TEAM_SAOD = AddExtraTeam("SuperAdmin On Duty", Color(0, 0, 255, 255), "models/gtaiv/characters/niko.mdl", [[This rank is purley to Superadmin, Do Not Roleplay at all No having Money printers, Do not spawn an entities at all They are there for testing purposes only DO NOT TOUCH THEM!]], {"weapon_adminshotgun", "weapon_admin_scout", "weapon_real_cs_admin_weapon", "weapon_RPG", "Admin_keypad_cracker"}, 'superadmin', 2, 500, 2, 0, true) // TEAM_DEALER = AddExtraTeam("car dealer", color(0, 0, 0, 255), "models/player/odessa.mdl", [[sell cars to people for cheap max $500, howeverlong server is up mostly 3-4 hours]], {}, "DEALER", 1, 100, 0, false) /*[/CODE]
"rape peole and threten them with knife then rape" I love this troll.
ccan u spot the error i cant i need help
I made this awhile ago for someone, not sure if it still works. Its also pure lua so you can use it [URL="http://www.lua.org/cgi-bin/demo"]here[/URL]. [lua] function Color( ... ) return { ... }; end function AddExtraTeam( ... ) local _args = { ... }; local function parseTable( tab ) local _str = "{ "; for int_i = 1, #tab do _str = _str .. tab[ int_i ] .. ", "; end return _str .. "}"; end local _checkSum = { { "Class Name", "STRING" }, { "Class Color", "TABLE" }, { "Class Model", { "TABLE", "STRING" } }, { "Class Description", "STRING" }, { "Class Weapons", "TABLE" }, { "Class Command", { "STRING", 1} }, { "Class Max", "NUMBER" }, { "Class Salary", "NUMBER" }, { "Class Aff", "NUMBER" }, { "Gun License", "BOOLEAN" }, }; if( #_args < (#_checkSum) )then print( "[!!]\tInvalid number of arguments, you need atleast " .. #_args ); end for int_i = 1, #_args do local _verif = string.upper( type( _args[int_i] ) ); if( string.upper( type( _args[ int_i ] ) ) == "TABLE" )then _args[ int_i ] = parseTable( _args[ int_i ] ); end if( _checkSum[int_i] ~= nil )then local _tabCheck = ( string.upper( type( _checkSum[int_i][2] ) ) == "TABLE" ); if( _tabCheck )then _lS = _checkSum[int_i][2]; if( _lS[2] == 1 )then if( string.byte( string.sub( tostring( _lS[1][1] ), 0, 1 ) ) == 47 )then print( "[!!]\tYour class command contains a / in it!" ); end end if( ( _verif == _checkSum[ int_i ][ 2 ][ 1 ] ) or ( _verif == _checkSum[ int_i ][ 2 ][ 2 ] ) )then print( _checkSum[ int_i ][ 1 ] .. " :: WORKING :: " .. _args[int_i] ); else print( "[!!]\t" .. _checkSum[ int_i ][ 1 ] .. " :: ERROR BAD ARGUMENT TYPE" ); end else if( _verif == _checkSum[ int_i ][ 2 ] )then print( _checkSum[ int_i ][ 1 ] .. " :: WORKING :: " .. tostring( _args[int_i] ) ); else print( "[!!]\t" .. _checkSum[ int_i ][ 1 ] .. " :: ERROR BAD ARGUMENT TYPE" ); end end end end print("-----------------------------------------\n"); end --[[ ---------------------------------------------------- Enter your dumb class information below. ---------------------------------------------------- ]]-- TTEAM_THIEF = AddExtraTeam("Thief", Color(80, 45, 0, 255), "models/player/Group03/Female_06.mdl", [[You can use your keypad cracker and your lock pick to get into peoples places to steal shipments and or Money printers]], {"keypad_cracker", "lockpick"}, "thief", 2, 60, 0, false) [/lua]
holy shit every time i see a thread with people posting DarkRP code i vomit and pray that death swiftly finds its way to whomever originally coded DarkRP
i dont get it, what is causing the error cos on the PURE LUA site it says: input:1: unexpected symbol near '/'
1
my bad its: ERROR: GAMEMODE:'PlayerSetModel' Failed: [gamemodes\darkrpsvn\gamemode\sv_gamemode_functions .lua:415] attempt to index local 'TEAM' (a nil value)
Sorry, you need to Log In to post a reply to this thread.