Raised This Month: $ Target: $400
 0% 

Vips_motd


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Plug me up
Member
Join Date: Aug 2008
Old 01-18-2009 , 14:35   Vips_motd
Reply With Quote #1

Hi, first of all, I'M NOT A "CODDER!"
unfortunately, i dont hav the codding academy knowledge but i aways do some changes in some codes (not a pro, but not a totally noob)

here's the thing, i edited all of admins_motd from fakenick but one thing is killing me.

i need that the motd shows all players with "ADMIN_LEVEL_D" but unfortunately i dont know how. can you help me?



Code:
#include <amxmodx>
#include <amxmisc>
//To retrieve maxplayers
new g_maxplayers
//enum
enum
{
 TASK_INFO = 100
}
//Version information
new const VERSION[] = "1.0"
public plugin_init()
{
 register_plugin("Active vipsins MOTD", VERSION, "FakeNick")
 
 //Dictionary
 register_dictionary("vipsm.txt")
 
 //logevent
 register_logevent("logevent_round_start",2,"1=Round_Start")
 
 //Only to recognize, which sever is using this plugin
 register_cvar("vipsins_motd_version",VERSION,FCVAR_SERVER | FCVAR_SPONLY)
 
 //Say commands
 //register_clcmd("say !vipsins","func_vipsins")
 //register_clcmd("say_team !vipsins","func_vipsins")
 register_clcmd("say vips","func_vipsins")
 register_clcmd("say_team vips","func_vipsins")
 register_clcmd("say /vips","func_vipsins")
 register_clcmd("say_team /vips","func_vipsins")
 
 //Maxplayers information
 g_maxplayers = get_maxplayers()
}
public logevent_round_start()
{
 //Show info
 //client_print(0,print_chat,"%L",LANG_PLAYER,"INFO_COMMANV")
 
 //Rmeove old task and make a new one
 remove_task(TASK_INFO)
 //set_task(60.0,"logevent_round_start",TASK_INFO)
}
public func_vipsins(id)
{
 //Some common variables
 static vmotd[1000],vheader[100],name[32],vlen,vi,vcounter
 vlen = 0
 vcounter = 0
 
 //Format bg and font colors
 vlen += formatex(vmotd[vlen],sizeof vmotd - 1 - vlen,"%L",id,"MOTD_2")
 
 //Format MOTD header
 formatex(vheader,sizeof vheader - 1,"%L",id,"MOTD_HEADV")
 
 //Check for vipsins
 for(vi = 1; vi <= g_maxplayers;vi++)
 {
  //If player is vipsin...
  if(cmd_access(vi,ADMIN_LEVEL_D))
  {
   //...increase counter...
   vcounter++
   
   //...retrieve vipsin name...
   get_user_name(vi,name,sizeof name - 1)
   
   //...add vipsin to MOTD
   vlen += formatex(vmotd[vlen],sizeof vmotd - 1 - vlen,"&nbsp %d. <b>%s</b><br>",vcounter,name)
  }
 }
 
 //Finally, show MOTD
 show_motd(id,vmotd,vheader)
 
}
__________________
always +karma to thoose who helps
Plug me up is offline
 



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 01:42.


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