Admin Showip

Pluginuri pentru modul AdminMod.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

EcL!Ps3
Membru, skill +3
Membru, skill +3
Posts: 1184
Joined: 06 Apr 2008, 00:09
Detinator Steam: Nu
Reputatie: Cont blocat!
Been thanked: 2 times

04 Jun 2009, 22:00

Nu stiti sa descarcati FREE de pe RapidShare :| ?

Mirror!

Si GJ ca ai postat un plugin de care nu stiam :).
RoyalServer 2
ShiNe
Fost moderator
Fost moderator
Posts: 1539
Joined: 23 Sep 2008, 00:03
Detinator Steam: Nu
Reputatie: Fost arbitru eXtream
Fost moderator ajutator
2.6/3
Has thanked: 9 times
Been thanked: 34 times

21 Aug 2009, 01:56

ReUpload SMA pls?
User avatar
raiden
Fost moderator
Fost moderator
Posts: 3260
Joined: 22 Jun 2009, 22:56
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Location: Bucharest
Has thanked: 81 times
Been thanked: 218 times

18 Oct 2009, 15:18

Poftim
SMA | Afiseaza codul
/* This plugin shows ip of client*/

/*format of desc_ips.txt name IP desc*/

/* This is my first plugin in Small C. Yakutsk, Russia*/

/* $Id: plugin_showip.sma,v 1.1 beta 2001-2002 W@lker$ */







#include <core>

#include <console>

#include <string>

#include <admin>

#include <adminlib>



#define MAX_IPADDRESS 32

#define MAX_IPDESCRIPT 30





new STRING_VERSION[MAX_DATA_LENGTH] = "2.50.1";



new UserIP[MAX_PLAYERS][MAX_IPADDRESS];

new User[MAX_NAME_LENGTH];

new Type[MAX_DATA_LENGTH];

new DFile[MAX_DATA_LENGTH] = "desc_ips.txt";

new IPMessages[MAX_IPDESCRIPT][MAX_DATA_LENGTH];

new NumIPDesc = 0; //Holds number of IPs & Descriptions in file







public get_Descriptions() {

        new IsFile = 0;

        new LineNum = 0;

        new IsLine;

        new sStr[MAX_DATA_LENGTH];

        new Errormsg[MAX_DATA_LENGTH];

        IsFile = fileexists(DFile);



        if (IsFile > 0) {

                do {

                        IsLine = readfile(DFile, sStr, LineNum, MAX_DATA_LENGTH);

                        if (IsLine) {

                                if (strncmp(sStr, "//", 2) == 0) {

                                        //Ignore comment

                                } else {

                                                                                strcpy(IPMessages[NumIPDesc], sStr, MAX_DATA_LENGTH);

                                        NumIPDesc++; //IPMessages has been added increment NumIPDescs

                                                                                say(sStr);

                                }

                                LineNum++; //Increment LinNum

                        }

                        if (NumIPDesc == MAX_IPDESCRIPT) {

                                return PLUGIN_CONTINUE;

                        }

                } while (IsLine);

        } else {

                snprintf(Errormsg, MAX_DATA_LENGTH, "can't find file %s", DFile);

                say(Errormsg);

        }

        return PLUGIN_CONTINUE;

}



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



new i;

new maxplayers = maxplayercount();

new Name[MAX_NAME_LENGTH];

new UserID;

new WONID;

new Team;

new Data[MAX_DATA_LENGTH];

new STeam =0;

new IP[MAX_DATA_LENGTH];

new IPD[MAX_TEXT_LENGTH];

new IsFlag = 0;



convert_string(HLUserName,User,MAX_NAME_LENGTH);

convert_string(HLData,Data,MAX_DATA_LENGTH);



STeam = strtonum(Data); // ???®ěĺđ ę?®ěŕ?­?¤ű.





if (STeam==1) {

messageex(User, "*-------- IP List ---- Terrorists Forces ------------*", print_console);

} else

if (STeam==2) {

messageex(User, "*-------- IP List ---- Counter Terrorists Forces ----*", print_console);

} else {

messageex(User, "*-------- IP List -----------------------------------*", print_console);

}





// Find Users



