Jump to content
Dan

State Add/Rem Timer

Recommended Posts

Is there a way to make the effects shut off instantly/ remove instantly when item is taken off from slot ? in inventory, atm an item I use on 5th slot takes about 2 seconds for the effect to be turned off and have its state rem.


Nissan-GT-R.gif

Share this post


Link to post
Share on other sites
On 13/01/2018 at 5:50 PM, Vang said:

Is there a way to make the effects shut off instantly/ remove instantly when item is taken off from slot ? in inventory, atm an item I use on 5th slot takes about 2 seconds for the effect to be turned off and have its state rem.

If you've already set the RemoveState to remove the effect in case there's no item of determined ID on the 5th slot (which I think so as it disappears 2 seconds after, else it would take the whole state time) - you've most likely overloaded your char_timer, so it takes a while to actually remove the state. Also, this delays are quite common in TOP tbh. xD

My recommendations in case your cha_timer is overloaded: Use memory caching for table.load (in case you have any table.load in your cha_timer); Make sure you're only running this sort of scripts in actual players (IsPlayer(role) == 1 then...); Use player_timer for this sort of effects; Always rework your code when you feel like it's possible to optimize even more; and it goes... hehehe

Edited by Faller
  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, KONG said:

or do it like wings/fairies/swings.
This is all client side work but it is sufficient and an elegant solution.
It is known as the ItemFace(s).

You mean be Kong? Cmon! We're not in that level.. :(

Share this post


Link to post
Share on other sites
4 minutes ago, KONG said:

or do it like wings/fairies/swings.
This is all client side work but it is sufficient and an elegant solution.
It is known as the ItemFace(s).

Oh wait, did I read it right? Is it all client-side? lol

Doesn't it require server-side changes?
I mean, if anyone can edit it in their client, anyone would be able to modify their clients and make the items in their inventory give attributes.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...