get user name for comparing
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:
this is just a part of the code, so i might forgot some things. how should i get his name? |
Re: get user name for comparing
You could use get_user_name(id, name[], len)
An example: new name[18] get_user_name(id, name, 17) client_print(id, print_chat, "Your name is: %s", name) |
Re: get user name for comparing
Prematuer post can be deleted!
|
Re: get user name for comparing
I cant figure out precicly what you want?¿?
But an example how to compare name with your list: Code:
You can use equal instead of equali. equal is case sensetive equali is NOT case sensetive /Lone Wolf |
Re: get user name for comparing
Code:
when compiling, it shows: Code:
Error: Array must be indexed (variable "LeadACheck") on line 76 |
Re: get user name for comparing
Cant se the line numbers, but my guess is that it is this one:
Code:
Try these i instead: Code:
I havent figured it completly out the thing about = or == in if's /Lone Wolf |
Re: get user name for comparing
equal works great, thanks :P
in if's, == must be used |
Re: get user name for comparing
No problem :)
|
| All times are GMT -4. The time now is 08:01. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.