AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   hud message (https://forums.alliedmods.net/showthread.php?t=158977)

BudaB 06-11-2011 10:10

hud message
 
How to call up hud message while this day is chosen & to hide that message when round time is 0:00 or it starts a new round?

Code:

case DAY_GUN:
            {
                if(IsPlayer(i) && is_user_alive(i))
                {
                    switch(cs_get_user_team(i))
                    {
                        case CS_TEAM_T:
                        {
                            strip_weapons(i)
 
                            give_item(i, "weapon_deagle")
                            give_item(i, "weapon_m4a1")
                            give_item(i, "weapon_awp")
                         
                            cs_set_user_bpammo(i, CSW_DEAGLE, 35)
                            cs_set_user_bpammo(i, CSW_M4A1, 90)
                            cs_set_user_bpammo(i, CSW_AWP, 40)
                        }
                     
                        case CS_TEAM_CT:
                        {
                            strip_weapons(i)
 
                            give_item(i, "weapon_deagle")
                            give_item(i, "weapon_m4a1")
                            give_item(i, "weapon_awp")
                         
                            cs_set_user_bpammo(i, CSW_DEAGLE, 35)
                            cs_set_user_bpammo(i, CSW_M4A1, 90)
                            cs_set_user_bpammo(i, CSW_AWP, 40)
                        }
                    }
                }
             
                #if defined USE_CC
                    ColorChat(0, RED, "%s Today is^x03 Gun Day,^x04!", PREFIX)
                #else
                    client_print(0, print_chat, "%s Siandien yra Ginklu diena!!", PREFIX)
                #endif
 
            }


This is code for round time 0:00 & new round.

Code:

public event_round_start()
{
....
        set_task(float(floatround(get_pcvar_float(g_pcvar_mp_roundtime) * 60.0, floatround_floor)), "time_is_up", TASK_ID)
}

public time_is_up()
{       
....
}



All times are GMT -4. The time now is 23:34.

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