Raised This Month: $ Target: $400
 0% 

question about ids and stuff ...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
shino
Senior Member
Join Date: May 2006
Old 10-17-2006 , 15:54   question about ids and stuff ...
Reply With Quote #1

this is code ...
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "New Plugin" #define VERSION "1.0" #define AUTHOR "Author" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("say .ready","check_ready")     register_srvcmd("check_whoisready","check_whoisready") } public check_ready(id) {     UserReady[id] = 1 } public check_whoisready() {     new Name[128]     for(new i=0;i<=get_playersnum();i++) {         if(UserReady[i] == 1) {             get_user_name(i,Name,127)             client_print(0,print_chat,"%s is ready!",Name)         }     } }

as you see, player could say .ready and he would be assigned into UserReady with his id. when someone types into server console check_whoisready, that loop will throw out anyone who has that id and is assigned into UserReady.

i would like to know, if my code would work or the use of UserReady[id] is wrong, ec i mustn't use this loop to get players' ids.

plz reply if you know the solution, ty :*
__________________


+karma if i am helpful
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 04:50.


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