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

[ALL] Simple 'Move To Spec' plugin


Post New Thread Reply   
 
Thread Tools Display Modes
bebe9b
Veteran Member
Join Date: May 2009
Location: Romania
Old 01-15-2019 , 01:35   Re: [ALL] Simple 'Move To Spec' plugin
Reply With Quote #21

Hi,
I have update last verion sourcemod and include files but compile erorr:
compile\addons\sourcemod\scripting\SendToSpec .sp (16) : erorr 147: new-style declarations are required

Thx,
__________________
respecta si vei fi respectat

Last edited by bebe9b; 01-15-2019 at 01:35.
bebe9b is offline
Cruze
Veteran Member
Join Date: May 2017
Old 01-15-2019 , 03:32   Re: [ALL] Simple 'Move To Spec' plugin
Reply With Quote #22

PHP Code:
#pragma newdecls required 
#pragma semicolon 1

#include <sourcemod> 
#include <sdktools> 
#include <cstrike> 

public Plugin myinfo =  

    
name "Send player to spec"
    
author "Arkarr"
    
description "A simple spectator manager."
    
version "1.0"
    
url "http://www.sourcemod.net" 
}; 

public 
void OnPluginStart() 

    
RegConsoleCmd("sm_spec"Command_Spectator"Send player to spec team."); 
    
RegConsoleCmd("sm_afk"Command_Spectator"Send player to spec team."); 
    
RegAdminCmd("sm_fspec"ForceSendPlayerAFKADMFLAG_GENERIC"sage: sm_fspec <#userid|name>"); 
     
    
LoadTranslations("common.phrases"); 


public 
Action Command_Spectator(int clientint args

    if (
client// commands can be executed by Console (client == 0) 
    

        
SendPlayerToSpectators(client); 
    } 
     
    return 
Plugin_Handled


public 
Action ForceSendPlayerAFK(int clientint args

    if (
args 1
    { 
        
ReplyToCommand(client"[SM] Usage: sm_fspec <#userid|name>"); 
        return 
Plugin_Handled
    } 
     
    
char arg[MAX_TARGET_LENGTH]; 
    
GetCmdArg(1argsizeof(arg)); 
     
    
char target_name[MAX_TARGET_LENGTH]; 
    
int target_list[MAXPLAYERS], target_count
    
bool tn_is_ml
     
    if ((
target_count ProcessTargetString
            
arg
            
client,  
            
target_list,  
            
MAXPLAYERS,  
            
COMMAND_FILTER_CONNECTED
            
target_name
            
sizeof(target_name), 
            
tn_is_ml)) > 0
    { 
        for (
int i 0target_counti++) 
        { 
            
SendPlayerToSpectators(target_list[i]); 
        } 
    } 
    else 
    { 
        
ReplyToTargetError(clienttarget_count); 
    } 
     
    return 
Plugin_Handled


void SendPlayerToSpectators(int client

    if (
GetClientTeam(client) != CS_TEAM_SPECTATOR
    { 
        if (
IsPlayerAlive(client)) 
        { 
            
ForcePlayerSuicide(client); 
        } 
         
        
ChangeClientTeam(clientCS_TEAM_SPECTATOR); 
    } 

__________________
Taking paid private requests! Contact me
Cruze is offline
bebe9b
Veteran Member
Join Date: May 2009
Location: Romania
Old 01-15-2019 , 10:00   Re: [ALL] Simple 'Move To Spec' plugin
Reply With Quote #23

Hi,
Thx man , compile plugin.
__________________
respecta si vei fi respectat
bebe9b is offline
Razvann.
Senior Member
Join Date: Jul 2012
Old 01-28-2019 , 20:37   Re: [ALL] Simple 'Move To Spec' plugin
Reply With Quote #24

Can u add another function (I think is very cool), cvar to check if he stay more then ~5 minutes to kick him from Spec (I know there are similar plugin to do this but are outdated... many errors)?

Last edited by Razvann.; 01-28-2019 at 20:52.
Razvann. is offline
Send a message via Yahoo to Razvann.
bebe9b
Veteran Member
Join Date: May 2009
Location: Romania
Old 05-08-2019 , 22:10   Re: [ALL] Simple 'Move To Spec' plugin
Reply With Quote #25

Hi,
Please, if possible change the plugin :
Disable comand playeri if there are less than 12 players on the server.
sm_spec, Command_Spectator, "Send player to spec team.");
sm_afk, Command_Spectator, "Send player to spec team.");

When there are less than 12 players on the server and someone wants to use the commands! afk and !spec chat message appears.
You can not use the command yet

Thx,
__________________
respecta si vei fi respectat

Last edited by bebe9b; 05-12-2019 at 04:33.
bebe9b is offline
Cruze
Veteran Member
Join Date: May 2017
Old 05-12-2019 , 05:04   Re: [ALL] Simple 'Move To Spec' plugin
Reply With Quote #26

Quote:
Originally Posted by bebe9b View Post
Hi,
Please, if possible change the plugin :
Disable comand playeri if there are less than 12 players on the server.
sm_spec, Command_Spectator, "Send player to spec team.");
sm_afk, Command_Spectator, "Send player to spec team.");

When there are less than 12 players on the server and someone wants to use the commands! afk and !spec chat message appears.
You can not use the command yet

Thx,
PHP Code:
#pragma newdecls required 
#pragma semicolon 1

#include <sourcemod> 
#include <sdktools> 
#include <cstrike> 

public Plugin myinfo =  

    
name "Send player to spec"
    
author "Arkarr"
    
description "A simple spectator manager."
    
version "1.0"
    
url "http://www.sourcemod.net" 
}; 

