• Shared.lua help?
    3 replies, posted
March 2010 4 Posts Ok, So everything goes fine until i add the jobs into the shared.lua script. When i put the jobs in and restart the server everything goes wrong. When i join everyone is gray and only walk sideways, there is alot of jobs that i never put in such as zombie, Overload ect. here is the code for the jobs. Also i self taught my self to know lua so i prob messed up somewhere. TEAM_HITMAN = AddExtraTeam("Hitman", Color(80,95,72), "models/player/leet.mdl", [[you kill for money you are the one they call to kill the mayor but you have to be payed for some one]], {"weapon_deagle2"}, "hitman", 2, 100, 0, false) TEAM_SWATSNIPER = AddExtraTeam("SWAT Sniper", Color(0,55,255), "models/player/swat.mdl", [[You help the Cp, SWAT "Take Em Out High" RMD will not be Tolerated]], {"ls_sniper", "arrest_stick", "unarrest_stick"}, "sniper", 1, 150, 1, true, TEAM_SWAT) TEAM_SWAT = AddExtraTeam("SWAT", Color(0,55,255), "models/player/swat.mdl", [[Take Down Gangs That Are Disturbing The Streats RMD will not be Tolerated]], {"weapon_m42", "weapon_deagle2", "stunstick", "door_ram", "arrest_stick", "unarrest_stick"}, "swat", 5, 150, 0, false, true) TEAM_SWATTECH = AddExtraTeam("SWAT TECH" , Color(0,55,255), "models/player/swat.mdl", [[Help the Swat and the CP with the keypad cracker]], {"keypad_cracker", "weapon_real_cs_tmp", "door_ram", "arrest_stick", "unarrest_stick"}, "swattech", 2, 150, 0, false, true) TEAM_SECURITY = AddExtraTeam("Security Gard", Color(75,0,175), { "models/player/group03/male_01.mdl", "models/player/Group03/Male_02.mdl", "models/player/Group03/male_03.mdl", "models/player/Group03/Male_04.mdl", "models/player/Group03/Male_05.mdl", "models/player/Group03/Male_06.mdl", "models/player/Group03/Male_07.mdl", "models/player/Group03/Male_08.mdl", "models/player/Group03/Male_09.mdl"}, [[Protect Peoples Stuff....]], {"stunstick"}, "gard", 5, 90, 0, false, true) TEAM_BUILDER = AddExtraTeam("Builder", Color(255, 0, 0), { "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"}, [[You Build For Monney ]], {"gmod_tool"}, "builder", 10, 100, 0, false) TEAM_ITGUY = AddExtraTeam("Technician", Color(0, 255, 0), "models/player/alyx.mdl", [[You Make PCz For Monney ]], {"gmod_tool"}, "it", 2, 100, 0, false) TEAM_THEIF = AddExtraTeam("Theif", Color(255, 140, 0, 255), { "models/player/Group03/Female_01.mdl", "models/player/Group03/Female_02.mdl", "models/player/Group03/Female_03.mdl", "models/player/Group03/Female_04.mdl", "models/player/Group03/Female_06.mdl", "models/player/Group03/Female_07.mdl", "models/player/group03/male_01.mdl", "models/player/Group03/Male_02.mdl", "models/player/Group03/male_03.mdl", "models/player/Group03/Male_04.mdl", "models/player/Group03/Male_05.mdl", "models/player/Group03/Male_06.mdl", "models/player/Group03/Male_07.mdl", "models/player/Group03/Male_08.mdl", "models/player/Group03/Male_09.mdl"}, [[Steal Some stuff to make a living.]], {"climb_swep", "lockpick", "keypad_cracker"}, "theif", 2, 50, 0, false) TEAM_ADMIN = AddExtraTeam("Owner", Color(255, 140, 0, 255), "models/player/barney.mdl", [[You own the server ]], {"climb_swep"}, "admin", 1, 9000, 2 false) TEAM_FIGHT = AddExtraTeam("Fight Club Owner", Color(255, 0, 0), "models/player/Male_06.mdl", [[You own the fight club ]], "fight", 2, 60, 0 false}
please use the lua tags when posting lua code And take a close look at this [lua]TEAM_FIGHT = AddExtraTeam("Fight Club Owner", Color(255, 0, 0), "models/player/Male_06.mdl", [[You own the fight club ]], "fight", 2, 60, 0 false}[/lua] You put a } instead of a ) Its a syntax error Theres probably a few syntax errors, i just noticed this one off the bat noticed 2 more [lua]TEAM_ADMIN = AddExtraTeam("Owner", Color(255, 140, 0, 255), "models/player/barney.mdl", [[You own the server ]], {"climb_swep"}, "admin", 1, 9000, 2 false) TEAM_FIGHT = AddExtraTeam("Fight Club Owner", Color(255, 0, 0), "models/player/Male_06.mdl", [[You own the fight club ]], "fight", 2, 60, 0 false}[/lua] You forgot to put a , between the number and false on both of these Overall fixed code: [lua]TEAM_HITMAN = AddExtraTeam("Hitman", Color(80,95,72), "models/player/leet.mdl", [[you kill for money you are the one they call to kill the mayor but you have to be payed for some one]], {"weapon_deagle2"}, "hitman", 2, 100, 0, false) TEAM_SWATSNIPER = AddExtraTeam("SWAT Sniper", Color(0,55,255), "models/player/swat.mdl", [[You help the Cp, SWAT "Take Em Out High" RMD will not be Tolerated]], {"ls_sniper", "arrest_stick", "unarrest_stick"}, "sniper", 1, 150, 1, true, TEAM_SWAT) TEAM_SWAT = AddExtraTeam("SWAT", Color(0,55,255), "models/player/swat.mdl", [[Take Down Gangs That Are Disturbing The Streats RMD will not be Tolerated]], {"weapon_m42", "weapon_deagle2", "stunstick", "door_ram", "arrest_stick", "unarrest_stick"}, "swat", 5, 150, 0, false, true) TEAM_SWATTECH = AddExtraTeam("SWAT TECH" , Color(0,55,255), "models/player/swat.mdl", [[Help the Swat and the CP with the keypad cracker]], {"keypad_cracker", "weapon_real_cs_tmp", "door_ram", "arrest_stick", "unarrest_stick"}, "swattech", 2, 150, 0, false, true) TEAM_SECURITY = AddExtraTeam("Security Gard", Color(75,0,175), { "models/player/group03/male_01.mdl", "models/player/Group03/Male_02.mdl", "models/player/Group03/male_03.mdl", "models/player/Group03/Male_04.mdl", "models/player/Group03/Male_05.mdl", "models/player/Group03/Male_06.mdl", "models/player/Group03/Male_07.mdl", "models/player/Group03/Male_08.mdl", "models/player/Group03/Male_09.mdl"}, [[Protect Peoples Stuff....]], {"stunstick"}, "gard", 5, 90, 0, false, true) TEAM_BUILDER = AddExtraTeam("Builder", Color(255, 0, 0), { "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"}, [[You Build For Monney ]], {"gmod_tool"}, "builder", 10, 100, 0, false) TEAM_ITGUY = AddExtraTeam("Technician", Color(0, 255, 0), "models/player/alyx.mdl", [[You Make PCz For Monney ]], {"gmod_tool"}, "it", 2, 100, 0, false) TEAM_THEIF = AddExtraTeam("Theif", Color(255, 140, 0, 255), { "models/player/Group03/Female_01.mdl", "models/player/Group03/Female_02.mdl", "models/player/Group03/Female_03.mdl", "models/player/Group03/Female_04.mdl", "models/player/Group03/Female_06.mdl", "models/player/Group03/Female_07.mdl", "models/player/group03/male_01.mdl", "models/player/Group03/Male_02.mdl", "models/player/Group03/male_03.mdl", "models/player/Group03/Male_04.mdl", "models/player/Group03/Male_05.mdl", "models/player/Group03/Male_06.mdl", "models/player/Group03/Male_07.mdl", "models/player/Group03/Male_08.mdl", "models/player/Group03/Male_09.mdl"}, [[Steal Some stuff to make a living.]], {"climb_swep", "lockpick", "keypad_cracker"}, "theif", 2, 50, 0, false) TEAM_ADMIN = AddExtraTeam("Owner", Color(255, 140, 0, 255), "models/player/barney.mdl", [[You own the server ]], {"climb_swep"}, "admin", 1, 9000, 2, false) TEAM_FIGHT = AddExtraTeam("Fight Club Owner", Color(255, 0, 0), "models/player/Male_06.mdl", [[You own the fight club ]], "fight", 2, 60, 0, false)[/lua]
Eh it still didn't work :/
Most team's have "Color(XX, XX, XX)" It needs to be "Color(XX, XX, XX, XX)" I think. [editline]9th September 2011[/editline] Or it doesn't require the Alpha part. Maybe only set the color to 123, 123,123 instead of 123, 123, 123 ,123 (Example)
Sorry, you need to Log In to post a reply to this thread.