This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Player Helper 1.2 (UPDATE!)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose       
Reaper2331
Veteran Member
Join Date: Nov 2006
Location: Columbus,Ohio
Old 09-24-2007 , 20:54   Player Helper 1.2 (UPDATE!)
Reply With Quote #1

This Plugin Allows Users to use /commands in chat to get info
Credits:
Original Idea: Me(Reaper2331)
Supporters and Helpers:
connorr - finished the Code to fix the /abuse, /website and /serverip
Alka - Tried to fix the /abuse , /website and /serverip
X-Script - Helped fix the rest of the coding
arkshine - Helped fix the Coding As well
M249-M4A1 - helped fix the error in 1.1
OneEyed - Used The Code from his Admin Check for /admin(got his permission)


For The Player Helper MOTD to work You MUST add the PlayerHelper.txt to your mods directory
Example:
1.6 is cstrike

Commands:
/website - Gets Clans or Admins Website(Check Cvar amx_clanwebsite)
/serverip - Gets Server IP(Check Cvar amx_serverip)
/abuse - Gets Admins Email to Report Abuse (Check Cvar amx_adminemail)
/steamid - Gets Users Steam Id for them(Easy to use to add admin)
/myip - Gets the Users IP Adress for them
/playerhelper - Opens up the Player Helper Help MOTD
/admin - Gets Admins Online

Cvars:
amx_serverip "127.0.0.1 :27015"
amx_adminemail "[email protected]"
amx_clanwebsite "http://mywebsite.com"
amx_advertisetime "30.0"
amx_contactinfo "" - Server Owners Contact Information(Email)

To Do:
  • /record Name of demo to record demos e.g. /record Reaper2331
  • /demo Name of demo to record demos eg. /demo Reaper2331
PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#define PLUGIN  "Player Helper" 
#define VERSION "1.2" 
#define AUTHOR  "Reaper2331" 
#define _charsmax(%1) sizeof( %1 ) - 1
#define ADMIN_CHECK ADMIN_ADMIN
static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new p_serveripp_emailp_advertisetimep_clanwebsite;
new 
maxplayers
new gmsgSayText
public plugin_init() 

 
register_pluginPLUGINVERSIONAUTHOR );
 
 
p_serverip    register_cvar"amx_serverip"   "127.0.0.1 :27015"    );
 
p_email       register_cvar"amx_adminemail" "[email protected]"      );
 
p_clanwebsite register_cvar"amx_clanwebsite""http://mywebsite.com" );
 
p_advertisetime register_cvar"amx_advertisetime""30.0" );
 
maxplayers get_maxplayers()
 
gmsgSayText get_user_msgid("SayText")
 
 
register_saycmd"steamid" ,"PrintText" ADMIN_ALL"- gets your steam id for you" );
 
register_saycmd"myip"    ,"PrintText2"ADMIN_ALL"- gets your IP Adress for you" );
 
register_saycmd"serverip","PrintText3"ADMIN_ALL"- gets the Servers IP Adress for you" );
 
register_saycmd"abuse"   ,"PrintText4"ADMIN_ALL"- Report Abuse" );
 
register_saycmd"website" ,"PrintText5"ADMIN_ALL"- Website" );
 
register_saycmd"playerhelper" ,"ShowMotd"ADMIN_ALL"- Opens The Player Helper MOTD" );
 
register_clcmd("say""handle_say")
 
register_cvar("amx_contactinfo"CONTACTFCVAR_SERVER)
}
public 
PrintTextid )
{
 new 
steamid[32];
 
get_user_authididsteamid_charsmaxsteamid ) );
 
client_printidprint_chat"[AMXX] Your Steam ID is %s" steamid );
 return 
PLUGIN_HANDLED;
}
public 
PrintText2id )
{
 new 
ip[32];
 
get_user_ipidip_charsmaxip ) );
 
client_print (idprint_chat"[AMXX] Your IP Adress is %s" ip );
 return 
PLUGIN_HANDLED;
}
public 
PrintText3id )
{
 new 
serverip[128];
 
get_pcvar_stringp_serveripserverip_charsmaxserverip ) );
 
