Raised This Month: $51 Target: $400
 12% 

Kill Humans in round end


Post New Thread Reply   
 
Thread Tools Display Modes
TheRunningMan
Member
Join Date: Aug 2011
Location: Russia
Old 10-09-2011 , 08:26   Re: Kill Humans in round end
Reply With Quote #21

Спасибо за помощь все отлично работает, можешь объяснить что делает данный блок?
TheRunningMan is offline
maza51
Senior Member
Join Date: Mar 2010
Old 10-09-2011 , 09:02   Re: Kill Humans in round end
Reply With Quote #22

закрывает handle если открыт
maza51 is offline
TheRunningMan
Member
Join Date: Aug 2011
Location: Russia
Old 10-09-2011 , 21:29   Re: Kill Humans in round end
Reply With Quote #23

Блин, рано начал радоваться...
Почему-то иногда он уивает и людей и зомби, а может убить всех людей и часть зомбей.....не понимаю как так...
TheRunningMan is offline
maza51
Senior Member
Join Date: Mar 2010
Old 10-09-2011 , 23:56   Re: Kill Humans in round end
Reply With Quote #24

Я к сожалению не знаю нативы зомби мода. Поищи во включениях (include) какие там нативы проверяют ложность зомби.
Или может потому, что в конце раунда составы меняются там? Или там не меняются?
maza51 is offline
TheRunningMan
Member
Join Date: Aug 2011
Location: Russia
Old 10-10-2011 , 06:52   Re: Kill Humans in round end
Reply With Quote #25

ZR_IsClientZombie(client) Типо игрок зомби

Что значит составы?
Если про командаы, то да ты можешь быть иногда КТ иногда ТР, но все вместе это люди....

Вот например:
Играю я с ботами 4(вместе со мной КТ) и 4 ТР, если я себя выберу зомбом первым и единственным, то все нормально убивает всех людей, если же наоборот то убивает и меня и всех зомбов....
Если я остаюсь в живых и со мной еще один бот, то умерают все...
Если же остаюсь я и еще ДВА бота то все нормально, причем боты из разных команд судя по скинам....
Если за людей остается один бот, то все нормально, также как если останется два....

Last edited by TheRunningMan; 10-10-2011 at 09:13.
TheRunningMan is offline
TheRunningMan
Member
Join Date: Aug 2011
Location: Russia
Old 10-11-2011 , 05:13   Re: Kill Humans in round end
Reply With Quote #26

PHP Code:
#pragma semicolon 1

#include <zombiereloaded>   
#include <sdkhooks>   
#include <sdktools>   
#include <sourcemod>   


new Handle:t_timer INVALID_HANDLE;   
new 
Float:g_cvarRoundTime
new 
Float:ForTimer;   
       
public 
OnPluginStart()   
{   
    
HookEvent("round_freeze_end"RoundTime);   
}   
public 
OnMapStart()   

    
g_cvarRoundTime GetConVarFloat(FindConVar("mp_roundtime"));   

    
ForTimer = (g_cvarRoundTime*60 3); 
}   

public 
Action:RoundTime(Handle:event, const String:name[], bool:dontBroadcast)   
{  
    for(new 
Client 1Client <= MaxClientsClient++)  
    {  
        if (
IsClientInGame(Client)) 
        { 
            if (
ZR_IsClientHuman(Client) && IsPlayerAlive(Client))   
            {   
                
PrintToChat(Client"Round start: %0.2f"g_cvarRoundTime);   
            }  
        } 
    }  
      
    if (
t_timer != INVALID_HANDLE) { 
        
KillTimer(t_timer); 
        
t_timer INVALID_HANDLE
    }
     
    
t_timer CreateTimer(ForTimerkiller);  
}   

public 
Actionkiller(Handle:timer)   
{           
    for(new 
Client 1Client <= MaxClientsClient++)    
    {    
        if (
IsClientInGame(Client)) 
        { 
            if (
ZR_IsClientHuman(Client) && IsPlayerAlive(Client))   
            {   
                
//SetEntityHealth(Client, 1);   
                //SlapPlayer(Client, 1, false)   
                
ForcePlayerSuicide(Client);
            }   
        } 
    }  
    
    if (
t_timer != INVALID_HANDLE) { 
        
KillTimer(t_timer); 
        
t_timer INVALID_HANDLE
    } 
    return 
Plugin_Handled;   
}   

public 
OnPluginEnd()    
{   
    
UnhookEvent("round_freeze_end"RoundTime);   

Why plugin sometimes ignores these conditions?
PHP Code:
public Actionkiller(Handle:timer)    
{            
    for(new 
Client 1Client <= MaxClientsClient++)     
    {     
        if (
IsClientInGame(Client))  
        {  
            if (
ZR_IsClientHuman(Client) && IsPlayerAlive(Client))    
            { 
And kill zombies ....

Last edited by TheRunningMan; 10-11-2011 at 05:17.
TheRunningMan is offline
Reply



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 13:52.


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