Jump to content
  • 0

Pro devs can help me about loop?


rans

Question


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  429
  • Reputation:   60
  • Joined:  08/19/12
  • Last Seen:  

Hi there,

I have a while loop script in my item. that loop will check every second if the player's map has a mapflag of pvp. if yes it will be taken off.
anyway i did this cause item_noequip does not automatically take off equipment or nullify it if u just hit @pvpon it need to rewarp or manually take off the item in order to take the restriction... anyway the real issue here is 

if all of my player is wearing that item with loop script. will it cause Lag or server failure on my server?

Ty in advance for enlightening me.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   24
  • Joined:  02/11/16
  • Last Seen:  

Why not just create a hidden function that will check the players' equipment every X minute(s)? I think that would be better and more effective. 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  429
  • Reputation:   60
  • Joined:  08/19/12
  • Last Seen:  

Why not just create a hidden function that will check the players' equipment every X minute(s)? I think that would be better and more effective. 

I already did that. 

and its already working. im just wondering if all of my players are wearing with this loop script to check every seconds. will it cause server issues or lag on my server?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

It will cause lag issues if there's too many players.

It would be better if you activate the pvp first before warping anyone inside. That way it is better.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   24
  • Joined:  02/11/16
  • Last Seen:  

 

Why not just create a hidden function that will check the players' equipment every X minute(s)? I think that would be better and more effective. 

I already did that. 

and its already working. im just wondering if all of my players are wearing with this loop script to check every seconds. will it cause server issues or lag on my server?

 

If there are only few people wearing it, I think that would be fine. I also do not think it will cause lag or any issue to your server. In my server, I have so many hidden functions to check cheaters and random rewards and bonuses and I do not experience any problem (I used to have 850+ players)

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  429
  • Reputation:   60
  • Joined:  08/19/12
  • Last Seen:  

Hi thank you guys for advice. for now i will be observing it.

Link to comment
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
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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...