If you have a question on something that could be solved with a function,
then the first you should do is to search in the AMXModX FuncWiki. Only
if you really find nothing you may ask here. That would help you to prevent
that much negative Karma and in this case it would result in this:
http://www.amxmodx.org/funcwiki.php?go=func&id=837
If you now say that it will not work then that is probably because you did
not say for what modification you want to write your plugin. But as you make
a really mindless impression on me I guess that it shall be for Counter-Strike.
However, keep this in mind:
http://www.amxmodx.org/funcwiki.php
So if you now want to know how to make that delay of 5 seconds, think
of what could that be called in the english language. It is possible that you
have to try some words and read through some stuff before you reach the
function which you need, but after some tries you enter "task":
http://www.amxmodx.org/funcwiki.php?...task&go=search
And you read: "set_task". Now that sounds really encouraging, doesn't it?
And then you click it and read an wooooooooooooooooooosh:
http://www.amxmodx.org/funcwiki.php?go=func&id=253
It is what you want, isn't it? And after some more research you arrive at this point:
Code:
#include <amxmodx>
#include <cstrike>
public plugin_init()
{
register_plugin("Revive","1.0","TheGreatAuthor")
register_event("DeathMsg", "hook_death", "a")
}
public hook_death()
{
new Dead_Guys_ID=read_data(2)
set_task(5.0,"revive_him",Dead_Guys_ID)
}
public revive_him(Dead_Guys_ID)
{
cs_user_spawn(Dead_Guys_ID)
}
So simple, isn't it?
__________________