for(i=1; i<=maxplayers; i++) {

  if (playerinfo(i,Name,MAX_NAME_LENGTH,UserID,WONID,Team) != 0) {



// Formating Output

while(strlen(Name)<=18) {

strcat(Name," ",MAX_NAME_LENGTH);

}//end while loop





strtok(UserIP, ":", IP, MAX_IPADDRESS);

strcat(Name,IP,MAX_NAME_LENGTH);

IsFlag = findip(IP, IPD);

if (IsFlag == 1) {

strcat(Name," ",MAX_NAME_LENGTH);

strcat(Name,IPD,MAX_NAME_LENGTH);

                                 }



//Display it

if (STeam!=1 && STeam!=2) {

 messageex(User, Name, print_console);

}   else if (STeam==Team && WONID!=0) {

 messageex(User, Name, print_console);

}



  }// if

}//for



messageex(User, "*------------------------------------------------------*", print_console);



return PLUGIN_HANDLED;

}





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

new Data[MAX_DATA_LENGTH];

new TargetName[MAX_NAME_LENGTH];

new iIndex;

new Text[MAX_TEXT_LENGTH];

new SessionID;



convert_string(HLData,Data,MAX_DATA_LENGTH);



if (check_user(Data) == 1) {

  get_username(Data,TargetName,MAX_NAME_LENGTH);

  get_userindex(TargetName, iIndex);

  get_userSessionID (TargetName,SessionID);

  selfmessage("1. - Keyword 2. - ID 3. - UserName 4. - IP");

  selfmessage("");

  snprintf(Text, MAX_TEXT_LENGTH,"1. - %s 2. - %i 3.- %s 4. - %s", Data,SessionID,TargetName,UserIP[iIndex]);

  selfmessage(Text);

                                                   }

else {

         selfmessage("Unrecognized player: ");

         selfmessage(Data);

         }

return PLUGIN_HANDLED;

}







public findip(searchIp[MAX_DATA_LENGTH], searchDesc[MAX_TEXT_LENGTH]) {

new desc[MAX_TEXT_LENGTH];

new ipnum[MAX_TEXT_LENGTH];



for (new i = 0; i < NumIPDesc; i++) {

 strtok(IPMessages, ";", ipnum, MAX_DATA_LENGTH);

 strtok( "", ";",desc, MAX_DATA_LENGTH);

 if  (strncmp(ipnum, searchIp,strlen(ipnum)) == 0) {

  searchDesc = desc;

  return 1;

 }

}//for

searchDesc = "";

return 0;

}











public plugin_connect(HLUserName, HLIP, UserIndex) {

        if (UserIndex >= 1 && UserIndex <= MAX_PLAYERS) {

strinit(UserIP[UserIndex]);

convert_string(HLIP, UserIP[UserIndex], MAX_IPADDRESS);

convert_string(HLUserName,User,MAX_NAME_LENGTH);

snprintf(Type, MAX_DATA_LENGTH, "Warning ! %s is connecting ! IP: %s ! ", User, UserIP[UserIndex]);

say(Type);

        }

        return PLUGIN_CONTINUE;

}



public plugin_disconnect(HLUserName, UserIndex) {

        if (UserIndex >= 1 && UserIndex <= MAX_PLAYERS) {

                strinit(UserIP[UserIndex]);

        }

        return PLUGIN_CONTINUE;

}





