Raised This Month: $ Target: $400
 0% 

[SOLVED]+1/sec.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 06-17-2009 , 04:29   [SOLVED]+1/sec.
Reply With Quote #1

new my_number
my_number get per sec. +1 or +x..

dont wanna use task.

if this & this
set my_function +my_number
else my_function = xx
__________________

Last edited by One; 06-18-2009 at 07:31.
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 06-17-2009 , 05:46   Re: +1/sec.
Reply With Quote #2

SOLVED. SRY.
new g_speed_time 90
g_speed_time = g_speed_time + 1

if(g_speed_time >= 90 && g_speed_time <= 120)
{
set_vision(id, g_speed_time)
}
}
else
{
if(g_speed_time >= 120)
{
g_speed_time = 120
}
if(g_speed_time >= 90 && g_speed_time <= 400)
{
g_speed_time = g_speed_time -1
set_vision(id,g_speed_time)
}
__________________

Last edited by One; 06-17-2009 at 06:02.
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 06-17-2009 , 20:50   Re: +1/sec.
Reply With Quote #3

PHP Code:
new g_speed_time 90

public something(id)
{

    if(
g_speed_time >= 90 && g_speed_time <= 120)
    {
        
set_vision(idg_speed_time)
    }
    else
    {
        if(
g_speed_time 120)
        {
            
g_speed_time++
        }
        else
        {
            
g_speed_time--
            
set_vision(id,g_speed_time)
        }
    }

__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!

Last edited by biscuit628; 06-17-2009 at 21:01.
biscuit628 is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 06-17-2009 , 21:00   Re: +1/sec.
Reply With Quote #4

PHP Code:
if(g_speed_time >= 90 && g_speed_time <= 120
->

PHP Code:
if (90 <= g_speed_time <= 120
__________________
IneedHelp is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 06-18-2009 , 02:44   Re: +1/sec.
Reply With Quote #5

Hmmm :-?? i got it so.

im to lame to change this. but if is there anything better, ill change any ideas?

PHP Code:
public fwdCmdStart(idiHandle)
{
    
    if (
something)
    {
        
g_speed_time g_speed_time 1
        
        
        
if(g_speed_time >= 90 && g_speed_time <= 120)
        {
            
set_vision(idg_speed_time)
        }
    
    }
         else
    {        
        if(
g_speed_time >= 120)
        {
            
g_speed_time 120
        
}
        if(
g_speed_time >= 90 && g_speed_time <= 400)
        {
            
g_speed_time g_speed_time -2
            set_vision
(id,g_speed_time)
        }
    }

edit : & this works perfectly.but the performance is imp.
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 06-18-2009 , 05:06   Re: +1/sec.
Reply With Quote #6

What are you trying to do? I don't see why this would work.
[ --<-@ ] Black Rose is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 06-18-2009 , 05:10   Re: +1/sec.
Reply With Quote #7

in demo ull see what i did
Attached Files
File Type: zip 1.zip (124.6 KB, 63 views)
__________________

Last edited by One; 06-18-2009 at 05:38.
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 06-18-2009 , 05:24   Re: +1/sec.
Reply With Quote #8

Code:
if g_speed_time is less or equal to 120
{
        //
}
else if g_speed_time is more or equal to 120
{
        //
}
Why you add "equal" in both?
__________________
hleV is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 06-18-2009 , 05:35   Re: +1/sec.
Reply With Quote #9

cuz if i dont the vision got over 120 or get over -1 ... try it by ur self. to give by attack2 vision 90 to 120 & fom 120 to 90 back. i know this looks silly but i couldnt find other way to do this.

updated the demo, u can now the effect better.
__________________

Last edited by One; 06-18-2009 at 05:38.
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 06-18-2009 , 05:54   Re: +1/sec.
Reply With Quote #10

You check if it's equal in the first "if", and also in the second "if". If the speed time is 120, it will only go through the first "if" and wont touch the second "if". That's why you should only check ">" in the second "if" (else if).
__________________
hleV is offline
Reply


Thread Tools
Display Modes

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:36.


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