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=0; i<playerListSize; i++){
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=0; i<playerListSize; i++){
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
}