Raised This Month: $ Target: $400
 0% 

Help variable for determinate player´s


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
BloodyNuker
Member
Join Date: Jan 2006
Old 04-25-2006 , 16:09   Help variable for determinate player´s
Reply With Quote #1

If i use variables for example
new password[32]="7"
this affect all players

How can i use a variable for determinate player ?

I need this because i do this plugin...


The plugin when a player connect, show if this put in console amx_jojo 7

If the player put amx_jojo in 7 the server do nothing, but if the player don´t put nothing in 35 seconds the server kick player

This is the plugin

Code:
#include <amxmodx> #include <amxmisc> new Plugin_Author[] = "Super kuak xD"; new Plugin_Version[] = "V 100.0"; new Plugin_Name[] = "Plugin" new password1[32]="no" new password2[32]="si" #define MAX_CLR 10 public plugin_init() { register_concmd("amx_jojo","cmdChat",ADMIN_CHAT,"<password> - sends password to server") register_plugin(Plugin_Name,Plugin_Version,Plugin_Author); } public client_putinserver(id) { set_task(35.0, "client_verification", id, "b") } public client_verification(id) { if( !is_user_connected(id) ) { return PLUGIN_HANDLED; } new name[32]; get_user_name( id , name , 31 ); if( equali(password1,password2) ) { client_print(id,print_chat,"*** It´s all right ***") } else { client_print(0,print_chat,"*** %s kicked from the server ***",name) client_cmd(id,"toggleconsole") client_cmd(id,"echo ^"*** Bye... see you!... ***^";disconnect") } return PLUGIN_CONTINUE } public cmdChat(id,level,cid) { if (!cmd_access(id,level,cid,2)) return PLUGIN_HANDLED new message[192] read_args(message,191) if( equali(message,password2) ) { copy(password1, 31, "si") } return PLUGIN_HANDLED }


Tnkz!
BloodyNuker 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 05:11.


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