AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Help] Trigger on specific rounds (https://forums.alliedmods.net/showthread.php?t=249247)

Shiina.Mashiro 10-03-2014 05:20

[Help] Trigger on specific rounds
 
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 ?

RateX 10-03-2014 06:00

Re: [Help] Trigger on specific rounds
 
what is 1st stuff and 2ndstuff? Post the whole code so we know what are you trying to do.

Shiina.Mashiro 10-03-2014 06:03

Re: [Help] Trigger on specific rounds
 
Quote:

Originally Posted by RateX (Post 2206426)
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 :D

Kuma77 10-03-2014 07:06

Re: [Help] Trigger on specific rounds
 
more explane plz !

jimaway 10-03-2014 09:36

Re: [Help] Trigger on specific rounds
 
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     } }

Shiina.Mashiro 10-03-2014 10:03

Re: [Help] Trigger on specific rounds
 
Quote:

Originally Posted by jimaway (Post 2206480)
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

RateX 10-03-2014 11:17

Re: [Help] Trigger on specific rounds
 
Quote:

Originally Posted by RateX (Post 2206426)
what is 1st stuff and 2ndstuff? Post the whole code so we know what are you trying to do.


Shiina.Mashiro 10-04-2014 01:52

Re: [Help] Trigger on specific rounds
 
Quote:

Originally Posted by RateX (Post 2206426)
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 :D

RateX 10-04-2014 04:32

Re: [Help] Trigger on specific rounds
 
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?

Shiina.Mashiro 10-04-2014 05:39

Re: [Help] Trigger on specific rounds
 
Quote:

Originally Posted by RateX (Post 2206859)
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 :D i dont have many times on my PC :D
and start_assasinday is my function. when i start it manually it doesnt have any error, so i dont think the problem is that


All times are GMT -4. The time now is 17:44.

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