Raised This Month: $ Target: $400
 0% 

revive any player saying /revive


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
zacky
Senior Member
Join Date: Mar 2008
Location: Sweden
Old 06-05-2009 , 09:52   Re: revive any player saying /revive
Reply With Quote #6

haha, i thought you meant revive another player ^^

Well, if you want to respawn another player use this:
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say""cmdHookSay");
}

public 
cmdHookSay(id) {
    new 
iArgs[38], iArg1[6], iArg2[33];
    
read_argsiArgs37 );
    
remove_quotesiArgs );
    
    if( 
containi(iArgs"revive") == -&& iArgs[0] != '/' )
        return 
PLUGIN_CONTINUE;
    
    
parseiArgsiArg15iArg232 );
    
    if( 
equali(iArg1"/revive"5) && get_user_flags(id) & ADMIN_CHAT ) {
        new 
iPlayer cmd_targetidiArg2);
            
        if( 
iPlayer ) {
            if (!
is_user_alive(iPlayer) && cs_get_user_team(id) != CS_TEAM_SPECTATOR ) {
                new 
szAdminName[32], szPlayerName[32];
                
                
get_user_name(idszAdminName31);
                
get_user_name(iPlayerszPlayerName31);
                
                
ExecuteHam(Ham_CS_RoundRespawnid);
                
client_print(iPlayerprint_chat"ADMIN %s revived you"szAdminName);
                
client_print(idprint_chat"You revived %s"szPlayerName);
            }
        }
        else if( !
equal(iArg2"") )
            
client_print(idprint_chat"Failed to find player named %s."iArg2);
        else if( 
equal(iArg2"") )
            
client_print(idprint_chat"Usage: /revive <nick>");
    }
    
    return 
PLUGIN_CONTINUE;

Usage:
Say in chat: /revive name

Last edited by zacky; 06-05-2009 at 09:57.
zacky is offline
Send a message via Skype™ to zacky
 



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 14:02.


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