help hud does not appear plugin reaction

Сообщения
13
Реакции
2
Hello I would like a help in this plugin the message is not appearing does anyone know the reason? and also the length of the message to 15 seconds

Код:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define IsPlayer(%1) (1 <= %1 <= g_players)

new g_players;

new const gReasons[][] = {

     "Horn",
     "Chicken thief",
     "Wanker",
     "Killer",
     "Drug dealer",
     "Illiterate",
     "Break in",
     "Smelly",
     "Slut",
     "sucker"

}

//set_hudmessage(255, 170, 0, -1.0, 0.72, 0, 3.0, 15.0)

new g_iReasons[33]

public plugin_init(){

    register_plugin("reasons", "1.0",  "amxbg");
    register_event("HLTV", "event_NewRound", "a", "1=0", "2=0")

    g_players = get_maxplayers();

}

public event_NewRound(id) {

    for(new i = 1; i <= g_players; i++) {

        if( is_user_connected( i ) && cs_get_user_team( i ) == CS_TEAM_T )  {     

             set_hudmessage(255, 170, 0, -1.0, 0.72, 0, 15.0, 1.0)

            show_hudmessage(i, "you are a %s !!", gReasons[ g_iReasons = random(sizeof(gReasons)) ])

        }

    }

}
25 Ноя 2020
some moderator can delete this post I put it in the wrong place sorry
 
Сообщения
165
Реакции
-8
zetsu,
Код:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define IsPlayer(%1) (1 <= %1 <= g_players)

new g_players;

new const gReasons[10][] = {
    
    "Horn",
    "Chicken thief",
    "Wanker",
    "Killer",
    "Drug dealer",
    "Illiterate",
    "Break in",
    "Smelly",
    "Slut",
    "sucker"
    
}

public plugin_init(){
    
    register_plugin("reasons", "1.0",  "amxbg");
    register_event("HLTV", "event_NewRound", "a", "1=0", "2=0")
    
    g_players = get_maxplayers();
    
}

public event_NewRound(id) set_task(1.0, "Hud_Msg", id)

public Hud_Msg(){
    
    new randomMsg = random_num(0, charsmax(gReasons)-1)
    
    for(new i = 1; i <= g_players; i++) {
        
        if( is_user_connected( i ) && cs_get_user_team( i ) == CS_TEAM_T )  {     
            
            set_hudmessage(255, 170, 0, -1.0, 0.72, 0, 15.0, 1.0)
            
            show_hudmessage(i, "you are a %s !!", gReasons[randomMsg][10])
            
        }
        
    }
    
}
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу