Hi, I was wondering how I could show a sprite above a players head for about 2 seconds. I saw in another plugins code they did the same thing. I need to know how to make the sprite show for only 2 seconds though. Here is the code from the other plugin...
Code:
public showspr(id){
if(!is_user_connected(id) || !is_user_alive(id)) return PLUGIN_HANDLED
new i
new players = get_maxplayers()
message_begin(MSG_ALL,SVC_TEMPENTITY)
write_byte(125)
write_byte(id)
message_end()
for (i = 0 ; i < players ; i++)
{
if(i != id && is_user_connected(i))
{
message_begin(MSG_ONE_UNRELIABLE,SVC_TEMPENTITY,{0,0,0},i)
write_byte(124)
write_byte(id)
write_coord(65)
write_short(spritename)
write_short(9)
message_end()
}
}
set_task(0.8,"showspr",id)
return PLUGIN_CONTINUE
}