public plugin_init() {

        plugin_registerinfo("Admin ShowIP Plugin","Show users by IP address.",STRING_VERSION);

        plugin_registercmd("admin_showip","admin_showip",ACCESS_ALL,"admin_showip. Shows the ip addresses of clients.");

                plugin_registercmd("admin_ipstatus","admin_ipstatus",ACCESS_ALL,"Test.");

                get_Descriptions();

        return PLUGIN_CONTINUE;
User avatar
RoCkKiD
Membru, skill 0
Membru, skill 0
Posts: 55
Joined: 02 Jan 2010, 12:33
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com!
Has thanked: 1 time

02 Jan 2010, 20:42

GJ
http://WWW.FERMIERII.INFO - Well About Gaming

Connect cs.fermierii.info
Server NoN-stop
Players: 30
Port: 27015
Mod: Normal
User avatar
GoLdWyNNN-
Membru, skill +1
Membru, skill +1
Posts: 188
Joined: 12 Feb 2009, 20:29
Detinator Steam: Da
Location: Suceava
Has thanked: 14 times
Been thanked: 2 times

14 Feb 2010, 11:44

Bravo George !
ShiNe
Fost moderator
Fost moderator
Posts: 1539
Joined: 23 Sep 2008, 00:03
Detinator Steam: Nu
Reputatie: Fost arbitru eXtream
Fost moderator ajutator
2.6/3
Has thanked: 9 times
Been thanked: 34 times

19 Feb 2010, 00:21

RaiDen wrote:Poftim
SMA | Afiseaza codul
/* This plugin shows ip of client*/

/*format of desc_ips.txt name IP desc*/

/* This is my first plugin in Small C. Yakutsk, Russia*/

/* $Id: plugin_showip.sma,v 1.1 beta 2001-2002 W@lker$ */







#include <core>

#include <console>

#include <string>

#include <admin>

#include <adminlib>



#define MAX_IPADDRESS 32

#define MAX_IPDESCRIPT 30





new STRING_VERSION[MAX_DATA_LENGTH] = "2.50.1";



new UserIP[MAX_PLAYERS][MAX_IPADDRESS];

new User[MAX_NAME_LENGTH];

new Type[MAX_DATA_LENGTH];

new DFile[MAX_DATA_LENGTH] = "desc_ips.txt";

new IPMessages[MAX_IPDESCRIPT][MAX_DATA_LENGTH];

new NumIPDesc = 0; //Holds number of IPs & Descriptions in file







public get_Descriptions() {

        new IsFile = 0;

        new LineNum = 0;

        new IsLine;

        new sStr[MAX_DATA_LENGTH];

        new Errormsg[MAX_DATA_LENGTH];

        IsFile = fileexists(DFile);



        if (IsFile > 0) {

                do {

                        IsLine = readfile(DFile, sStr, LineNum, MAX_DATA_LENGTH);

                        if (IsLine) {

                                if (strncmp(sStr, "//", 2) == 0) {

                                        //Ignore comment

                                } else {

                                                                                strcpy(IPMessages[NumIPDesc], sStr, MAX_DATA_LENGTH);

                                        NumIPDesc++; //IPMessages has been added increment NumIPDescs

                                                                                say(sStr);

                                }

                                LineNum++; //Increment LinNum

                        }

                        if (NumIPDesc == MAX_IPDESCRIPT) {

                                return PLUGIN_CONTINUE;

                        }

                } while (IsLine);

        } else {

                snprintf(Errormsg, MAX_DATA_LENGTH, "can't find file %s", DFile);

                say(Errormsg);

        }

        return PLUGIN_CONTINUE;

}



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



new i;

new maxplayers = maxplayercount();

new Name[MAX_NAME_LENGTH];

new UserID;

new WONID;

new Team;

new Data[MAX_DATA_LENGTH];

new STeam =0;

new IP[MAX_DATA_LENGTH];

new IPD[MAX_TEXT_LENGTH];

new IsFlag = 0;



convert_string(HLUserName,User,MAX_NAME_LENGTH);

convert_string(HLData,Data,MAX_DATA_LENGTH);



STeam = strtonum(Data); // ???®ěĺđ ę?®ěŕ?­?¤ű.





if (STeam==1) {

messageex(User, "*-------- IP List ---- Terrorists Forces ------------*", print_console);

} else

if (STeam==2) {

messageex(User, "*-------- IP List ---- Counter Terrorists Forces ----*", print_console);

} else {

messageex(User, "*-------- IP List -----------------------------------*", print_console);

}





// Find Users



for(i=1; i<=maxplayers; i++) {

  if (playerinfo(i,Name,MAX_NAME_LENGTH,UserID,WONID,Team) != 0) {



// Formating Output

while(strlen(Name)<=18) {

strcat(Name," ",MAX_NAME_LENGTH);

}//end while loop





strtok(UserIP, ":", IP, MAX_IPADDRESS);

strcat(Name,IP,MAX_NAME_LENGTH);

IsFlag = findip(IP, IPD);

if (IsFlag == 1) {

strcat(Name," ",MAX_NAME_LENGTH);

strcat(Name,IPD,MAX_NAME_LENGTH);

                                 }



//Display it

if (STeam!=1 && STeam!=2) {

 messageex(User, Name, print_console);

}   else if (STeam==Team && WONID!=0) {

 messageex(User, Name, print_console);

}



  }// if

}//for



messageex(User, "*------------------------------------------------------*", print_console);



return PLUGIN_HANDLED;

}





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

new Data[MAX_DATA_LENGTH];

new TargetName[MAX_NAME_LENGTH];

