Jump to content
  • 0

check if map contains player


Question

Posted

hello guys, I'm trying to make a condition to check if there is a player on the map, but the condition enters an infinite loop, I need the NPC to show a waitingroom if there is a player on the map and another if there is no player on the map, but it has to be in real time

 

do{waitingroom "PvP in progress",0;}while(getareausers("force_4-1",86,113,113,86) > 0)

 

3 answers to this question

Recommended Posts

  • 0
Posted
OnInit:
OnTimer1000:
	initnpctimer;
	delwaitingroom;
	waitingroom "Status: "+( (getmapusers(.yourmap$) == 0)?"No Player":"Having Player"),0;
	end;

avoid using those infinite while(1) tricks... its not resource friendly...

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...