Raised This Month: $ Target: $400
 0% 

[help] Kill counting problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
WeeD1986
New Member
Join Date: Nov 2011
Old 11-29-2011 , 07:15   [help] Kill counting problem
Reply With Quote #1

Hi... I am new to pawn and I have a little problem. The function should take a picture to a blinded player after the 3rd frag done while he was blinded. The thing is that it does not work. Can somebody help me?

PHP Code:
new bool:g_bBlind[33]
new 
gFrags33 ];

public 
hook_death()
{
new 
killer read_data(1);
gFragskiller ]++;

new 
numeserver [64], numeadmin[32],  numeblindat[32], ipcodat [32], admini[33], inummessage[552]


get_user_name(admin[killer], numeadmin31)
get_user_name(killernumeblindat31)
get_user_ip(killeripcodat311)
get_cvar_string("hostname",numeserver,63)

if(
g_bBlind[killer])
{
if (
gFragskiller ] == 3){
    for (new 
0inum; ++i)
    {
        if ( 
access(admini[i],ADMIN_CHAT) )
        {
            
client_print(admini[i],print_chat,"Jucatorul %s a facut 3 fraguri dupa blind-ul dat de %s",killer,admin[killer])
        }
             
        
client_print(killerprint_chat"* Poza facuta pe : %s",numeserver
        
client_print(killerprint_chat"* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat
        
client_print(killerprint_chat"* Nume admin: ^"%s^"",numeadmin)
        
client_print(killerprint_chat"* Viziteaza %s pentru a face o cerere de UNBAN."poza
        
        
client_cmd(killer,"wait;snapshot"

Last edited by WeeD1986; 11-29-2011 at 07:19.
WeeD1986 is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 11-29-2011 , 08:45   Re: [help] Kill counting problem
Reply With Quote #2

try this one [not sure but should work]

PHP Code:

new bool:g_bBlind[33]
new 
gFrags33 ];

public 
hook_death()
{
    new 
killer read_data(1);
    
    if( 
g_bBlind[killer] == true )
    {
        if( ++
gFragskiller ] >= )
        {
            new 
numeserver [64], numeadmin[32],  numeblindat[32], ipcodat [32], admini[33], inummessage[552]
            
            
get_user_name(admin[killer], numeadmincharsmax(numeadmin))
            
get_user_name(killernumeblindatcharsmax(numeblindat))
            
get_user_ip(killeripcodatcharsmax(ipcodat), 1)
            
get_cvar_string("hostname",numeserver,63)
            
            for (new 
0inum; ++i)
            {
                if( 
access(admini[i],ADMIN_CHAT) )
                {
                    
client_print(admini[i],print_chat,"Jucatorul %s a facut 3 fraguri dupa blind-ul dat de %s",killer,admin[killer])
                }
            }
            
            
client_print(killerprint_chat"* Poza facuta pe : %s",numeserver
            
client_print(killerprint_chat"* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat
            
client_print(killerprint_chat"* Nume admin: ^"%s^"",numeadmin)
            
client_print(killerprint_chat"* Viziteaza %s pentru a face o cerere de UNBAN."poza
                
            
client_cmd(killer,"wait;snapshot");
        }
    }

__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 11-29-2011 , 09:14   Re: [help] Kill counting problem
Reply With Quote #3

You can't make sure a player is blind until he did three kills. Maybe other screen fade will overwrite the currently set one. Or maybe the ResetHUD event.

The screen fades for Half-Life 1 games has other purposes. Don't use them for check the players for hacking.
__________________

Last edited by claudiuhks; 11-29-2011 at 09:16.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 11-29-2011 , 11:24   Re: [help] Kill counting problem
Reply With Quote #4

Quote:
Originally Posted by claudiuhks View Post
You can't make sure a player is blind until he did three kills. Maybe other screen fade will overwrite the currently set one. Or maybe the ResetHUD event.

The screen fades for Half-Life 1 games has other purposes. Don't use them for check the players for hacking.

if it's set to FFADE_MODULATE the screenfade isn't replaced by other screenfade messages, and you see in the code it's a global variable and it's checked when player used blind command, i'm pretty sure this will work 70%

and with that variable, you can set it to true, on player spawn, or resethud, until you execute unblind on player and set it to false
i'm trying to help
__________________

Last edited by tuty; 11-29-2011 at 11:26.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
WeeD1986
New Member
Join Date: Nov 2011
Old 11-29-2011 , 13:28   Re: [help] Kill counting problem
Reply With Quote #5

Thank you tuty for helping me! The plugin works great. Glad you're back
WeeD1986 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 08:33.


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