Raised This Month: $32 Target: $400
 8% 

Surf Spawn Protection


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
xDoctor
Member
Join Date: Jul 2013
Old 06-12-2014 , 06:00   Surf Spawn Protection
Reply With Quote #1

Plugin info :

The plugin gives you protection when you respawned you can choose the time by cvar.


Cvars:

PHP Code:
Spawn Protection Time spawn_time

Spawn Protection Prefix
Your server name ) - spawn_prefix 
Defines:

PHP Code:
#include < amxmodx >
#include < cstrike >
#include < hamsandwich >
#include < fakemeta > 

** the plugin will work only in surf maps **

** All plugin bugs has been fixed !! **

Plugin SMA
Attached Files
File Type: sma Get Plugin or Get Source (SPProtect.sma - 692 views - 2.9 KB)

Last edited by xDoctor; 06-12-2014 at 15:00.
xDoctor is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-12-2014 , 06:04   Re: Surf Spawn Protection
Reply With Quote #2

Quote:
Originally Posted by YamiKaitou View Post
Attach the plugin to the thread.

Don't use fakemeta_util.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
xDoctor
Member
Join Date: Jul 2013
Old 06-12-2014 , 06:06   Re: Surf Spawn Protection
Reply With Quote #3

ok wait ill change for fun

but what the problem with fakemeta util i dont understand ?
xDoctor is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-12-2014 , 06:07   Re: Surf Spawn Protection
Reply With Quote #4

Quote:
Originally Posted by xDoctor View Post
but what the problem with fakemeta util i dont understand ?
Search around and you will learn
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
EthicalHacker007
Veteran Member
Join Date: May 2014
Old 06-12-2014 , 07:07   Re: Surf Spawn Protection
Reply With Quote #5

Already exists.
__________________
EthicalHacker007 is offline
xDoctor
Member
Join Date: Jul 2013
Old 06-12-2014 , 07:24   Re: Surf Spawn Protection
Reply With Quote #6

Quote:
Originally Posted by EthicalHacker007 View Post
Already exists.
really ?

Surf spawn protection

i did a check and didnt found
xDoctor is offline
EthicalHacker007
Veteran Member
Join Date: May 2014
Old 06-12-2014 , 07:57   Re: Surf Spawn Protection
Reply With Quote #7

https://forums.alliedmods.net/showthread.php?t=1886

There are more in requests section.
__________________
EthicalHacker007 is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 06-12-2014 , 08:30   Re: Surf Spawn Protection
Reply With Quote #8

That plugin can be improved, e.g. it uses ResetHUD event.
__________________
Kia is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-12-2014 , 09:31   Re: Surf Spawn Protection
Reply With Quote #9

PHP Code:
 if( containmap"surf_" ) != -)
                
iActive true;
        else
                
iActive false
Simply pause the plugin if you aren't running a surf map. And remove this:
PHP Code:
   if( !iActive )
                return 
1
HamletEagle is offline
xDoctor
Member
Join Date: Jul 2013
Old 06-12-2014 , 10:29   Re: Surf Spawn Protection
Reply With Quote #10

Quote:
Originally Posted by HamletEagle View Post
PHP Code:
 if( containmap"surf_" ) != -)
                
iActive true;
        else
                
iActive false
Simply pause the plugin if you aren't running a surf map. And remove this:
PHP Code:
   if( !iActive )
                return 
1

is this good ?

PHP Code:
/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < hamsandwich >
#include < fun >

#define TASK_ID    1923

enum _iCvars
{
    
PluginRunning,
    
szPrefix,
    
protectTime
}

new 
pCvariCvars ];

new 
szTimer;

public 
plugin_init()
{
    
register_plugin"Spawn Protection ""1.0""Xdoctor" );
    
    new 
map32 ];
    
    
get_mapnamemap31 );
    
    if( 
containmap"surf_" ) != -)
        
get_pcvar_numpCvarPluginRunning ] == )
    else
        
get_pcvar_numpCvarPluginRunning ] == )
        
    if( 
get_pcvar_numpCvarPluginRunning ] ) 
    {
        
RegisterHamHam_Respawn"player""HamClientSpawn" );
    
        
pCvarPluginRunning ] =        register_cvar"spawn_running""1" ); // defualt : 1 || 0 = 0ff / 1 = 0n //    
                
        
pCvarszPrefix ] =         register_cvar"spawn_prefix""Spawn Protection" );
    
        
pCvarprotectTime ] =        register_cvar"spawn_time""10" );
    }
}

public 
HamClientSpawnclient )
{
    
szTimer get_pcvar_numpCvarprotectTime ] );
    
    
set_user_godmodeclient);
    
    
ColorChatclient"Spawn^4 Protection^1 has started for^4 %i Seconds^3 !"szTimer );
    
    
set_task1.0"CmdTask"client TASK_ID_,_"b" );
    
    return 
1;
}

public 
CmdTaskclient )
{
    if( 
szTimer <= )
    {

        
set_user_godmodeclient);
        
        
ColorChatclient"Spawn^4 Protection^1 time in now over^3 !" );
        
        
remove_taskclient TASK_ID );
    }
    
    
set_hudmessage0852550.280.3306.01.0 )
    
    
show_hudmessageclient"You'r spawn protection will be expeird : %i Seconds !"szTimer );
    
    
szTimer -= 1;
    
}

stock ColorChat(const id, const string[], {FloatSqlResul,_}:...)
{
    new 
msg[191], players[32], count 1
    
static len
    len 
formatex(msgcharsmax(msg), "^1[ ^4%s ^1] "get_pcvar_numpCvarszPrefix ] ) )
    
vformat(msg[len], charsmax(msg) - lenstring3)
    if(
id)    players[0] = id
    
else    get_players(players,count,"ch")
    
    for (new 
0counti++)
    {
        if(
is_user_connected(players[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"),_players[i])
            
write_byte(players[i])
            
write_string(msg)
            
message_end()
        }
    }
    
    return 
1;

xDoctor 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 22:08.


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