Raised This Month: $51 Target: $400
 12% 

Some [Question to ask] !!!!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
--kml--
Senior Member
Join Date: Jan 2009
Old 06-25-2009 , 09:31   Some [Question to ask] !!!!
Reply With Quote #1

Some question to ask

1.) how to make my own include? is it for shortening code?
like making a stock inside it .

2) Well , i have read a tutorial about bitsum operator so do i realy need to make bitsum_is_user_alive ?

3) So , How to check if a player is lagging or loosing fps?

4) how to spawn a sprite like the HP sprite ( is it a sprite?)
means by if i move the sprite still is sticking it to the screen and not lagging .


i will ask more if i am not sure about something

and thx if u help

__________________
wooT now is asking season
will ask you plenty of things for learning
--kml-- is offline
--kml--
Senior Member
Join Date: Jan 2009
Old 06-25-2009 , 22:02   Re: Some [Question to ask] !!!!
Reply With Quote #2

Small bump O.o
__________________
wooT now is asking season
will ask you plenty of things for learning
--kml-- is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-25-2009 , 22:35   Re: Some [Question to ask] !!!!
Reply With Quote #3

Quote:
Originally Posted by --kml-- View Post
Some question to ask

1.) how to make my own include? is it for shortening code?
like making a stock inside it .

2) Well , i have read a tutorial about bitsum operator so do i realy need to make bitsum_is_user_alive ?

3) So , How to check if a player is lagging or loosing fps?

4) how to spawn a sprite like the HP sprite ( is it a sprite?)
means by if i move the sprite still is sticking it to the screen and not lagging .


i will ask more if i am not sure about something

and thx if u help


1) Put stuff in a <filename>.inc file and then put "#include <filename>" (with angle brackets this time lol).
2) You obviously didn't understand that tutorial. Use something like this:

PHP Code:
new bitsum_is_alive

// Set whether or not they are alive:

if( is_user_alive(id) )
{
    
bitsum_is_alive |= (1<<id)
}
else
{
    
bitsum_is_alive &=  ~(1<<id)
}

// Then use the following to check and see if they are alive:

if (bistum_is_alive & (1<<id)) 
{
    
// User is alive.

3) Why?
__________________
fysiks is offline
--kml--
Senior Member
Join Date: Jan 2009
Old 06-25-2009 , 22:42   Re: Some [Question to ask] !!!!
Reply With Quote #4

1) (with angle brackets this time lol). i already know how to include files just to make 1 O.o

2) what i meant is bitsum is an operator? if i dont put bitsum_ it will not work?

( and i try to read it many times and try to absorp it like what arkshine said but still dont understand much of it ( i even print the tutorial and bring it with me lol))

3) Well if a player lag i can give them an option whether they want to refresh or not ( plugin ) and if he lag his name will be sent to a file (LOG) so that i know how many people lag ( and for some other use )
An example :
a player lag
server detects it
sends a log to server
and if too many people lag
there will be some cmd on lowing the graphic like
limiting the decals , sprites and some other things.
( just an example )


4) and for this how?

thx for helping

__________________
wooT now is asking season
will ask you plenty of things for learning

Last edited by --kml--; 06-25-2009 at 22:46.
--kml-- is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-25-2009 , 22:53   Re: Some [Question to ask] !!!!
Reply With Quote #5

No, it's not a function or operator. Bitsum = A sum of bits.

PHP Code:
new what_ever_you_want_to_name_this_variable  

// Set whether or not they are alive:  

if( is_user_alive(id) )  
{  
    
what_ever_you_want_to_name_this_variable |= (1<<id)  
}  
else  
{  
    
what_ever_you_want_to_name_this_variable &=  ~(1<<id)  
}  

// Then use the following to check and see if they are alive:  

if (what_ever_you_want_to_name_this_variable & (1<<id))   
{  
    
// User is alive.  

__________________

Last edited by fysiks; 06-25-2009 at 23:30.
fysiks is offline
--kml--
Senior Member
Join Date: Jan 2009
Old 06-25-2009 , 23:03   Re: Some [Question to ask] !!!!
Reply With Quote #6

PHP Code:
if (bistum_is_alive & (1<<id))   
{  
    
// User is alive.  

do i realy have to put bitsum? O.o
__________________
wooT now is asking season
will ask you plenty of things for learning
--kml-- is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-25-2009 , 23:08   Re: Some [Question to ask] !!!!
Reply With Quote #7

No.
__________________

Last edited by fysiks; 06-25-2009 at 23:30.
fysiks is offline
--kml--
Senior Member
Join Date: Jan 2009
Old 06-25-2009 , 23:19   Re: Some [Question to ask] !!!!
Reply With Quote #8

But u use bistum?
ehhh typo O.o

so i can also use

if ( blablabla_is_alive & (1<<id))?
__________________
wooT now is asking season
will ask you plenty of things for learning
--kml-- is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-25-2009 , 23:31   Re: Some [Question to ask] !!!!
Reply With Quote #9

Oh, crap, sorry, that was a mistake (my replace all didn't work completely apparently). Fixed
__________________
fysiks is offline
--kml--
Senior Member
Join Date: Jan 2009
Old 06-25-2009 , 23:41   Re: Some [Question to ask] !!!!
Reply With Quote #10

ooo

thx

but how for 4)?
__________________
wooT now is asking season
will ask you plenty of things for learning
--kml-- 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 12:05.


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