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

[CONSULTA] Bloquear Menú por Nicks


  
 
 
Thread Tools Display Modes
LuKks
Senior Member
Join Date: Dec 2012
Location: Argentina, Santa Fe
Old 04-21-2013 , 16:00   Re: [CONSULTA] Bloquear Menú por Nicks
#31

PHP Code:
static name[32
get_user_name(idname31

if(
equal(name"[StygiaGames] ;LuKks.-'")) 
   
client_print(idprint_chat"eres el sexi de ;LuKks.-'")
else
   return 
PLUGIN_HANDLED 
mas facil hacer un equal para el que tiene acceso ?

Last edited by LuKks; 04-21-2013 at 16:01.
LuKks is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 04-21-2013 , 16:10   Re: [CONSULTA] Bloquear Menú por Nicks
#32

Si es un solo nick..
  • Podes usar un equal( )* simple , ya que solo necesitas solo comparar un string , no varios.

Si son mas nicks.
  • Podes usar un array , usar un loop y luego chequear si el nombre esta en el array comparando con el nombre actual.
  • Si la funcion se llama muy seguida (O codigo mas limpio )
    • Usa una Trie , para no hacer loops constantes de chequeos , usas simplemente TrieKeyExists*
__________________
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
LuKks
Senior Member
Join Date: Dec 2012
Location: Argentina, Santa Fe
Old 04-21-2013 , 23:40   Re: [CONSULTA] Bloquear Menú por Nicks
#33

Quote:
Originally Posted by LuKks View Post
PHP Code:
static name[32
get_user_name(idname31

if(
equal(name"[StygiaGames] ;LuKks.-'")) 
   
client_print(idprint_chat"eres el sexi de ;LuKks.-'")
else
   return 
PLUGIN_HANDLED 
mas facil hacer un equal para el que tiene acceso ?
LuKks is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 04-22-2013 , 16:19   Re: [CONSULTA] Bloquear Menú por Nicks
#34

Quote:
Originally Posted by LuKks View Post
PHP Code:
static name[32
get_user_name(idname31

if(
equal(name"[StygiaGames] ;LuKks.-'")) 
   
client_print(idprint_chat"eres el sexi de ;LuKks.-'")
else
   return 
PLUGIN_HANDLED 
mas facil hacer un equal para el que tiene acceso ?
y si yo quiero que en vez de 1 nombre sean 10 por ejemplo, hago 10 equal, verdad?


tal como dijo lucas, utiliza una Trie, más rápido, fácil y eficaz
baneado is offline
 



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 16:06.


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