Raised This Month: $ Target: $400
 0% 

Connect Disconnect Info


Post New Thread Reply   
 
Thread Tools Display Modes
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 11-29-2009 , 20:11   Re: Connect Disconnect Info
Reply With Quote #21

Oh, ye... mine wrong, didn't think about that...

@ Bugsy

What is EOS? i never seen that, is a function or what?
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-29-2009 , 21:13   Re: Connect Disconnect Info
Reply With Quote #22

Quote:
Originally Posted by Alucard^ View Post
Oh, ye... mine wrong, didn't think about that...

@ Bugsy

What is EOS? i never seen that, is a function or what?
End-Of-String constant for terminating strings, equal to '\0'.
__________________

Last edited by Bugsy; 11-29-2009 at 21:18.
Bugsy is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 11-29-2009 , 21:36   Re: Connect Disconnect Info
Reply With Quote #23

Haaa, the famous '\0', ok.. good to know, thx =p
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
missdivya
BANNED
Join Date: Nov 2009
Old 11-30-2009 , 10:48   Re: Connect Disconnect Info
Reply With Quote #24

Thnx Alucard now can you modify your code and post back.
missdivya is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 11-30-2009 , 12:09   Re: Connect Disconnect Info
Reply With Quote #25

Quote:
Originally Posted by missdivya View Post
Thnx Alucard now can you modify your code and post back.
For what reason? o.O you have the bugsy's code that is better. But well you are banned so...... xd
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 11-30-2009 , 23:53   Re: Connect Disconnect Info
Reply With Quote #26

Here is an already made one by GHW_Chronic.
If get ohter people to make one if theres a prefect one made by GHW.

Heres Codes

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <geoip>
#define SHOW_COLOR  1
#define SHOW_CONNECT  2
#define SHOW_DISCONNECT  4
#define PLAY_SOUND_CONNECT 8
#define PLAY_SOUND_DISCONNECT 16
new display_type_pcvar
new name[33][32]
new 
authid[33][32]
new 
country[33][46]
new 
ip[33][32]
new 
connect_soundfile[64]
new 
disconnect_soundfile[64]
new 
saytext_msgid
public plugin_init()
{
 
register_plugin("GHW Connect Messages","1.0","GHW_Chronic")
 
display_type_pcvar register_cvar("cm_flags","31")
 
register_cvar("cm_connect_string","[AMXX] %name (%steamid) has connected (%country).")
 
register_cvar("cm_disconnect_string","[AMXX] %name (%steamid) has disconnected (%country).")
 
saytext_msgid get_user_msgid("SayText")
}
public 
plugin_precache()
{
 
register_cvar("cm_connect_sound","buttons/bell1.wav")
 
register_cvar("cm_disconnect_sound","fvox/blip.wav")
 
get_cvar_string("cm_connect_sound",connect_soundfile,63)
 
get_cvar_string("cm_disconnect_sound",disconnect_soundfile,63)
 
precache_sound(connect_soundfile)
 
precache_sound(disconnect_soundfile)
}
public 
client_putinserver(id)
{
 if(!
is_user_bot(id))
 {
  
get_client_info(id)
  new 
display_type get_pcvar_num(display_type_pcvar)
  if(
display_type SHOW_CONNECT)
  {
   new 
string[200]
   
get_cvar_string("cm_connect_string",string,199)
   
format(string,199,"^x01%s",string)
   if(
display_type SHOW_COLOR)
   {
    new 
holder[46]
    
format(holder,45,"^x04%s^x01",name[id])
    
replace(string,199,"%name",holder)
    
format(holder,45,"^x04%s^x01",authid[id])
    
replace(string,199,"%steamid",holder)
    
format(holder,45,"^x04%s^x01",country[id])
    
replace(string,199,"%country",holder)
    
format(holder,45,"^x04%s^x01",ip[id])
    
replace(string,199,"%ip",holder)
   }
   else
   {
    
replace(string,199,"%name",name[id])
    
replace(string,199,"%steamid",authid[id])
    
replace(string,199,"%country",country[id])
    
replace(string,199,"%ip",ip[id])
   }
   new 
numplayers[32], player
   get_players
(players,num,"ch")
   for(new 
i=0;i<num;i++)
   {
    
player players[i]
    
message_begin(MSG_ONE,saytext_msgid,{0,0,0},player)
    
write_byte(player)
    
write_string(string)
    
message_end()
    if(
display_type PLAY_SOUND_CONNECT)
    {
     
client_cmd(player,"spk %s",connect_soundfile)
    }
   }
  }
 }
}
public 
get_client_info(id)
{
 
get_user_name(id,name[id],31)
 
get_user_authid(id,authid[id],31)
 
get_user_ip(id,ip[id],31)
 
geoip_country(ip[id],country[id])
 if(
equal(country[id],"error"))
 {
  if(
contain(ip[id],"192.168.")==|| equal(ip[id],"127.0.0.1") || contain(ip[id],"10.")==||  contain(ip[id],"172.")==0)
  {
   
country[id] = "LAN"
  
}
  if(
equal(ip[id],"loopback"))
  {
   
country[id] = "ListenServer User"
  
}
  else
  {
   
country[id] = "Unknown Country"
  
}
 }
}
public 
client_infochanged(id)
{
 if(!
is_user_bot(id))
 {
  
get_user_info(id,"name",name[id],31)
 }
}
public 
client_disconnect(id)
{
 if(!
is_user_bot(id))
 {
  new 
display_type get_pcvar_num(display_type_pcvar)
  if(
display_type SHOW_DISCONNECT)
  {
   new 
string[200]
   
get_cvar_string("cm_disconnect_string",string,199)
   
format(string,199,"^x01%s",string)
   if(
display_type SHOW_COLOR)
   {
    new 
holder[46]
    
format(holder,45,"^x04%s^x01",name[id])
    
replace(string,199,"%name",holder)
    
format(holder,45,"^x04%s^x01",authid[id])
    
replace(string,199,"%steamid",holder)
    
format(holder,45,"^x04%s^x01",country[id])
    
replace(string,199,"%country",holder)
    
format(holder,45,"^x04%s^x01",ip[id])
    
replace(string,199,"%ip",holder)
   }
   else
   {
    
replace(string,199,"%name",name[id])
    
replace(string,199,"%steamid",authid[id])
    
replace(string,199,"%country",country[id])
    
replace(string,199,"%ip",ip[id])
   }
   new 
numplayers[32], player
   get_players
(players,num,"ch")
   for(new 
i=0;i<num;i++)
   {
    
player players[i]
    
message_begin(MSG_ONE,saytext_msgid,{0,0,0},player)
    
write_byte(player)
    
write_string(string)
    
message_end()
    if(
display_type PLAY_SOUND_DISCONNECT)
    {
     
client_cmd(player,"spk %s",disconnect_soundfile)
    }
   }
  }
 }

__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
Reply



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 17:39.


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