Jump to content

Home

Infinite timer


alexx860

Recommended Posts

Posted

Hi!

How do you make a "timer" never finish? example :

ent->client->invulnerableTimer

How do you make the bubble never disappear? I tried

ent->client->invulnerableTimer = -1

or

ent->client->invulnerableTimer = 0

 

but no luck..

 

thanks in advance

alexx860 :)

Posted

My code is placed in g_cmds.c (I am modding for my clan and they want this "bubble protect" :D )

So do you know where is the best place for that who is updated constantly??

Posted

Lots of places would be fine I guess. You could put it into ClientThink_real() in g_active.c but someone who knows more might have a better idea.

 

There's a place there that says:

 

// don't think if the client is not yet connected (and thus not yet spawned in)
if (client->pers.connected != CON_CONNECTED && !isNPC) {
	return;
}

 

 

Put it next right after that.

 

BTW what's this everlasting timer for exactly? Why mark the time at all?

Posted
  alexx860 said:
If I don't specify the time, it seems to be 0 so the protect don't work (nothing happens)

seems to be 0? Just use it as a toggle then. IE set it to be 1 when it should active and to 0 when it shouldn't be.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...