LilBuddyy

How do I disabled specific commands?

Recommended Posts

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
В 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   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.