• Help | Advanced job adding
    3 replies, posted
Hi. I tried to make so you only can become Mayor guard if there is a Mayor. - No Error's in console. My code; This is my Main.lua [lua]local gteam = TEAM_MAYORGUARD function checkifmayor() if team.NumPlayers(9) == 1 then gteam = true else gteam = false print(team.NumPlayers (9)) end return "" end timer.Create( "jobtimer", 10, 0, checkifmayor)[/lua] And this is the Shared.lua; [lua]function updatevalues() if gteam == true then TEAM_MAYORGUARD = AddExtraTeam("Mayor Guard", Color(150, 45, 45, 255), "models/player/leet.mdl", [[You are the Mayor's guard, protect him.. What ever it costs]], {}, "Mayorguard", 1, 120, 0, true) else TEAM_MAYORGUARD = nil end end timer.Create( "sharedtimer", 10, 0, updatevalues) /*[/lua] Thanks in advance,
I know quite little about lua coding, but i'm pretty sure you will need a little bit more than that...
Not th answer i were looking for..
:tubular: Bumb. :tubular:
Sorry, you need to Log In to post a reply to this thread.