AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   show_hudmessage help (https://forums.alliedmods.net/showthread.php?t=129154)

P1raten 06-09-2010 14:17

show_hudmessage help
 
Why doesnt that work?
Code:

show_hudmessage( 0, "Combo:" g_multiKills[0] )
And how do i make so that only the player sees the hudmessage?

drekes 06-09-2010 14:35

Re: show_hudmessage help
 
PHP Code:

show_hudmessageid"Combo: %i"g_multiKills[0] ) 

id is the index of the player you want to show it to.

P1raten 06-09-2010 15:10

Re: show_hudmessage help
 
Cant figure out whats wrong here:

PHP Code:

#include <amxmodx>

#define VERSION        "1"

new bunnies

public plugin_init()
{
    
register_plugin("Bunnies"VERSION"P1raten")
}

public 
client_death(killervictimwpnindexhitplaceTK//Dont bother these.
{
    
bunnies++
    
set_hudmessage2001000, -1.00.301.05.00.10.2)
    
show_hudmessagekiller"Bunnies:"bunnies )



drekes 06-09-2010 15:32

Re: show_hudmessage help
 
PHP Code:

 show_hudmessage(killer"bunnies:"bunnies

:arrow:
PHP Code:

show_hudmessage(killer"bunnies: %i"bunnies


P1raten 06-09-2010 16:05

Re: show_hudmessage help
 
Is it possible to make the bunnies variable reset every round and be unique for each player?

fysiks 06-09-2010 16:09

Re: show_hudmessage help
 
Make an array. One cell for each player.

bunnies[33]

Then use it like: bunnies[killer]
Reset it for everybody when the new round starts or how ever/when ever you want.

P1raten 06-09-2010 16:38

Re: show_hudmessage help
 
I dont know HOW to reset it every round. :o

r4ndomz 06-09-2010 17:40

Re: show_hudmessage help
 
put this
PHP Code:

register_logevent"event_roundstart"2"0=World triggered""1=Round_Start" 

in plugin_init and then add
PHP Code:

public event_roundstart(id
{
    
bunnies[id] = 0


at the bottom.

fysiks 06-09-2010 18:23

Re: show_hudmessage help
 
Quote:

Originally Posted by r4ndomz (Post 1204465)
put this
PHP Code:

register_logevent"event_roundstart"2"0=World triggered""1=Round_Start" 

in plugin_init and then add
PHP Code:

public event_roundstart(id
{
    
bunnies[id] = 0


at the bottom.

No id is passed to that function btw. You have to loop through all players (or all indices of the array).

I've also never seen someone put "World triggered" in the filtering.


All times are GMT -4. The time now is 05:20.

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