AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Task in the some public (https://forums.alliedmods.net/showthread.php?t=74245)

AntiBots 07-14-2008 18:52

Task in the some public
 
Is a player do something then of 0.8 second show a MsG,
I do with task, but I want to put the MsG in the same public that the Action. :D

Sn!ff3r 07-14-2008 22:45

Re: Task in the some public
 
Show code.

AntiBots 07-15-2008 17:17

Re: Task in the some public
 
PHP Code:

public playerDeath()
{
        new 
killer read_data(1)
        new 
victim read_data(2)
        new 
weapon[8]
        
read_data(4weapon7)
 
        if (
get_pcvar_num(hehud) && killer != victim && equal(weapon"grenade"))
   
set_task(0.5,"hesound")
  
  if (
get_pcvar_num(knifehud) && killer != victim && equal(weapon"knife"))
   
set_task(0.5,"knifesound")
}
public 
hesound()
{
    
client_cmd(0"spk misc/rey_killgrenade")
 
set_hudmessage(8542255, -1.0, -1.006.05.0)
 
show_hudmessage(0"GRANADAZO")
}
public 
knifesound()
{
    
client_cmd(0"spk misc/rey_fakazo.wav")
 
set_hudmessage(8542255, -1.0, -1.006.05.0)
 
show_hudmessage(0"FAKAZO")


I want to put all in one.

jim_yang 07-15-2008 21:36

Re: Task in the some public
 
why you need a 0.5s delay, just play the sound and show the message in playerdeath()

AntiBots 07-15-2008 21:37

Re: Task in the some public
 
Because the player canīt lisen well the sound.


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

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