new iIndex;

new Text[MAX_TEXT_LENGTH];

new SessionID;



convert_string(HLData,Data,MAX_DATA_LENGTH);



if (check_user(Data) == 1) {

  get_username(Data,TargetName,MAX_NAME_LENGTH);

  get_userindex(TargetName, iIndex);

  get_userSessionID (TargetName,SessionID);

  selfmessage("1. - Keyword 2. - ID 3. - UserName 4. - IP");

  selfmessage("");

  snprintf(Text, MAX_TEXT_LENGTH,"1. - %s 2. - %i 3.- %s 4. - %s", Data,SessionID,TargetName,UserIP[iIndex]);

  selfmessage(Text);

                                                   }

else {

         selfmessage("Unrecognized player: ");

         selfmessage(Data);

         }

return PLUGIN_HANDLED;

}







public findip(searchIp[MAX_DATA_LENGTH], searchDesc[MAX_TEXT_LENGTH]) {

new desc[MAX_TEXT_LENGTH];

new ipnum[MAX_TEXT_LENGTH];



for (new i = 0; i < NumIPDesc; i++) {

 strtok(IPMessages, ";", ipnum, MAX_DATA_LENGTH);

 strtok( "", ";",desc, MAX_DATA_LENGTH);

 if  (strncmp(ipnum, searchIp,strlen(ipnum)) == 0) {

  searchDesc = desc;

  return 1;

 }

}//for

searchDesc = "";

return 0;

}











public plugin_connect(HLUserName, HLIP, UserIndex) {

        if (UserIndex >= 1 && UserIndex <= MAX_PLAYERS) {

strinit(UserIP[UserIndex]);

convert_string(HLIP, UserIP[UserIndex], MAX_IPADDRESS);

convert_string(HLUserName,User,MAX_NAME_LENGTH);

snprintf(Type, MAX_DATA_LENGTH, "Warning ! %s is connecting ! IP: %s ! ", User, UserIP[UserIndex]);

say(Type);

        }

        return PLUGIN_CONTINUE;

}



public plugin_disconnect(HLUserName, UserIndex) {

        if (UserIndex >= 1 && UserIndex <= MAX_PLAYERS) {

                strinit(UserIP[UserIndex]);

        }

        return PLUGIN_CONTINUE;

}





public plugin_init() {

        plugin_registerinfo("Admin ShowIP Plugin","Show users by IP address.",STRING_VERSION);

        plugin_registercmd("admin_showip","admin_showip",ACCESS_ALL,"admin_showip. Shows the ip addresses of clients.");

                plugin_registercmd("admin_ipstatus","admin_ipstatus",ACCESS_ALL,"Test.");

                get_Descriptions();

        return PLUGIN_CONTINUE;

Ti-am editat, ti-am pus sursa. Mersi.
C00xxx
Membru, skill 0
Membru, skill 0
Posts: 35
Joined: 05 Feb 2010, 13:38
Detinator Steam: Da
CS Status: Rup tot ! :D
Has thanked: 5 times

08 Apr 2010, 21:20

Bun plugin!

Merci ca la`i postat!
User avatar
•TaBoo•
Membru, skill 0
Membru, skill 0
Posts: 53
Joined: 20 Jun 2010, 02:25
Detinator Steam: Da
CS Status: Ascult Muzica ! Non Stop !
Location: Targu Mures
Been thanked: 3 times
Contact:

20 Jun 2010, 02:52

Bravo . GJ :D>-
Semnatura prea lunga !
Este permisa doar o singura reclama !
ady1501
Fost moderator
Fost moderator
Posts: 1011
Joined: 27 Jul 2007, 14:20
Detinator Steam: Da
Reputatie: Fost moderator
Restrictie moderator
Ban 1 luna
Location: Deva
Has thanked: 2 times
Been thanked: 29 times

31 Jul 2010, 17:18

Link editat !
User avatar
Energy.kZ
Membru, skill +1
Membru, skill +1
Posts: 125
Joined: 18 Mar 2012, 00:33
Detinator Steam: Da
CS Status: HNYO HNYO HNYO
Detinator server CS: dr.lafel.ro
SteamID: ink_pursange
Location: Zalău
Has thanked: 2 times
Been thanked: 2 times
Contact:

28 May 2012, 15:01

Bravo. frumos
Image
Post Reply

Return to “AdminMod”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests