Raised This Month: $ Target: $400
 0% 

my playername plugin isn't compiling :(


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GoPostal
Junior Member
Join Date: Apr 2007
Old 05-25-2007 , 17:18   my playername plugin isn't compiling :(
Reply With Quote #1

I want to disable the blue and red text on the player model for admins only.





PHP Code:
/* 
NoName
By JohN
commands: amx_noname  <user>
          amx_playername <user>
Takes away player's user id

*/ 

#include <amxmodx> 
#include <amxmisc>
#include <fun>
#include <find>

new bool:noname[33]

public 
client_connect(id) { 
   
noname[id]=false 


public 
client_disconnect(id) { 
   
noname[id]=false 
}

public 
admin_noname(id,level,cid) { 
   if (!
cmd_access(id,level,cid,2)) { 
      return 
PLUGIN_HANDLED 
   


   new 
victim[32
   
read_argv(1,victim,31

   new 
admin[32
   
get_user_name(id,admin,31

   new 
playerList[32]

   new 
playerListSize find_players_fit(id,victim,playerList,ALLOW_SELF|MUST_BE_ALIVE//returns number of players matching arguments, while setting the array

   
for (new i=0i<playerListSizei++){
    
noname[playerList[i]]=true
    fm_find_ent
(-1,"player")
   }

   return 
PLUGIN_HANDLED 


public 
admin_playername(id,level,cid) { 
   if (!
cmd_access(id,level,cid,2)) { 
      return 
PLUGIN_HANDLED 
   


   new 
victim[32
   
read_argv(1,victim,31

   new 
admin[32
   
get_user_name(id,admin,31
   new 
playerList[32]

   new 
playerListSize find_players_fit(id,victim,playerList,ALLOW_SELF|MUST_BE_ALIVE//returns number of players matching arguments, while setting the array

   
for (new i=0i<playerListSizei++){
    
noname[playerList[i]]=false
    fm_find_ent
(0,"player")"
   }

   return PLUGIN_HANDLED 


public player_death() 

   new id = read_data(2)      
   noname[id]=false
   fm_find_ent(0,"
player")"
   
return PLUGIN_HANDLED 


public 
plugin_init() { 
   
register_plugin("playername","0.2","JohN"
   
register_concmd("amx_noname","admin_noname",ADMIN_RCON,"Gives player noname"
   
register_concmd("amx_playername","admin_playername",ADMIN_RCON,"Takes away noname"

   
register_event("DeathMsg""player_death""a"

   return 
PLUGIN_CONTINUE 

GoPostal 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 10:36.


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