I can add the name of the player in the script like
i can't Add info Nick Onpe PlayerInfoMenu Hud
- Код: Выделить всё
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <zombieplague>
public plugin_init() {
register_plugin("[LU] Info Player", "4.0", "LuXo KING Gaming")
register_clcmd("say /info","PlayerInfoMenu")
register_clcmd("say_team /info","PlayerInfoMenu")
register_clcmd("say info","PlayerInfoMenu")
register_clcmd("say_team info","PlayerInfoMenu")
}
public PlayerInfoMenu(id)
{
new name[32]; get_user_name(id, name, 31)
new userid[32]; get_user_authid(id,userid,31)
new userip[32];get_user_ip(id,userip,31,1)
new health = get_user_health(id)
new armor = get_user_armor(id)
new ammo = zp_get_user_ammo_packs(id)
set_hudmessage(random(0), random(255), random(0), 0.02, 0.19, 1, 1.0, 1.0, 0.1, 0.1)
show_hudmessage(id, "Nick: %s^nHave health: %d ^nHave Armor: %d ^nHave Packs: %d ^nSteamid: %s ^nIP: %s",name,health,armor,ammo,userid,userip)
}
I want to fix our Dean this other program means I want to add the name of the player such a program to my list means in my program and thank you
- Код: Выделить всё
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
native zp_get_user_points ( id )
native zp_set_user_ammo_packs( id )
new PLUGIN[] = "Info Players"
new VERSION[] = "1.2"
new AUTHOR[] = "Athix"
new iMaxPlayers;
new Count;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say","handle_say")
iMaxPlayers = get_maxplayers()
}
public client_putinserver(id)
{
Count++
}
public client_disconnect(id)
{
Count--
}
public handle_say(id)
{
static Args[15]
read_args(Args, 14)
remove_quotes(Args)
if(Args[0] == '/' && containi(Args, "info") != -1)
{
new motd[1501],len;
len = format(motd, sizeof motd - 1,"<body bgcolor=#000000><font color=#fff000><pre>");
len += format(motd[len], (sizeof motd - 1) - len,"<center><h2>---- Info Players ----</h2></center>^n^n");
len += format(motd[len], (sizeof motd - 1) - len,"%-22.22s %8s %7s %6s^n", "Nick", "Health", "Ponits", "Ammo Packs");
for(new x = 1; x <= iMaxPlayers; x++)
{
if(is_user_connected(x))
{
new Name[33]
get_user_name(x, Name, 32)
if(containi (Name, "<" ) != -1 )
replace(Name, 32, "<", "" )
len += format(motd[len], (sizeof motd - 1) - len,"^n%-22.22s %5i %8i %7i", Name, get_user_health(x), zp_get_user_points(x), zp_set_user_ammo_packs(x))
}
}
len += format(motd[len], (sizeof motd - 1) - len,"^n^n<font color=#fe9a2e><b><center>Total Players: %8i </center>", Count);
len += format(motd[len], (sizeof motd - 1) - len,"^n^n^n<font color=##00ff00><b><center>By Athix</center>^n");
show_motd(id,motd, "Info Players");
}
}
Uninformative title of topic (fixed) // Subb98