Raised This Month: $ Target: $400
 0% 

[Problema] codigo Respawn e InfiniteRound


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
sniejder
Member
Join Date: Feb 2011
Old 03-02-2011 , 15:50   Re: [Problema] codigo Respawn e InfiniteRound
#16

Quote:
Originally Posted by gladius View Post
prueba así, este método es sin reiniciar el mapa.

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

#define IsPlayer(%1)    (1 <= %1 <= g_MaxPlayers) 

new g_MaxPlayers;

new 
g_pcvarRespawn

public plugin_init()  
{     
    
register_plugin("I""KILL""YOU");
    
    
g_MaxPlayers get_maxplayers() ;
    
    
register_event("TeamInfo""Event_TeamInfo""a"); 
    
    
RegisterHam(Ham_Killed"player""Ham_Fwd_Player_Killed_Post"true); 
    
    
g_pcvarRespawn register_cvar("sv_respawn""1"); 


public 
Event_TeamInfo()  

    if(
get_pcvar_num(g_pcvarRespawn) == 0)
    {
        return 
PLUGIN_CONTINUE;
    }
    
    static 
userteam[2]; 
    
user read_data(1); 
    
read_data(2team1); 
    
    switch (
team[0])  
    { 
        case 
'C''T':  
        { 
            
set_task(0.5"PlayerRespawn_Task"user); 
        } 
    }
    
    return 
PLUGIN_HANDLED;


public 
Ham_Fwd_Player_Killed_Post(victimkillerBodyHit
{     
    if(
get_pcvar_num(g_pcvarRespawn) == || !(IsPlayer(killer)))
    {
        return 
HAM_IGNORED;
    }
    
    
set_task(0.5"PlayerRespawn_Task"victim); 
    
    return 
HAM_SUPERCEDE


public 
PlayerRespawn_Task(user

    if(!
is_user_alive(user)) 
    { 
        
ExecuteHamB(Ham_CS_RoundRespawnuser); 
    }

Exelente Gladius (y) Muchas Gracias
__________________
SneijdeR cs 1.6

[IMG]http://img7.**************/img7/9841/basicrepository3dabstra.jpg[/IMG]

[IMG]http://img40.**************/img40/920/fondofinalag6.jpg[/IMG]



I'AM FAN MOD PUG
sniejder is offline
 



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 01:15.


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