Raised This Month: $ Target: $400
 0% 

get user name for comparing


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
shino
Senior Member
Join Date: May 2006
Old 07-04-2006 , 16:16   get user name for comparing
Reply With Quote #1

so, i would like to get player's name and compare it with the name of player i have picked when he wrote something. here's the code:
Code:
new TA[32],LA[32],LeaderA[32],CheckSay[128],TeamA,TeamALeaderDefined,BCTeamARdy public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);     register_cvar("bc_teamA","NiP");     register_clcmd("say","check");     BCTeamARdy = 0     TeamALeaderDefined = 0     get_cvar_string("bc_teamA",TeamA,31); } public check(id) {     read_args( CheckSay, 127 );     remove_quotes( CheckSay );     format(LA,31,"!leader %s",TeamA);     format(TA,31,"%s ready",TeamA);     if(equal(CheckSay,LA)) {         TeamALeaderDefined = 1         get_user_name(id,LeaderA,31); // *** got his name ***         server_cmd("say %s has become leader of %s.",LeaderA,TeamA);         client_print(id,print_center,"It is very important for you to not rename from now on!");     }     if(TeamALeaderDefined == 1) {         if(equal(get_user_info(id,"name"),LeaderA)) { // here's the problem             if(equal(CheckSay,TA)) {                 BCTeamARdy = 1                 client_print(0,print_chat,"%s is ready!",TeamA );                 set_cvar_num("sv_restartround",2);             }         } else {             client_print(id,print_chat,"You are not authorized for this action")         }     } }

this is just a part of the code, so i might forgot some things.

how should i get his name?
shino 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 08:01.


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