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

[ES] Detectar si es un player [Solucionado]


  
 
 
Thread Tools Display Modes
Author Message
shinoda
Spanish Moderator
Join Date: Nov 2009
Location: ag_crossfire
Old 04-14-2010 , 02:44   [ES] Detectar si es un player [Solucionado]
#1

Tengo esta funcion

PHP Code:
public mi_funcion(idlevelcid) {
    if (!
cmd_access(idlevelcid2)) return PLUGIN_HANDLED
    
    
new arg[32]; read_argv(1arg31)
    
    
write_file("....bloc.ini"arg)
    
client_print(idprint_console"Haz agregado: %s"arg)
    return 
PLUGIN_HANDLED

Como identifico si lo que agrege en consola es un jugador, caso contrario que indique, "Jugador no existe"
__________________
Oh hell no this shit is awesome !!!
shinoda is offline
Send a message via MSN to shinoda Send a message via Skype™ to shinoda
g_often
Senior Member
Join Date: Jan 2010
Location: In your mind
Old 04-14-2010 , 03:01   Re: [ES] Detectar si es un player
#2

fijate si te sirve.

http://forums.alliedmods.net/showthr...=123822&page=2
__________________
Reality is wrong, dreams are for real.
g_often is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 04-14-2010 , 06:26   Re: [ES] Detectar si es un player
#3

No, no tiene nada que ver eso g_often.

Para poder detectar si es un player tenes que hacer uso de la funcion cmd_target()

PHP Code:
new player cmd_target(idarg7)

if(!
player)
    return 
PLUGIN_HANDLED 
Esto iria antes de que uses la funcion write_file
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 04-14-2010 , 22:57   Re: [ES] Detectar si es un player
#4

Como dice Alucard, pero de flags ponele 10 o 11 si queres que puedas agregar a los que tienen el flag A en el Admin.
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
shinoda
Spanish Moderator
Join Date: Nov 2009
Location: ag_crossfire
Old 04-15-2010 , 08:49   Re: [ES] Detectar si es un player
#5

Gracias, funciona.

Pero en el wiki dice:

Flags:
1 - obey immunity
2 - allow yourself
4 - must be alive
8 - can't be bot

Y alucard le puso un 7, por que ?
con eso considera los 3 primeros flags ?
__________________
Oh hell no this shit is awesome !!!
shinoda is offline
Send a message via MSN to shinoda Send a message via Skype™ to shinoda
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 04-15-2010 , 13:18   Re: [ES] Detectar si es un player
#6

Porque estan en Bits

2 ^ 0 = 1
2 ^ 1 = 2
2 ^ 2 = 4

y asi

entonces 7 = 1 + 2 + 4
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
shinoda
Spanish Moderator
Join Date: Nov 2009
Location: ag_crossfire
Old 04-15-2010 , 13:57   Re: [ES] Detectar si es un player
#7

Quote:
Originally Posted by AntiBots View Post
Porque estan en Bits

2 ^ 0 = 1
2 ^ 1 = 2
2 ^ 2 = 4

y asi

entonces 7 = 1 + 2 + 4
Si, a eso me referia gracias.
__________________
Oh hell no this shit is awesome !!!
shinoda is offline
Send a message via MSN to shinoda Send a message via Skype™ to shinoda
 



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 14:02.


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