AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Am i registering logevent "Rescued_A_Hostage" right? (https://forums.alliedmods.net/showthread.php?t=95107)

zacky 06-19-2009 14:47

Am i registering logevent "Rescued_A_Hostage" right?
 
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);



Arkshine 06-19-2009 16:07

Re: Am i registering logevent "Rescued_A_Hostage" right?
 
Why don't try yourself before posting there?

zacky 06-19-2009 16:37

Re: Am i registering logevent "Rescued_A_Hostage" right?
 
I have but it didn't work.

Arkshine 06-19-2009 16:41

Re: Am i registering logevent "Rescued_A_Hostage" right?
 
register_logevent("cmdRescuedHostage", 3, "1=triggered", "2=Rescued_A_Hostage");

zacky 06-19-2009 17:34

Re: Am i registering logevent "Rescued_A_Hostage" right?
 
Quote:

Originally Posted by arkshine (Post 852540)
register_logevent("cmdRescuedHostage", 3, "1=triggered", "2=Rescued_A_Hostage");

Thanks, will try.

EDIT: It works, thanks.


All times are GMT -4. The time now is 15:38.

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