HomeHome  ­FAQFAQ  ­SearchSearch  ­MemberlistMemberlist  ­UsergroupsUsergroups  ­RegisterRegister  ­Log inLog in  
Post new topic   Reply to topicShare | 
 

 Check for current map(s)

View previous topic View next topic Go down 
AuthorMessage
Flav



Posts: 24
Join date: 2008-08-16

PostSubject: 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.");
}
Back to top Go down
View user profile
 

Check for current map(s)

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You cannot reply to topics in this forum
 :: OdinMS :: Guides-
Post new topic   Reply to topic