Raised This Month: $ Target: $400
 0% 

[Req] /Spec switch for admins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yOou Know Me
BANNED
Join Date: Oct 2009
Old 12-27-2011 , 06:44   [Req] /Spec switch for admins
Reply With Quote #1

I need plugin for admins, when they type "/spec" to be transfered to spectators and when they type "/back" to be transfered to the team they were at the first place.

This plugin is almost what i need https://forums.alliedmods.net/showthread.php?t=64340
But it's unnaproved and when it turns you back you are alive.. you must be dead and wait a new round always..
yOou Know Me is offline
Levels
Member
Join Date: Dec 2011
Old 12-27-2011 , 07:10   Re: [Req] /Spec switch for admins
Reply With Quote #2

He Should works fine.


PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fakemeta_util >
#include < hamsandwich >

new bool:userspec33 ]

public 
plugin_init( ) {
    
register_plugin"Spec Admin""0.2""Levels" // :D 
    
    
register_clcmd"/spec""ActionSpec" )
    
register_clcmd"/back""ActionBack" )
}

public 
client_putinserverid )
{
    
userspecid ] = false

public ActionSpecid ) {
    if( 
is_user_adminid ) )
    {
        
cs_set_user_teamidCS_TEAM_SPECTATOR )
        
userspecid ] = true
    
} else {
        
console_printid"You Already in the Spectator Team." )
    }
}

public 
ActionBackid ) {
    if( 
userspecid ] && is_user_adminid )
    {
        
set_task1.0"Respawn" )
        
userspecid ] = false
    
}
}

public 
Respawnid )
{
    
ExecuteHamB(Ham_CS_RoundRespawnid)
    if( 
cs_get_user_teamid ) == CS_TEAM_T )
    {
        
fm_strip_user_weaponsid )
        
fm_give_itemid"weapon_knife" )
        
fm_give_itemid"weapon_glock18" )
        
        
cs_set_user_bpammoidCSW_GLOCK1840 )
    }
    if( 
cs_get_user_teamid ) == CS_TEAM_CT )
    {
        
fm_strip_user_weaponsid )
        
fm_give_itemid"weapon_knife" )
        
fm_give_itemid"weapon_usp" )
        
        
cs_set_user_bpammoidCSW_USP24 )
    }


Last edited by Levels; 12-27-2011 at 07:21.
Levels is offline
yOou Know Me
BANNED
Join Date: Oct 2009
Old 12-28-2011 , 02:19   Re: [Req] /Spec switch for admins
Reply With Quote #3

I get error, when i try to compile.
Attached Thumbnails
Click image for larger version

Name:	sdasdsd.JPG
Views:	214
Size:	74.0 KB
ID:	97385  
yOou Know Me is offline
yOou Know Me
BANNED
Join Date: Oct 2009
Old 12-30-2011 , 08:36   Re: [Req] /Spec switch for admins
Reply With Quote #4

Anyone ?
yOou Know Me is offline
Levels
Member
Join Date: Dec 2011
Old 12-30-2011 , 17:35   Re: [Req] /Spec switch for admins
Reply With Quote #5

can't be for me it complie without erors or warnings
Levels is offline
pacheco
Senior Member
Join Date: Jul 2011
Old 12-30-2011 , 18:03   Re: [Req] /Spec switch for admins
Reply With Quote #6

PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fakemeta_util >
#include < hamsandwich >

new bool:userspec33 ]

public 
plugin_init( ) {
    
register_plugin"Spec Admin""0.2""Levels" // :D 
    
    
register_clcmd"/spec""ActionSpec" )
    
register_clcmd"/back""ActionBack" )
}

public 
client_putinserverid )
{
    
userspecid ] = false
}

public 
ActionSpecid ) {
    if( 
is_user_adminid ) )
    {
        
cs_set_user_teamidCS_TEAM_SPECTATOR )
        
userspecid ] = true
    
} else {
        
console_printid"You Already in the Spectator Team." )
    }
}

public 
ActionBackid )
{
    if( 
userspecid ] && is_user_adminid ))
    {
        
set_task1.0"Respawn" )
        
userspecid ] = false
    
}
}

public 
Respawnid )
{
    
ExecuteHamB(Ham_CS_RoundRespawnid)
    if( 
cs_get_user_teamid ) == CS_TEAM_T )
    {
        
fm_strip_user_weaponsid )
        
fm_give_itemid"weapon_knife" )
        
fm_give_itemid"weapon_glock18" )
        
        
cs_set_user_bpammoidCSW_GLOCK1840 )
    }
    if( 
cs_get_user_teamid ) == CS_TEAM_CT )
    {
        
fm_strip_user_weaponsid )
        
fm_give_itemid"weapon_knife" )
        
fm_give_itemid"weapon_usp" )
        
        
cs_set_user_bpammoidCSW_USP24 )
    }

__________________



pacheco is offline
yOou Know Me
BANNED
Join Date: Oct 2009
Old 01-02-2012 , 05:48   Re: [Req] /Spec switch for admins
Reply With Quote #7

This time i compiled it, when i type "amx_plugins" in the console i can see that the plugin is running, but when i type "/spec" in the say chat nothing happens..

Last edited by yOou Know Me; 01-02-2012 at 05:51.
yOou Know Me is offline
pacheco
Senior Member
Join Date: Jul 2011
Old 01-02-2012 , 09:35   Re: [Req] /Spec switch for admins
Reply With Quote #8

Do you see it????
PHP Code:
    register_clcmd"/spec""ActionSpec" )
    
register_clcmd"/back""ActionBack" 
Commands in console.
For say:

PHP Code:
    register_clcmd"say /spec""ActionSpec" )
    
register_clcmd"say /back""ActionBack" 

__________________




Last edited by pacheco; 01-02-2012 at 09:35.
pacheco is offline
yOou Know Me
BANNED
Join Date: Oct 2009
Old 01-02-2012 , 10:30   Re: [Req] /Spec switch for admins
Reply With Quote #9

This plugin has many bugs. I tried it in the console but there are many bugs..
1. When i'm alive when i type /spec i'm still in play but my nick goes to Spectators and my Radar is gone.. cuz the game thinks i'm spectator..
2. The next round i'm spectator.. when i type /back i don't get back i'm still spectator even the next round. This plugin is so wrong.. can you look at the code ?
yOou Know Me is offline
Old 01-02-2012, 10:44
kramesa
This message has been deleted by kramesa.
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 00:28.


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