Raised This Month: $ Target: $400
 0% 

Am i registering logevent "Rescued_A_Hostage" right?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
zacky
Senior Member
Join Date: Mar 2008
Location: Sweden
Old 06-19-2009 , 14:47   Am i registering logevent "Rescued_A_Hostage" right?
Reply With Quote #1

Heres how i register it:
PHP Code:
register_logevent("cmdRescuedHostage"3"1=Rescued_A_Hostage"); 
If its right, here is the code:
PHP Code:
public cmdRescuedHostage() {
    new 
id get_loguser_index();
    
    if (
get_playersnum(1) >= 2) {
        new 
iPoints get_pcvar_num(gCvarRescuedHostagePoints);
        
        
gPlayerPoints[id] += iPoints;
        
ColorChat(idGREEN"%s^x01 You got^x03 %d^x01 points for rescuing a hostage"PREFIXiPoints);
        }
    }

And here is get_loguser_index:
PHP Code:
stock get_loguser_index() {
    new 
loguser[80], name[32];
    
read_logargv(0loguser79);
    
parse_loguser(logusername31);
 
    return 
get_user_index(name);


Last edited by zacky; 06-19-2009 at 14:51.
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 15:38.


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