Raised This Month: $ Target: $400
 0% 

set_task


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Trickzz
Member
Join Date: Jun 2011
Old 06-23-2011 , 18:03   set_task
Reply With Quote #1

How do I show StatusIcon when FirstKill = false; for 5 seconds, and give player red glow, for 5 seconds.

PHP Code:
new g_IconStatus 
PHP Code:
    register_forward(FM_PlayerPreThink"Pre_Think")
    
g_IconStatus get_user_msgid("StatusIcon"
PHP Code:
public DeathMsg()
{
    new 
killer read_data(1)
    if(
FirstKill){     
        
zp_set_user_ammo_packs(killerzp_get_user_ammo_packs(killer) + get_pcvar_num(g_Money));
                
FirstKill false
    }
}

public 
Pre_Think(id)
{
    if (!(
pev(id,pev_button) & FL_ONGROUND))
    {    
        
message_begin(MSG_ONE_UNRELIABLEg_IconStatus, {0,0,0}, id)
        
write_byte(1)
        
write_string("dmg_shock")
        
write_byte(0)
        
write_byte(255)
        
write_byte(0)
        
message_end()
    }   

Trickzz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-23-2011 , 18:44   Re: set_task
Reply With Quote #2

The answer is your title.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Trickzz
Member
Join Date: Jun 2011
Old 06-24-2011 , 03:58   Re: set_task
Reply With Quote #3

I know what you need to use the set_task
but I do not know how to arrange and deliver all; (
Trickzz is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-24-2011 , 05:31   Re: set_task
Reply With Quote #4

For glow:
  • set glow
  • set task for 5.0 seconds
  • remove glow in task function

I don't know anything abot StatusIcon.
__________________
fysiks is offline
Trickzz
Member
Join Date: Jun 2011
Old 06-24-2011 , 05:43   Re: set_task
Reply With Quote #5

I need to Glow enable after the first murder, and was given a killer

And here's information about statusitson: https://forums.alliedmods.net/showthread.php?t=52529

I do not know how to run the function, namely a function to start and how to turn it off then
Trickzz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-24-2011 , 09:41   Re: set_task
Reply With Quote #6

You do the glow just like the statusicon.
When the first kill is made, then give the glow and show the statusicon.
Set a task for 5.0 seconds.
When that task runs, remove glow and then hide the statusicon.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Trickzz
Member
Join Date: Jun 2011
Old 06-24-2011 , 10:10   Re: set_task
Reply With Quote #7

How to write a function set_task?
PHP Code:
public What the court to enter?()
{
           
set_task("5""What the court to enter?")

Trickzz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-24-2011 , 11:37   Re: set_task
Reply With Quote #8

http://www.amxmodx.org/funcwiki.php?...task&go=search
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
!Morte
Veteran Member
Join Date: May 2010
Old 06-24-2011 , 11:37   Re: set_task
Reply With Quote #9

Quote:
Originally Posted by Trickzz View Post
How to write a function set_task?
PHP Code:
public What the court to enter?()
{
           
set_task("5""What the court to enter?")

Why you don't look in amxmodx.inc?

PHP Code:
/* Calls function on specified time.
* Flags:
* "a" - repeat.
* "b" - loop task.
* "c" - do task on time after a map timeleft.
* "d" - do task on time before a map timelimit. */
native set_task(Float:time,const function[],id 0,const parameter[]="",len 0,const flags[]=""repeat 0); 
__________________
First Zombie Class
[ZP] Zombie Class: Houndeye Zombie
Quote:
Originally Posted by lucas_7_94 View Post
tenes que saber pawn antes de intentar hacer algo digno.
!Morte is offline
Send a message via MSN to !Morte Send a message via Skype™ to !Morte
Trickzz
Member
Join Date: Jun 2011
Old 06-24-2011 , 12:15   Re: set_task
Reply With Quote #10

so as to run it, Iknow! Here's how to start after the first murder?

Can you show?
Trickzz is offline
Old 06-24-2011, 12:55
alfre
This message has been deleted by Exolent[jNr]. Reason: Off topic.
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:43.


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