AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   my playername plugin isn't compiling :( (https://forums.alliedmods.net/showthread.php?t=55601)

GoPostal 05-25-2007 17:18

my playername plugin isn't compiling :(
 
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 



regalis 05-25-2007 19:29

Re: my playername plugin isn't compiling :(
 
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

GoPostal 05-25-2007 19:34

Re: my playername plugin isn't compiling :(
 
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 ?

regalis 05-25-2007 19:40

Re: my playername plugin isn't compiling :(
 
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

GoPostal 05-25-2007 20:08

Re: my playername plugin isn't compiling :(
 
I am a noob with amx coding that string i added was on accident lol. How do i take out the hud_centerid ?

regalis 05-25-2007 20:16

Re: my playername plugin isn't compiling :(
 
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

Drak 05-26-2007 00:29

Re: my playername plugin isn't compiling :(
 
Quote:

Originally Posted by regalis (Post 480609)
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.

regalis 05-26-2007 08:10

Re: my playername plugin isn't compiling :(
 
Hmm...strange, i searched even with google but found nothing about it...
But you are right its in VENs fakemeta_util.inc :)

greetz regalis


All times are GMT -4. The time now is 10:36.

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