public 
void OnPluginStart() 

    
RegConsoleCmd("sm_spec"Command_Spectator"Send player to spec team."); 
    
RegConsoleCmd("sm_afk"Command_Spectator"Send player to spec team."); 
    
RegAdminCmd("sm_fspec"ForceSendPlayerAFKADMFLAG_GENERIC"sage: sm_fspec <#userid|name>"); 
     
    
LoadTranslations("common.phrases"); 


public 
Action Command_Spectator(int clientint args

    if (
client// commands can be executed by Console (client == 0) 
    

        if(
GetClientCount() >= 12)
        {
            
SendPlayerToSpectators(client);
        }
        else
        {
            
PrintToChat(client"[SM] You cannot use the command yet.");
        }
    } 
    return 
Plugin_Handled


public 
Action ForceSendPlayerAFK(int clientint args

    if (
args 1
    { 
        
ReplyToCommand(client"[SM] Usage: sm_fspec <#userid|name>"); 
        return 
Plugin_Handled
    } 
     
    
char arg[MAX_TARGET_LENGTH]; 
    
GetCmdArg(1argsizeof(arg)); 
     
    
char target_name[MAX_TARGET_LENGTH]; 
    
int target_list[MAXPLAYERS], target_count
    
bool tn_is_ml
     
    if ((
target_count ProcessTargetString
            
arg
            
client,  
            
target_list,  
            
MAXPLAYERS,  
            
COMMAND_FILTER_CONNECTED
            
target_name
            
sizeof(target_name), 
            
tn_is_ml)) > 0
    { 
        for (
int i 0target_counti++) 
        { 
            
SendPlayerToSpectators(target_list[i]); 
        } 
    } 
    else 
    { 
        
ReplyToTargetError(clienttarget_count); 
    } 
     
    return 
Plugin_Handled


void SendPlayerToSpectators(int client

    if (
GetClientTeam(client) != CS_TEAM_SPECTATOR
    { 
        if (
IsPlayerAlive(client)) 
        { 
            
ForcePlayerSuicide(client); 
        } 
         
        
ChangeClientTeam(clientCS_TEAM_SPECTATOR); 
    } 

__________________
Taking paid private requests! Contact me
Cruze is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 05-12-2019 , 05:09   Re: [ALL] Simple 'Move To Spec' plugin
Reply With Quote #27

Quote:
Originally Posted by Razvann. View Post
Can u add another function (I think is very cool), cvar to check if he stay more then ~5 minutes to kick him from Spec (I know there are similar plugin to do this but are outdated... many errors)?
Yeah, but like, kick it from the server? Or put it back in a team ?

@Cruze
thanks
__________________
Want to check my plugins ?

Last edited by Arkarr; 05-12-2019 at 05:09.
Arkarr is offline
bebe9b
Veteran Member
Join Date: May 2009
Location: Romania
Old 05-12-2019 , 12:11   Re: [ALL] Simple 'Move To Spec' plugin
Reply With Quote #28

Thx man
__________________
respecta si vei fi respectat
bebe9b is offline
bebe9b
Veteran Member
Join Date: May 2009
Location: Romania
Old 05-22-2019 , 05:38   Re: [ALL] Simple 'Move To Spec' plugin
Reply With Quote #29

Hi,
Pls disable comand !spec.

Thx,
__________________
respecta si vei fi respectat
bebe9b is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 05-22-2019 , 06:43   Re: [ALL] Simple 'Move To Spec' plugin
Reply With Quote #30

Quote:
Originally Posted by bebe9b View Post
Hi,
Pls disable comand !spec.

Thx,

Remove line :

PHP Code:
RegConsoleCmd("sm_spec"Command_Spectator"Send player to spec team."); 
And recompile !
__________________
Want to check my plugins ?
Arkarr is offline
Reply



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 13:45.


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