Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local timerBeforeShow = 600 -- Time before we show the menu to the player (in seconds)
- util.AddNetworkString("RequestDemoODicta")
- util.AddNetworkString("SetRegime")
- hook.Add("OnPlayerChangedTeam","IsDemoOrDicta",function(ply, _, teams)
- if team.GetName(teams) == MaireConf.MayorJob then
- timer.Create("Deadman:::DemocratieTimer"..ply:SteamID(), timerBeforeShow, 1, function()
- if ply:team.GetName(ply:Team()) == MaireConf.MayorJob then -- Check if player is still mayor
- net.Start("RequestDemoODicta")
- net.Send(ply)
- end
- end)
- end
- end)
- net.Receive("SetRegime",function(_,ply)
- ply:SetNWString("RegimeMaire",net.ReadBool() and "Démocratie" or "Dictature")
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement