Raised This Month: $ Target: $400
 0% 

[Help] Trigger on specific rounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 10-03-2014 , 05:20   [Help] Trigger on specific rounds
Reply With Quote #1

hi guys, here is my code:
PHP Code:
new g_Round
public Event_NewRound()
{
    
g_Round g_Round 1
    
new k
    
for(010k++)
    {
        if(
5*== g_Round)
        {
             
//1ststuff
        
}
        if((
5*k+== g_Round) && (0))
        {
             
//2ndstuff
        
}
    }

the problem is, the 1st stuff didn't work at round 5/10/15/... but the 2ndstuff still works at round 6/11/16/...
can anyone help me with this ?
__________________
Shiina.Mashiro is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 10-03-2014 , 06:00   Re: [Help] Trigger on specific rounds
Reply With Quote #2

what is 1st stuff and 2ndstuff? Post the whole code so we know what are you trying to do.

Last edited by RateX; 10-03-2014 at 09:44.
RateX is offline
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 10-03-2014 , 06:03   Re: [Help] Trigger on specific rounds
Reply With Quote #3

Quote:
Originally Posted by RateX View Post
what is 1st stuff and 2ndstuff? Post the whole code do we know are you trying to do.
wait me, im not at my pc right now, i'll reply when i get back home
__________________
Shiina.Mashiro is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 10-03-2014 , 11:17   Re: [Help] Trigger on specific rounds
Reply With Quote #4

Quote:
Originally Posted by RateX View Post
what is 1st stuff and 2ndstuff? Post the whole code so we know what are you trying to do.
RateX is offline
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 10-04-2014 , 01:52   Re: [Help] Trigger on specific rounds
Reply With Quote #5

Quote:
Originally Posted by RateX View Post
what is 1st stuff and 2ndstuff? Post the whole code so we know what are you trying to do.
i posted it in my last reply
__________________
Shiina.Mashiro is offline
Kuma77
Senior Member
Join Date: Sep 2014
Location: Behind PC
Old 10-03-2014 , 07:06   Re: [Help] Trigger on specific rounds
Reply With Quote #6

more explane plz !
__________________
SPACE TIME
Kuma77 is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 10-03-2014 , 09:36   Re: [Help] Trigger on specific rounds
Reply With Quote #7

dont use for loop for that, use moduo

Code:
new g_Round public Event_NewRound() {     g_Round++     if (g_Round % 5 == 0)     {         //1ststuff     }     if(g_Round % 5 == 1 && g_Round > 1)     {         //2ndstuff     } }
jimaway is offline
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 10-03-2014 , 10:03   Re: [Help] Trigger on specific rounds
Reply With Quote #8

Quote:
Originally Posted by jimaway View Post
dont use for loop for that, use moduo

Code:
new g_Round public Event_NewRound() { g_Round++ if (g_Round % 5 == 0) { //1ststuff } if(g_Round % 5 == 1 && g_Round > 1) { //2ndstuff } }
i tried your way
PHP Code:
if(g_Round == 0)
    {
        for(new 
1g_MaxPlayersi++)
        {
            
g_Team[i] = cs_get_user_team(i)
        }
        
start_assasinday()
        
client_print(0print_chat"this round is assasinday")
    }
    if((
g_Round == 1) && (g_Round 1))
    {
        for(new 
1g_MaxPlayersi++)
        {
            
cs_set_user_team(ig_Team[i])
        }
        
client_print(0print_chat"reset player team")
    } 
and it still doesn't work the 1st stuff and the 2nd still works fine ...
im pretty sure the problem is not start_assasinday because it has no problem when i start it manually
__________________
Shiina.Mashiro is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 10-04-2014 , 04:32   Re: [Help] Trigger on specific rounds
Reply With Quote #9

PHP Code:
start_assasinday() 
We're still have no idea what the hell is this. It might the source of your problem.
BTW, why did you have to wait untill this noon to post?
RateX is offline
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 10-04-2014 , 05:39   Re: [Help] Trigger on specific rounds
Reply With Quote #10

Quote:
Originally Posted by RateX View Post
PHP Code:
start_assasinday() 
We're still have no idea what the hell is this. It might the source of your problem.
BTW, why did you have to wait untill this noon to post?
sry for being late i dont have many times on my PC
and start_assasinday is my function. when i start it manually it doesnt have any error, so i dont think the problem is that
__________________
Shiina.Mashiro 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 17:44.


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