client_printidprint_chat"[AMXX] This Server IP is %s" serverip );
 return 
PLUGIN_HANDLED;
}
public 
PrintText4(id)
{
 new 
email[128];
 
get_pcvar_stringp_emailemail_charsmaxemail ) );
 
client_printidprint_chat"[AMXX] The Admins Email is %s" email );
 return 
PLUGIN_HANDLED;
}
public 
PrintText5(id)
{
 new 
website[128];
 
get_pcvar_stringp_clanwebsitewebsite_charsmaxwebsite ) );
 
client_printidprint_chat"[AMXX] The Clans Website is %s" website );
 return 
PLUGIN_HANDLED;
}
public 
client_putinserver(id

 
set_task(float(get_pcvar_num(p_advertisetime)),"advertise",id
}  
public 
client_disconnect(id)
{
 
remove_task(id)
}
public 
advertise(id)
{
 if (!
is_user_connected(id)) return
 
client_print(idprint_chat"[AMXX] Say /playerhelper to Open Up The PlayerHelper MOTD")
}
public 
ShowMotd(id)
{
 
show_motd(id"PlayerHelper.txt")
}
public 
print_adminlist(user
{
 new 
adminnames[33][32]
 new 
message[256]
 new 
contactinfo[256], contact[112]
 new 
idcountxlen
 
 
for(id id <= maxplayers id++)
  if(
is_user_connected(id))
   if(
get_user_flags(id) & ADMIN_CHECK)
    
get_user_name(idadminnames[count++], 31)
 
len format(message255"%s ADMINS ONLINE: ",COLOR)
 if(
count 0) {
  for(
count x++) {
   
len += format(message[len], 255-len"%s%s "adminnames[x], < (count-1) ? ", ":"")
   if(
len 96 ) {
    
print_message(usermessage)
    
len format(message255"%s ",COLOR)
   }
  }
  
print_message(usermessage)
 }
 else {
  
len += format(message[len], 255-len"No admins online.")
  
print_message(usermessage)
 }
 
 
get_cvar_string("amx_contactinfo"contact63)
 if(
contact[0])  {
  
format(contactinfo111"%s Contact Server Admin -- %s"COLORcontact)
  
print_message(usercontactinfo)
 }
}
print_message(idmsg[]) {
 
message_begin(MSG_ONEgmsgSayText, {0,0,0}, id)
 
write_byte(id)
 
write_string(msg)
 
message_end()
}
public 
handle_say(id) {
 new 
said[192]
 
read_args(said,192)
 if( ( 
containi(said"who") != -&& containi(said"admin") != -) || contain(said"/admin") != -)
  
set_task(0.1,"print_adminlist",id)
 return 
PLUGIN_CONTINUE
}
stock register_saycmd(saycommand[], function[], flagsinfo[])
{
 new 
temp[64];
 
format(temp63"say /%s"saycommand);
 
register_clcmd(temp, function, flagsinfo);
 
format(temp63"say .%s"saycommand);
 
register_clcmd(temp, function, flagsinfo);
 
format(temp63"say_team /%s"saycommand);
 
register_clcmd(temp, function, flagsinfo);
 
format(temp63"say_team .%s"saycommand);
 
register_clcmd(temp, function, flagsinfo);
 
format(temp63".%s"saycommand);
 
register_clcmd(temp, function, flagsinfo);
 
format(temp63"/%s"saycommand);
 
register_clcmd(temp, function, flagsinfo);

Attached Files
File Type: txt PlayerHelper.txt (893 Bytes, 214 views)
File Type: sma Get Plugin or Get Source (PlayerHelper.sma - 853 views - 4.7 KB)
__________________


Last edited by Reaper2331; 09-28-2007 at 23:41.
Reaper2331 is offline
Send a message via AIM to Reaper2331 Send a message via MSN to Reaper2331 Send a message via Yahoo to Reaper2331
Xtreme-Coder
Member
Join Date: Oct 2006
Location: Scripting Amxx
Old 09-24-2007 , 20:58   Re: Player Info 1.0
Reply With Quote #2

Good job reaper the code is clean and easy to read your getting better at coding, keep it up!
__________________
[IMG]http://img511.**************/img511/4757/xtremecoderfc8.png[/IMG]

|[ Current Projects ]|

Musical Jukebox [||||||||||||] (50 %)

Party Mod [||||||||||||] (20 %)
Xtreme-Coder is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 09-24-2007 , 20:59   Re: Player Info 1.0
Reply With Quote #3

If it's not a problem, I'd suggest you change the name of this plugin, because it's pretty close to this one and that would avoid some confusion.

Again, only a suggestion...
__________________
M249-M4A1 is offline
Reaper2331
Veteran Member
Join Date: Nov 2006
Location: Columbus,Ohio
Old 09-24-2007 , 21:02   Re: Player Info 1.0
Reply With Quote #4

lol, ok thanks i just dont know what i should make it maybe /steamid ?
__________________

Reaper2331 is offline
Send a message via AIM to Reaper2331 Send a message via MSN to Reaper2331 Send a message via Yahoo to Reaper2331
Xtreme-Coder
Member
Join Date: Oct 2006
Location: Scripting Amxx
Old 09-24-2007 , 21:05   Re: Player Info 1.0
Reply With Quote #5

Quote:
Originally Posted by Reaper2331 View Post
lol, ok thanks i just dont know what i should make it maybe /steamid ?
lol, thats fine or maybe something like Player Helper as long as it doesent pertain the same name as the other plugin.
__________________
[IMG]http://img511.**************/img511/4757/xtremecoderfc8.png[/IMG]

|[ Current Projects ]|

Musical Jukebox [||||||||||||] (50 %)

Party Mod [||||||||||||] (20 %)
Xtreme-Coder is offline
Reaper2331
Veteran Member
Join Date: Nov 2006
Location: Columbus,Ohio
Old 09-24-2007 , 21:08   Re: /steamid 1.0
Reply With Quote #6

i think ill switch it to Player Helper
__________________

Reaper2331 is offline
Send a message via AIM to Reaper2331 Send a message via MSN to Reaper2331 Send a message via Yahoo to Reaper2331
Old 09-24-2007, 21:19
Da_sk8rboy
This message has been deleted by Da_sk8rboy.
Old 09-24-2007, 21:21
Da_sk8rboy
This message has been deleted by Hawk552. Reason: what
Reaper2331
Veteran Member
Join Date: Nov 2006
Location: Columbus,Ohio
Old 09-24-2007 , 21:33   Re: Player Helper 1.0
Reply With Quote #7

thanks
__________________

Reaper2331 is offline
Send a message via AIM to Reaper2331 Send a message via MSN to Reaper2331 Send a message via Yahoo to Reaper2331
Old 09-25-2007, 18:22
Reaper2331
This message has been deleted by Reaper2331.
Reaper2331
Veteran Member
Join Date: Nov 2006
Location: Columbus,Ohio
Old 09-26-2007 , 20:49   Re: Player Helper 1.1 (UPDATE!)
Reply With Quote #8

Player Helper 1.1 (UPDATE!)
__________________

Reaper2331 is offline
Send a message via AIM to Reaper2331 Send a message via MSN to Reaper2331 Send a message via Yahoo to Reaper2331
Zenith77
Veteran Member
Join Date: Aug 2005
Old 09-27-2007 , 07:56   Re: Player Helper 1.1 (UPDATE!)
Reply With Quote #9

I don't find this in any way useful. Other plugins can provide this functionaility (Auto responding, advertising, MOTDs, etc). Unapproved.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Reaper2331
Veteran Member
Join Date: Nov 2006
Location: Columbus,Ohio
Old 09-27-2007 , 15:48   Re: Player Helper 1.1 (UPDATE!)
Reply With Quote #10

this isnt finished yet, im adding more commands like
/admin to see online admins
/record and /demo to start a demo example: /demo Reaper2331 will record a demo named Reaper2331

Zenith im sorry you dont find this useful but maybe other people do?
i know Xtreme-Coder put this plugin in his server the moment i released it
__________________

Reaper2331 is offline
Send a message via AIM to Reaper2331 Send a message via MSN to Reaper2331 Send a message via Yahoo to Reaper2331
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 14:19.


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