Raised This Month: $ Target: $400
 0% 

Solved Help with saving names


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
The overrated maniac
Member
Join Date: Jun 2021
Location: Argentina
Old 10-03-2021 , 19:48   Help with saving names
Reply With Quote #1

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(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say hello""hello");
    
g_maxplayers get_maxplayers();
}

public 
hello(id){
    
    
client_print(idprint_console"%s"names);
}

public 
event_round_start(){
    for(new 
ii<g_maxplayersi++){
        if(
is_user_connected(i)){
            new 
name[32]; get_user_name(iname31);
            
formatex(namescharsmax(names), "%s"name);
        }
    }

I want to show all the names saved on "names", but instead I only get the last name.
How can I do something like "names += name" with this?

Last edited by The overrated maniac; 10-05-2021 at 06:38.
The overrated maniac is offline
 


Thread Tools
Display Modes

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 11:32.


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