Raised This Month: $ Target: $400
 0% 

How can i set Variable?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BloodyNuker
Member
Join Date: Jan 2006
Old 04-24-2006 , 12:02   How can i set Variable?
Reply With Quote #1

Hellooooooo

I need put client variable in 1 when he say in amx_chat 123
amx_chat 123
How can i put the variable password in 1 if the message are 123?


#define password "123"



public cmdChat(id,level,cid,password1) {
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new message[192], name[32], players[32], inum, authid[32], userid
read_args(message,191)
remove_quotes(message)
get_user_authid(id,authid,31)
get_user_name(id,name,31)
userid = get_user_userid(id)
get_players(players,inum)
log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"",name,userid,authid,message)
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")",name,userid,authid,message)
format(message,191,"(ADMINS) %s : %s",name,message)
if(message==123)
{
password1 = 1;
client_print(0,print_chat,"*** %s password set in 1 ***",name,message)
}
return PLUGIN_HANDLED
}
BloodyNuker is offline
ZeonSoldier
Member
Join Date: Jan 2006
Old 04-24-2006 , 15:55   Re: How can i set Variable?
Reply With Quote #2

Try to use the 'small' tags when posting code.

Code:
#define password "123" public cmdChat(id,level,cid,password1) {   if (!cmd_access(id,level,cid,2))     return PLUGIN_HANDLED   new message[192], name[32], players[32], inum, authid[32], userid   read_args(message,191)   remove_quotes(message)   get_user_authid(id,authid,31)   get_user_name(id,name,31)   userid = get_user_userid(id)   get_players(players,inum)   log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"",name,userid,authid,message)   log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")",name,userid,authid,message)   format(message,191,"(ADMINS) %s :   %s",name,message) if(message==123) { password1 = 1; client_print(0,print_chat,"*** %s password set in 1 ***",name,message) }   return PLUGIN_HANDLED }
ZeonSoldier is offline
Send a message via MSN to ZeonSoldier
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 05:08.


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