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 , 01:24   Re: [Problema] codigo Respawn e InfiniteRound
#9

Quote:
Originally Posted by gladius View Post
Reemplaza tu code de respawn por este y prueba

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

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

new g_MaxPlayers

public plugin_init() 
{    
    
g_MaxPlayers get_maxplayers()
    
    
register_event("TeamInfo""Event_TeamInfo""a");
    
    
RegisterHam(Ham_Killed"player""Ham_Fwd_Player_Killed_Post"true);
}

public 
Event_TeamInfo() 
{
    static 
userteam[2];
    
user read_data(1);
    
read_data(2team1);
    
    switch (
team[0]) 
    {
        case 
'C''T'
        {
            
set_task(1.0"PlayerRespawn_Task"user);
        }
    }
}

public 
Ham_Fwd_Player_Killed_Post(victimkillerBodyHit)
{            
    if(!(
IsPlayer(killer)))
    {
        return 
HAM_IGNORED;
    }
    
    
set_task(2.0"PlayerRespawn_Task"victim);
    
    return 
HAM_SUPERCEDE;
}

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

Funciona perfecto tal cual como lo queria, pero podrias agregarle un cvars? y el tiempo de respawn se puede poner menor a 1 seg?
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