set_task help

New Member
Joined
Aug 22, 2005
Messages
105
Best answers
0
is this the way how to make a set_task do unlimited loops?

Code:
new Flags
Flags="b"
set_task(0.5,"MyFunction",id,"",Flags)
-> i don't know which parameter i should enter ??
 
Project Manager
🌠 Staff
✔️ HL Verified
💻 Oldtimer
Joined
Nov 25, 2001
Messages
1,729
Best answers
0
b is correct for an infinite loop
 
New Member
Joined
Mar 18, 2005
Messages
14
Best answers
0
why do it that way. you can simplify it by doing.

Code:
set_task(0.5,"MyFunction",id,"","b")
 
New Member
Joined
Aug 22, 2005
Messages
105
Best answers
0
Jinto said:
why do it that way. you can simplify it by doing.

Code:
set_task(0.5,"MyFunction",id,"","b")
it gives me an error while compiling
anyway i just called the function again, solved

but i got another question

IF a player dies, i would like to call a function
i know its

Code:
public client_death(killer,victim,.......)
{
set_task(0.1,"undo",victim)
}
this simply doesnt wanna compile, pls help !
 
New Member
Joined
Mar 18, 2005
Messages
14
Best answers
0
Well I havn't done anything with amxx in a while but last I checked there was no Client_Death forward. You have to hook the DeathMsg event using register_event.
 
New Member
Joined
Aug 22, 2005
Messages
105
Best answers
0
Jinto said:
Well I havn't done anything with amxx in a while but last I checked there was no Client_Death forward. You have to hook the DeathMsg event using register_event.
eh and how u do that then with the deathMsg ?
i havent found any plugin that uses it yet, so i dunno how to use it :)

nvm guys i found it myself

Code:
register_event( "DeathMsg","dead","b")

public dead (id)
{
    new Victim = read_data(2)

    set_task(0.1,"dead_pall",Victim)
    return PLUGIN_HANDLED
}
EDIT: ok this part AGAIN doesn't work, anyone a suggestion about what is wrong?
 

Users who are viewing this thread

Top Bottom