ItsMods

Full Version: ProMod Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Oh sorry missed that thnx for the help Smile
PHP Code:
using System;
using System.Collections.Generic;
using Addon;

namespace 
promod_league
{
    public class 
esl CPlugin
    
{
        private  List<
stringcurclients;

        private 
bool isLive;
        
        private 
bool isESLAdmin(string xuid)
        {
            return (
GetServerCFG("ESLAdmin"xuid"") == "1");
        }

        private 
void clientlist()
        {
            List<
ServerClientclients GetClients();
            foreach (
ServerClient client in clients)
            {
                
curclients.Add(client.XUID);
            }
        }
        private 
void cleanclientlist()
        {
            
curclients.Clear();
        }

        private 
void CheckConnectingClient(ServerClient Client)
        {
            if(!
curclients.Contains(Client.XUID))
                
ServerCommand("kick " Client.ClientNum);
        }

        public 
void CheckMessage(string messageServerClient Client)
        {
            if (
message.StartsWith("!live") && isESLAdmin(Client.XUID))
            {
                
isLive true;
            
clientlist();
                
ServerSay("^1Match is now Live! \n ^2Connection Bloc is enabled"true);
            }
            if (
message.StartsWith("!stop") && isESLAdmin(Client.XUID))
            {
                
isLive false;
                
cleanclientlist();
                
ServerSay("^1Match is not live! \n ^2Connection Block is now disabled"true);
            }
        }

        public 
void blockConnections(ServerClient Client)
        {
            
CheckConnectingClient(Client);
        }
    }

I dont know if it works, i couldnt test it, it should block the connection of players who are not part of the match if an admin set the game to live. I hope you can use it Wink
Bob.
Can anyone tell me what command to add to the dvars to preset a filmtweak?
(02-09-2012, 12:16)zlol Wrote: [ -> ]Can anyone tell me what command to add to the dvars to preset a filmtweak?

You can't create custom presets.
(02-09-2012, 12:51)zxz0O0 Wrote: [ -> ]
(02-09-2012, 12:16)zlol Wrote: [ -> ]Can anyone tell me what command to add to the dvars to preset a filmtweak?

You can't create custom presets.

Not a custom one but a preset one as ive tried adding ftweakpreset "1" to the dvars but it didnt work
(02-09-2012, 13:21)zlol Wrote: [ -> ]
(02-09-2012, 12:51)zxz0O0 Wrote: [ -> ]
(02-09-2012, 12:16)zlol Wrote: [ -> ]Can anyone tell me what command to add to the dvars to preset a filmtweak?

You can't create custom presets.

Not a custom one but a preset one as ive tried adding ftweakpreset "1" to the dvars but it didnt work
Ah that's what you mean. Do you want to add it to forceClientDvars? Ftweakpreset is a chat command, but you can only add dvars. I can give you the dvars of a filmtweakpreset.
(02-09-2012, 14:52)zxz0O0 Wrote: [ -> ]at you mean. Do you want to add it to forceClientDvars? Ftweakpreset is a chat command, but you can only add dvars. I can give you the dvars of a filmtweakpreset.

Yea wanted to add it to forceclientdvars, would be nice if you could provide dvars needed to do it

(02-09-2012, 15:29)zlol Wrote: [ -> ]
(02-09-2012, 14:52)zxz0O0 Wrote: [ -> ]at you mean. Do you want to add it to forceClientDvars? Ftweakpreset is a chat command, but you can only add dvars. I can give you the dvars of a filmtweakpreset.

Yea wanted to add it to forceclientdvars, would be nice if you could provide dvars needed to do it

Which fimtweakpreset? (1-5)
(02-09-2012, 18:13)zxz0O0 Wrote: [ -> ]
(02-09-2012, 15:29)zlol Wrote: [ -> ]
(02-09-2012, 14:52)zxz0O0 Wrote: [ -> ]at you mean. Do you want to add it to forceClientDvars? Ftweakpreset is a chat command, but you can only add dvars. I can give you the dvars of a filmtweakpreset.

Yea wanted to add it to forceclientdvars, would be nice if you could provide dvars needed to do it

Which fimtweakpreset? (1-5)

1

ftweakpreset 1:
r_filmtweakdarktint "0.65 0.7 0.8",r_filmtweakcontrast "1.3",r_filmtweakbrightness "0.15",r_filmtweakdesaturation "0",r_filmusetweaks "1",r_filmtweaklighttint "1.8 1.8 1.8",r_filmtweakenable "1"

PS: I will upload v1.7 as soon as editing works again.