Difference between revisions of "Getmapusers"

From Hercules Wiki
Jump to: navigation, search
(Created page with "=Syntax= getmapusers ("<map name>") =Description= Returns the amount of persons from the given guild that are on the given map. =Example= <pre> //Will set the @persons va...")
 
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
=Syntax=
+
==Syntax==
[[getmapusers]]  ("<map name>")
+
* '''getmapusers'''("Map_Name");
=Description=
+
==Description==
Returns the amount of persons from the given guild that are on the given map.
+
This function will return the number of users currently located on the specified
=Example=
+
map.
<pre>
+
 
//Will set the @persons variable to the amount of persons from the guild
+
It is often used in the PVP scripts to check if a PVP room is full of not,
//which ID's = 10 and are at prontera.
+
if the number returned it equal to the maximum allowed it will not let you
  set @persons,getMapGuildUsers("prontera",10);
+
enter.
</pre>
+
 
 +
==Example 1==
 +
 
 +
//This will ask the player what map they want to check that has players and return the value
 +
//of the players on the map
 +
[[input]] @map$;
 +
[[mes]] '''getmapusers'''(@map$);
 +
[[Category:Script_Command]]

Latest revision as of 23:29, 20 January 2014

Syntax

  • getmapusers("Map_Name");

Description

This function will return the number of users currently located on the specified map.

It is often used in the PVP scripts to check if a PVP room is full of not, if the number returned it equal to the maximum allowed it will not let you enter.

Example 1

//This will ask the player what map they want to check that has players and return the value
//of the players on the map
input @map$;
mes getmapusers(@map$);