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 :*
__________________