Raised This Month: $ Target: $400
 0% 

my playername plugin isn't compiling :(


Post New Thread Reply   
 
Thread Tools Display Modes
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
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-25-2007 , 19:29   Re: my playername plugin isn't compiling :(
Reply With Quote #2

Where do you get that plugin from?
I found the include in a very old thread...
Do you have find.inc??
That include is required to compile that code...

the next problem is: what is fm_find_ent() ?
Never saw that and i found nothing about that..0o

greetz regalis
__________________
regalis is offline
GoPostal
Junior Member
Join Date: Apr 2007
Old 05-25-2007 , 19:34   Re: my playername plugin isn't compiling :(
Reply With Quote #3

I really don't know what i am doing, I took someone elses plugin and tried to make my own. And no i do not have the find.inc in my include dir.

Update: found the find.inc thanks for the tip, do you know the command to turn off the red and blue text on the player model ?

Last edited by GoPostal; 05-25-2007 at 19:39.
GoPostal is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-25-2007 , 19:40   Re: my playername plugin isn't compiling :(
Reply With Quote #4

Hehe, you can get it here: http://forums.alliedmods.net/showthread.php?t=7986
For the fm_find_ent "native" i found nothing...it seems that this is a special function which is not included in the sourcecode you provided...but im not sure.

greetz regalis
__________________
regalis is offline
GoPostal
Junior Member
Join Date: Apr 2007
Old 05-25-2007 , 20:08   Re: my playername plugin isn't compiling :(
Reply With Quote #5

I am a noob with amx coding that string i added was on accident lol. How do i take out the hud_centerid ?
GoPostal is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-25-2007 , 20:16   Re: my playername plugin isn't compiling :(
Reply With Quote #6

Hmm, don't realy know...
in config.cfg is this hud_centerid "1"
Then i think you can do that:
Code:
client_cmd(id, "hud_centerid 0")
But that would only print the nickname blow the center (i think)
I don't know how to disable the playername on aiming...
Maybe someone knows how to do that!?
Would be interessting for me too! ;)

greetz regalis
__________________
regalis is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 05-26-2007 , 00:29   Re: my playername plugin isn't compiling :(
Reply With Quote #7

Quote:
Originally Posted by regalis View Post
For the fm_find_ent "native" i found nothing...it seems that this is a special function which is not included in the sourcecode you provided...but im not sure.

greetz regalis
It's VEN's FakeMeta utils thingy, there's a sticky somewhere for the include.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-26-2007 , 08:10   Re: my playername plugin isn't compiling :(
Reply With Quote #8

Hmm...strange, i searched even with google but found nothing about it...
But you are right its in VENs fakemeta_util.inc

greetz regalis
__________________
regalis 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 10:36.


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