Flav
Posts: 24 Join date: 2008-08-16
 | Subject: Check for current map(s) Mon Jan 26, 2009 9:42 pm | |
| This can be useful if you add a teleport player command and want it to make not working from jail map. | Code: | if (c.getPlayer().getMapId() != MapId) { ... } else { mc.dropMessage("You can't use this command from this map."); } |
If you want to make it for two mapes, you sperate the "map checks" with "&&". This example blocks the command from the jail maps 200090300 and 980000404.
| Code: | if (c.getPlayer().getMapId() != 200090300 && c.getPlayer().getMapId() != 980000404) { mc.dropMessage("You will get warped now. Lul!"); ... } else { mc.dropMessage("You can't use this command from jail maps."); } |
|
|