Русское сообщество по скриптингу

[LU] Info Player: collect player names

Scripting help for english speaking users. While not very active, you still have a chance to get help here.
Правила форума
We cannot maintain english version version of our forum rules, but shortly (it's simple) - Don't be a dick. If you really want to know our rules you should check appropriate thread.

[LU] Info Player: collect player names

Сообщение LuXo KING Gaming » 22 апр 2018, 04:57

Hi i want help in this program i do not appreciate i can fix it to be the best you can help me in this topic or what
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, "<" ) != -)
                    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
Аватара пользователя
LuXo KING Gaming
 
Сообщения: 1
Зарегистрирован: 15 дек 2017, 01:45
Благодарил (а): 0 раз.
Поблагодарили: 0 раз.
Языки программирования: Counter-Strike 1.6

Re: info players

Сообщение Subb98 » 22 апр 2018, 10:10

Hello, LuXo KING Gaming. Please change the topic's title to more informative. If you don't do within 24 hours, I'll do it myself, but in this case you'll receive a warning in the profile.
«Очень хорошо. Лучше вы, чем я» © Donald J. Trump
Аватара пользователя
Subb98
Модератор
 
Сообщения: 5485
Зарегистрирован: 24 мар 2011, 19:42
Откуда: г. Пермь
Благодарил (а): 1329 раз.
Поблагодарили: 2343 раз.
Опыт программирования: Больше трех лет
Языки программирования: PHP


Вернуться в Scripting

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 8