Quote:
Originally Posted by fysiks
There are many ways to do it but the simplest is add() provided that you don't actually need to do any formatting (which you're not currently doing anyways).
|
It shows more characters so it works, but its limited to like 110 characters, I dont understand why.
I added formatex in this example to show what I'm doing in a bigger plugin
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new names[5000], g_maxplayers;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say hello", "hello");
g_maxplayers = get_maxplayers();
}
public hello(id){
client_print(id, print_console, "%s", names);
}
public event_round_start(){
for(new i; i<g_maxplayers; i++){
if(is_user_connected(i)){
new name[32], asd[5000];
get_user_name(i, name, 31);
formatex(asd, charsmax(asd), "%s", name);
add(names, charsmax(names), asd, charsmax(asd));
}
}
}