Raised This Month: $ Target: $400
 0% 

Logevent issue


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 08-31-2013 , 12:50   Logevent issue
Reply With Quote #1

I need that value[client] is reset every time if round ends, however this does not happen, I'm doing something wrong?

PHP Code:
public plugin_init() 
{
    
register_logevent("logevent_round_end"2"1=Round_End"); // Round end event
}

public 
logevent_round_end(client)
{
    
value[client] = 0;
}

public 
respawnCMD(client)
{
    
value[client] += 1;

Thanks for help.
__________________
My Plugins | VIEW HERE | I accept private requests, send me a PM.
Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
Meet the Medic | Disguise Expert | Crazy Jet

CZSBrasil TEAM
rodrigo286 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-31-2013 , 12:58   Re: Logevent issue
Reply With Quote #2

logevents never pass a player index.

do this :

PHP Code:
    arrayset(value0sizeof(value)) 
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 08-31-2013 , 13:16   Re: Logevent issue
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
logevents never pass a player index.

do this :

PHP Code:
    arrayset(value0sizeof(value)) 
Thanks, it works perfectly !!!

But, is there any way when player index if new round begins?

Thanks.
__________________
My Plugins | VIEW HERE | I accept private requests, send me a PM.
Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
Meet the Medic | Disguise Expert | Crazy Jet

CZSBrasil TEAM

Last edited by rodrigo286; 08-31-2013 at 13:17.
rodrigo286 is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 08-31-2013 , 13:20   Re: Logevent issue
Reply With Quote #4

Use get_players.
__________________
Kia is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-31-2013 , 13:55   Re: Logevent issue
Reply With Quote #5

No way, but if you prefer new round over round end, use following event :

PHP Code:
    register_event("HLTV""Event_HLTV_New_Round""a""1=0""2=0");
}

public 
Event_HLTV_New_Round()
{
    
arrayset(value0sizeof(value))

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 08-31-2013 , 14:08   Re: Logevent issue
Reply With Quote #6

How does arrayset get the players index? o0

// EDIT : I see now that you want to set it for all players, my bad.
__________________

Last edited by Kia; 08-31-2013 at 14:11.
Kia is offline
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 08-31-2013 , 14:25   Re: Logevent issue
Reply With Quote #7

by the way, is there a list that contains all logevents ?
akcaliberg is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 08-31-2013 , 14:30   Re: Logevent issue
Reply With Quote #8

https://www.google.de/url?sa=t&sourc...51495398,d.ZG4
__________________
Kia is offline
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 08-31-2013 , 14:32   Re: Logevent issue
Reply With Quote #9

Quote:
Originally Posted by akcaliberg View Post
by the way, is there a list that contains all logevents ?
nevermind, i think it's not needed at all

Last edited by akcaliberg; 08-31-2013 at 14:33.
akcaliberg is offline
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 08-31-2013 , 14:41   Re: Logevent issue
Reply With Quote #10

Thanks.

This loop also work:

PHP Code:
public plugin_init() 
{
    
register_event("HLTV""LogEvent_RoundStart""a""1=0""2=0"); 
}

public 
LogEvent_RoundStart()
{
    new 
players[32], pnum;
    
get_players(playerspnum);
    for(new 
0pnumi++)
    {
        
value[i] = 0;
    }

Regards.
__________________
My Plugins | VIEW HERE | I accept private requests, send me a PM.
Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
Meet the Medic | Disguise Expert | Crazy Jet

CZSBrasil TEAM

Last edited by rodrigo286; 08-31-2013 at 14:42.
rodrigo286 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 18:48.


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