DarkCoveR / darkrp

Automatically exported from code.google.com/p/darkrp
0 stars 0 forks source link

Several Suggestions #380

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
A command to add extra jobs to police chat would be nice.

Allow Chief CP to change the agenda not just the mayor.

Allow Chief CP to start a lockdown if there is no mayor.

A command which allows you to add a custom job to be able to listen/view /cr.

Original issue reported on code.google.com by rambo...@gmail.com on 14 Jul 2010 at 4:38

GoogleCodeExporter commented 8 years ago
1) http://wiki.garrysmod.com/?title=DarkRP:Group_Chat
A little tutorial I wrote on group chats.

2) By default the Chief can set the agenda as well as the mayor.

3) DarkRP/gamemode/main.lua, around line 1918 you should see the lockdown and 
unlockdown functions, replace them with:

local function Lockdown(ply)
    if not lstat and (ply:Team() == TEAM_MAYOR or ply:Team() == TEAM_CHIEF) then
        for k,v in pairs(player.GetAll()) do
            v:ConCommand("play npc/overwatch/cityvoice/f_confirmcivilstatus_1_spkr.wav\n")
        end
        lstat = true
        PrintMessageAll(HUD_PRINTTALK , LANGUAGE.lockdown_started)
        RunConsoleCommand("DarkRP_LockDown", 1)
        NotifyAll(4, 3, LANGUAGE.lockdown_started)
    end
    return ""
end
concommand.Add("rp_lockdown", Lockdown)
AddChatCommand("/lockdown", Lockdown)

function UnLockdown(ply) -- Must be global
    if lstat and not wait_lockdown and (ply:Team() == TEAM_MAYOR or ply:Team() == TEAM_CHIEF) then
        PrintMessageAll(HUD_PRINTTALK , LANGUAGE.lockdown_ended)
        NotifyAll(4, 3, LANGUAGE.lockdown_ended)
        wait_lockdown = true
        RunConsoleCommand("DarkRP_LockDown", 0)
        timer.Create("spamlock", 20, 1, WaitLock, "")
    end
    return ""
end
concommand.Add("rp_unlockdown", UnLockdown)
AddChatCommand("/unlockdown", UnLockdown)

4. DarkRP/gamemode/main.lua, around line 1668, you should see:

if v:Team() == TEAM_POLICE or v:Team() == TEAM_CHIEF or v == ply then

Simply add your custom teams TEAM_ to the if function, example:

if v:Team() == TEAM_POLICE or v:Team() == TEAM_CHIEF or v:Team() == TEAM_MYTEAM 
or v == ply then

Of course FPtje may decide to add these as commands, but for now here's a 
relatively simple edit way of doing it.

Original comment by ch...@watersideway.plus.com on 14 Jul 2010 at 6:53

GoogleCodeExporter commented 8 years ago
Thanks chris.

Original comment by fpeijnen...@gmail.com on 15 Jul 2010 at 8:44

GoogleCodeExporter commented 8 years ago
Thanks! Works perfectly :)

Original comment by rambo...@gmail.com on 15 Jul 2010 at 10:12