experimental fix for hud sync issue
This commit is contained in:
parent
a504caac62
commit
d4c2bf154f
|
@ -78,6 +78,7 @@ new g_doubleKillId
|
|||
new g_friend[33]
|
||||
new g_firstBlood
|
||||
new g_channel[33]
|
||||
new g_main_sync
|
||||
|
||||
new g_MultiKillMsg[7][] =
|
||||
{
|
||||
|
@ -187,6 +188,8 @@ public plugin_init()
|
|||
register_event("23", "chickenKill", "a", "1=108", /*"12=106", */ "15=4")
|
||||
register_event("23", "radioKill", "a", "1=108", /*"12=294", */ "15=2")
|
||||
}
|
||||
|
||||
g_main_sync = CreateHudSyncObj()
|
||||
}
|
||||
|
||||
public plugin_cfg()
|
||||
|
@ -347,7 +350,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
|||
get_user_name(ts[0], tname, 31)
|
||||
|
||||
set_hudmessage(0, 255, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
show_hudmessage(0, "%s vs. %s", ctname, tname)
|
||||
ShowSyncHudMsg(0, g_main_sync, "%s vs. %s", ctname, tname)
|
||||
|
||||
play_sound("misc/maytheforce")
|
||||
}
|
||||
|
@ -438,7 +441,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
|||
replace(message, 127, "$kn", killer_name)
|
||||
|
||||
set_hudmessage(100, 100, 255, -1.0, 0.29, 0, 6.0, 6.0, 0.5, 0.15, -1)
|
||||
show_hudmessage(players[i], "%s", message)
|
||||
ShowSyncHudMsg(players[i], g_main_sync, "%s", message)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -926,6 +926,29 @@ native module_exists(const logtag[]);
|
|||
*/
|
||||
native next_hudchannel(player);
|
||||
|
||||
/**
|
||||
* Creates a HUD Synchronization Object. Create one of these
|
||||
* for each section of the screen that contains overlapping HUD messages.
|
||||
* For example, if you use both sides of the screen to display three messages
|
||||
* that can potentially overlap, each side counts as a synchronizable area.
|
||||
* You can then use ShowSyncHudMsg() to correctly synchronize displaying the
|
||||
* HUD message with any other messages potentially in its class. Note that this
|
||||
* does not yet do anything like reserve screen area, its sole purpose is to be
|
||||
* able to wipe an old message on an auto-channel and ensure that it will not
|
||||
* clear a message from another plugin.
|
||||
* The parameters are kept blank for future use.
|
||||
*/
|
||||
native CreateHudSyncObj(num=0, ...);
|
||||
|
||||
/**
|
||||
* Displays a synchronized HUD message. This will check that your
|
||||
* HUD object has its previous display on the screen cleared before
|
||||
* it proceeds to write another. It will only do this in the case
|
||||
* of that channel not having been cleared already.
|
||||
* Target can be 0 for all players or 1-get_maxplayers().
|
||||
*/
|
||||
native ShowSyncHudMsg(target, syncObj, const fmt[], ...);
|
||||
|
||||
//no
|
||||
native int3();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user