Raised This Month: $12 Target: $400
 3% 

Plugin to move all VIPs/Admins with flag "a" to T and everyone else to CT


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TrappaTroopa
Senior Member
Join Date: Feb 2016
Old 02-12-2019 , 15:01   Plugin to move all VIPs/Admins with flag "a" to T and everyone else to CT
Reply With Quote #1

This plugin would need to have support for fluffyst's surftimer. It already has a convar to move everyone to CT or evenly split players to CT/T.

But I want a plugin to override this behavior and move all VIPs/Admins with flag "a" to T and everyone else to CT.

Thanks!
__________________
My CSGO Community! Come Say Hi! We keep things chill and toxicity is not welcome and dealt with:

http://csgosurfing.com
TrappaTroopa is offline
Pilo
AlliedModders Donor
Join Date: Jan 2019
Location: Israel
Old 02-14-2019 , 08:30   Re: Plugin to move all VIPs/Admins with flag "a" to T and everyone else to CT
Reply With Quote #2

You can try this
Commands :
sm_event (console)
/event (In chat)
!event (in chat)

Access : Only ADMFLAG_GENERIC, only admins..
Feel free to change anything you want to.
And tell me if it works to you !
Attached Files
File Type: sp Get Plugin or Get Source (adminsT.sp - 90 views - 913 Bytes)
File Type: smx adminsT.smx (4.6 KB, 24 views)
Pilo is offline
CliptonHeist
Senior Member
Join Date: Feb 2016
Old 02-14-2019 , 16:52   Re: Plugin to move all VIPs/Admins with flag "a" to T and everyone else to CT
Reply With Quote #3

Fixed version
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>

#define PREFIX "[SM]"

public Plugin myinfo 
{
    
name "Admins T Clients CT",
    
author "Pilo",
    
description "Move all the normal players to CT and Admins/Vip's to T'",
    
version "1.0",
    
url "https://forums.gamers-israel.co.il/member.php?u=33"
};

public 
void OnPluginStart()
{    
    
RegAdminCmd("sm_event"Command_EventADMFLAG_GENERIC"");
}

public 
Action Command_Event (int clientint args)
{
    for (
int i 1<= MaxClientsi++)
    {
        if(!
IsValidClient(i)) continue;

        if (
CheckCommandAccess(i"sm_null_command"ADMFLAG_RESERVATIONtrue))
            
CS_SwitchTeam(iCS_TEAM_T)
        else
            
CS_SwitchTeam(iCS_TEAM_CT);
    }

    if(
IsValidClient(client))
        
PrintToChatAll("%s \x02%N \x01 moved all players to CT and Admins to T! \x05Have Fun! \x01"PREFIXclient);
    else
        
PrintToChatAll("%s Moved all players to CT and Admins to T! \x05Have Fun! \x01"PREFIX);

    return 
Plugin_Handled;
}

stock bool IsValidClient(int client)
{
    return 
IsClientInGame(client) &&
    !
IsFakeClient(client);

CliptonHeist is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode