Jump to content


Photo

Amx_last


  • Please log in to reply
2 replies to this topic

#1 soomnifer

soomnifer

    Soldat

  • Members
  • PipPip
  • 331 posts
  • Location:undeva in casa
  • Interests:sa fiu mai deshtept

Posted 11 September 2008 - 11:58 PM

as dori pluginul amx_last
ambele fisiere (amx_last.sma. amx_last.amxx)

MS anticipat
Posted Image

#2 anakincstrike

anakincstrike

    Soldat

  • Members
  • PipPip
  • 108 posts
  • CS Server: extream.idle.ro

Posted 12 September 2008 - 04:32 PM

#include <amxmodx>
   #include <amxmisc>
   
   #define PLUGIN "Last IP"
   #define VERSION "1.0"
   #define AUTHOR "Alka"
   
   #define STR_LEN 32
   enum _:Infos 
   {
	  
	  gUserIp[STR_LEN],
	  gUserName[STR_LEN]
   }
   
   new gLastUsers[5][Infos];
   public plugin_init() {
	  register_plugin(PLUGIN, VERSION, AUTHOR)
	  register_concmd("amx_lastip", "cmdLastIp", ADMIN_KICK, "");
	  
   }
   public cmdLastIp(id,level,cid) 
   {
		  if(!gLastUsers[0][gUserName][0]) {
		 
				 client_print(id,3,"Nu a iesit nici un jucator de pe server inca!");
				 return 1;
		  }
	  
		  for(new i = 0;i < 5;i++) 
	   {
				 if(!gLastUsers[i][gUserName][0] || ! gLastUsers[i][gUserIp][0])
					continue;
				 console_print(id,"%s   -   %s",gLastUsers[i][gUserName], gLastUsers[i][gUserIp]);
		  }
	  
		  return 1;
	  
   }
   public client_disconnect(id) 
   {
		  static sName[32];
		  get_user_name(id,sName,sizeof sName - 1);
		  for(new i = 0;i < sizeof gLastUsers;i++) 
	   {
		 
				 if(equali(gLastUsers[i][gUserName],sName))
					return 1;
		  }
	  
		  static iNum;
		  get_user_name(id,gLastUsers[iNum][gUserName],STR_LEN - 1);
		  get_user_ip(id,gLastUsers[iNum][gUserIp],STR_LEN - 1, 1);
		  iNum++;
	  
		  if(iNum >= 5)
				 iNum = 0;
		 
		  return 0;
	  
   }
Comanda e amx_lastip, o modifici de aici:

register_concmd("amx_lastip"



#3 hip_hop_x

hip_hop_x

    Soldat

  • Members
  • PipPip
  • 267 posts
  • Gender:Male
  • Location:Old School
  • Interests:cs

Posted 12 September 2008 - 06:08 PM

good job, daca o sa mai fie cineva de acord, vom muta acest plugin in pluginuri cs 1.6
C++, old school




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users