LilBuddyy

How do I disabled specific commands?

Recommended Posts

LilBuddyy    0

I want to disabled certain explosive weapons and vehicles. I joined a server today that had the /veh hydra and /veh rhino disabled and was wondering how I could do the same

Share this post


Link to post
Share on other sites
Dominik48    0
В 06.01.2017 в 22:19, LilBuddyy сказал:

I want to disabled certain explosive weapons and vehicles. I joined a server today that had the /veh hydra and /veh rhino disabled and was wondering how I could do the same

For example 

module.exports = {
	"veh": (player, args) => {
		var pos = player.position;
		pos.x += 2.0;
				
		if(player.veh)
			player.veh.destroy();
		
		if(args[1] == "hydra") {	// If player use /veh hydra 
			player.outputChatBox("<b>Hydra - vehicle for admins!!!!</b>"); // Send him message
		} else { 
			player.veh = mp.vehicles.new(mp.joaat(args[1]), pos);
			player.veh.dimension = player.dimension;
		}	
	}
};

Also do with weapons or with skins..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.