Raised This Month: $32 Target: $400
 8% 

[Ayuda] Switch De flags


Post New Thread Reply   
 
Thread Tools Display Modes
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 04-06-2013 , 19:40   Re: [Ayuda] Switch De flags
Reply With Quote #11

Quote:
Originally Posted by lucas_7_94 View Post
Me refiero a que el codigo que posteo con new esta correcto.
segun tengo entendido con static en este caso es mas rapido. para que crear una variable global para almacenar una native cada vez que se llama la funcion, si con la statica se llama mas rapido.

aca un ejemplo: http://forums.alliedmods.net/showthr...0340&highlight
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"
Roccoxx is offline
Send a message via MSN to Roccoxx
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 04-06-2013 , 19:50   Re: [Ayuda] Switch De flags
Reply With Quote #12

static se usa cuando existe una funcion que se llame constantemente cada un delay de 10 , 25 segundos aproximadamente. Ademas , por dios , son 0.00001 bits que se ahorran , mucho hardcoding por esta zona xD
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 04-06-2013 , 19:58   Re: [Ayuda] Switch De flags
Reply With Quote #13

Quote:
Originally Posted by lucas_7_94 View Post
static se usa cuando existe una funcion que se llame constantemente cada un delay de 10 , 25 segundos aproximadamente. Ademas , por dios , son 0.00001 bits que se ahorran , mucho hardcoding por esta zona xD
si te fijas hasta mercylezz uso staticas en el hud por ejemplo y es una funcion permanente.

porque no probas con el addon profiler y me decis cual es mejor?

PD: Me gusta ahorrar bits
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"
Roccoxx is offline
Send a message via MSN to Roccoxx
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 04-06-2013 , 20:03   Re: [Ayuda] Switch De flags
Reply With Quote #14

y el hud fijate cada cuantos segundos se llama... mas me das la razon xD

Porque te reirtero , depende la FUNCION cada cuanto delay se llame , si la funcion se llama cada un largo tiempo esta bien , sino tiene que pasar a static.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 04-06-2013 , 20:10   Re: [Ayuda] Switch De flags
Reply With Quote #15

y si el menu se abre constantemente?

o yo entro a su servidor y coordino con los otros jugadores para que lo abramos al mismo tiempo e.e

edit: deja nomas que use como a el se le plazca.
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"

Last edited by Roccoxx; 04-06-2013 at 20:17.
Roccoxx is offline
Send a message via MSN to Roccoxx
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 04-06-2013 , 20:15   Re: [Ayuda] Switch De flags
Reply With Quote #16

Quote:
Originally Posted by Roccoxx View Post
y si el menu se abre constantemente?

o yo entro a su servidor y coordino con los otros jugadores para que lo abramos al mismo tiempo e.e
Quote:
Originally Posted by lucas_7_94 View Post
y el hud fijate cada cuantos segundos se llama... mas me das la razon xD

Porque te reirtero , depende la FUNCION cada cuanto delay se llame , si la funcion se llama cada un largo tiempo esta bien , sino tiene que pasar a static.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 04-06-2013 , 21:25   Re: [Ayuda] Switch De flags
Reply With Quote #17

los codigos que postean aca son puro crap y se pelean por si static se ahorra 0.0000001 mas que new...
__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 04-06-2013 , 21:33   Re: [Ayuda] Switch De flags
Reply With Quote #18

Quote:
Originally Posted by Starsailor View Post
los codigos que postean aca son puro crap y se pelean por si static se ahorra 0.0000001 mas que new...
estamos debatiendo.
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"
Roccoxx is offline
Send a message via MSN to Roccoxx
Sabalero_Soy_Yo
Member
Join Date: Apr 2013
Old 04-06-2013 , 21:47   Re: [Ayuda] Switch De flags
Reply With Quote #19

PHP Code:
public supermenu(id)
{
    static 
flags
    flags 
get_user_flags(id)

    if(
flags ADMIN_RCONmegamenu(id)
    if(
flags ADMIN_IMMUNITYvipmenu(id)
    if(
flags ADMIN_LEVEL_Abasicmenu(id)
    if(
flags ADMIN_LEVEL_Bfullmenu(id)

¿ asi no es mejor ?

Last edited by Sabalero_Soy_Yo; 04-06-2013 at 21:47.
Sabalero_Soy_Yo is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 04-06-2013 , 22:02   Re: [Ayuda] Switch De flags
Reply With Quote #20

A esto queria evitar llegar , que la gente nueva aprenda algo que no sabe como se utiliza.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
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 13:34.


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