Jump to content

[HELP]Simple Script


Recommended Posts

Hi! I want to make a faction system for a roleplay server and when i want to remove a player from faction i'm typing "/fpk <PlayerName> <FactionID>". How can i add in command the "Reason"? To looks like: "/fpk <PlayerName> <FactionID> <Reason>". I want only the codes how can i add this, i want to add it by myself. Thanks for help! :) 

Link to comment
  • Moderators

@nameforthisforum

 

The following code is used for the command:

local restricted = false -- set to true if you want to control this based on acl

addCommandHandler("fpk",
function (player, playerName, ...) 
	local reason = table.concat(arg or {...}) -- arg or {...} depending on the Lua version
	-- element player, string playerName, string reason

end, restricted, false)

 

<right name="command.fpk" access="false"></right>
<right name="command.fpk" access="true"></right>

 

For storing data, you could use this resource:

https://wiki.multitheftauto.com/wiki/XmlData

But you have to take the first steps before I am going to help you with that.

 

 

 

 

Link to comment

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.
×
×
  • Create New...