Raised This Month: $12 Target: $400
 3% 

Hold All Connected Players Id


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
oxygen935
Veteran Member
Join Date: Jun 2012
Location: Athens, Greece
Old 10-13-2013 , 12:46   Hold All Connected Players Id
Reply With Quote #1

Hey everyone,

I'm wondering how we can hold each connected players' id and print his ip in console with a command like amx_ip. Important: I don't want a player's ip(like amx_ip "playername here", i know how to do this), but how to hold ALL players' id.

Thanks in advance,
Oxygen
__________________
Quote:
Originally Posted by quark View Post
You're a genius
Stopped any pawn work cause of university for computer science
oxygen935 is offline
Send a message via Skype™ to oxygen935
Baws
Veteran Member
Join Date: Oct 2012
Old 10-13-2013 , 14:27   Re: Hold All Connected Players Id
Reply With Quote #2

Look at this. I think you can learn from this code? https://forums.alliedmods.net/showthread.php?t=227319
__________________
Like my clean plugins and work?
Baws is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 10-13-2013 , 16:42   Re: Hold All Connected Players Id
Reply With Quote #3

Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("Test Plugin 3", "", "");         register_clcmd("amx_ip", "cmd_ip", ADMIN_ADMIN); } public cmd_ip(id, level, cid) {         if ( ! cmd_access(id, level, cid, 0) )         return;         new players[32], playersnum;     new name[32], ip[16];         get_players(players, playersnum, "c");         for ( new i = 0 ; i < playersnum ; i++ ) {         get_user_name(players[i], name, charsmax(name));         get_user_ip(players[i], ip, charsmax(ip));                 client_print(id, print_console, "%d: %s, %s", i, name, ip);     } }
__________________
Black Rose is online now
Reply


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:36.


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