User
Pass
2FA
 
 

plugin showip

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Tutorials
Author Message1179
banditu

[Mentally Stable]



Status: Offline
(since 29-05-2021 22:54)
Joined: 21 Nov 2006
Posts: 349, Topics: 106
Location: Romania

Reputation: 548.9
Votes: 9

Post Posted: 30-07-2009, 20:43:24 | Translate post to: ... (Click for more languages)

Am acest plugin pe adminmod,

Code:
/* Plugin for display of client IPs */
/* UserIPs v0.1 by Hanover Fist */
/* Written on 2/25/04 for AdminMOD 2.50.59 */

#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>

#define MAX_IPADDRESS 32

new STRING_VERSION[MAX_DATA_LENGTH] = "0.1";

new User[MAX_NAME_LENGTH];

public admin_showip(HLCommand,HLData,HLUserName,UserIndex){

new i;
new maxplayers = maxplayercount();
new Data[MAX_DATA_LENGTH];
new UserPort;
new UserID;
new WONID;
new Team;
new Text[MAX_DATA_LENGTH];
new UserIP[MAX_DATA_LENGTH];

convert_string(HLUserName,User,MAX_NAME_LENGTH);
convert_string(HLData,Data,MAX_DATA_LENGTH);


for(i=1; i<=maxplayers; i++) {
new Name[MAX_NAME_LENGTH];
if (playerinfo(i,Name,MAX_NAME_LENGTH,UserID,WONID,Team) != 0) {
   get_userIP(Name,UserIP,MAX_DATA_LENGTH,UserPort);
        while(strlen(Name)<=18) {
          strcat(Name," ",MAX_NAME_LENGTH);
        }
   snprintf(Text,MAX_TEXT_LENGTH,"Name: %s - IP: %s",Name,UserIP);
   messageex(User, Text, print_console);
  }
 }
return PLUGIN_HANDLED;
}


public plugin_init() {
   plugin_registerinfo("UserIP Plugin","Lists clientss IP address.",STRING_VERSION);
   plugin_registercmd("admin_showip","admin_showip",ACCESS_BAN,"admin_showip. Lists the IP addresses of clients.");
   return PLUGIN_CONTINUE;
}


Am dori sa adaug un text inainte si la sfarsitul listei cu nick si ip ale jucatorilor unde trebuie sa il adaug mai exact? ca nu reusesc deloc...

0 0
  
Back to top
View user's profile Send private message
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Tutorials  


The time now is 27-04-2024, 08:46:08
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x