Jump to content

DayZ Admin Help


FreeGells

Recommended Posts

I'm sorry me friend,to make a panel is imposible with

to give items is possible use this: :!:

I am still trying to script a way to give out items by typing /give into the chatbox, but as long as I am not done with it, I might as well post a tutorial on how to give items without the script. It's, for the ones who are less fluent in english than others, with pictures. Let's start.

1) Open your admin control panel by pressing "p". Click the tab called "Resources".

2) You will find a little bar at the almost lower right corner. It's called "Execute Command" and is for advanced users only. This little bar will do the magic of giving items.

3) Click this bar. The red sentence should disappear now, and instead, you will get a black bar at the left.

4) Now here is where the magic begins: in order to give items, you have to write this into this bar:

For those who can't load the image: setElementData(getPlayerFromName("")

5) Now type a comma after the last bracket and input this:

For those who can't load the image: ,"item",value)

6) The whole command will look like this then:

Code: [select]

setElementData(getPlayerFromName(""),"item",value)

7) Now let's test out the magic. We want to give "Milk" to a player. Note how this player does not have milk in his inventory:

8 ) For easier reference, let's assume this player is called [TWD]L. You can, of course, insert any name, but here's the tricky part: YOU HAVE TO INPUT THE EXACT NAME THE PLAYER APPEARS WITH. If the player is called "Jumpman23", you have to input this:

Code: [select]

setElementData(getPlayerFromName("Jumpman23"),"Milk",1)

If the player is called L, insert "L" as a name. YOU MUST INPUT THE EXACT NAME. You might have to temporary change the player's name to give out items:

9) Once you typed the necessary data, you must press "Client" to execute the command:

10) If the command has successfully been executed, you will see a blue message stating "Command executed! Result: true" at the chatbox:

If it didn't work, it will output either nothing or "false", in which case you have to recheck the command input again.

11) If it worked, and it should, the player, here [TWD]L, will have one milk in his inventory:

12) Now, what if the player already has an item, like a Sniper Rifle?

13) In this case, you have to input this:

For those who can't see the image:

Code: [select]

setElementData(getPlayerFromName("[TWD]L"),"Sniper Rifle",2)

14) Again, once you are done with typing the command, press "Client" to execute:

15) If it worked, the chatbox should output the same blue message as in 10):

16)Let's check if the player has 2 Sniper Rifles now...

A few notes:

You must input the exact name of the player, otherwise, it won't work.

You must input the exact name of the item, otherwise, the player won't get anything, but the chatbox will still output the blue message.

You must put the name and the item into quotation marks (" "), otherwise, it won't output anything and the player won't receive anything.

If the player already has the item you want to give him, you have to go one value up to give him the item: if he has 1 milk, you have to type 2 at the end of the command, if he has 2, you have to input 3 etc. Typing in less than the player has will result in a loss of the item by the number you typed in. 3 milks will become 2 if you typed in 2, 2 milks will become 1 if you typed in 1 etc.

It does not really matter if you press "Client" or "Server", as the item will be given anyway, but you are on the safe side if you press "Client".

Players can still receive items even if their backpack is full. However, this could be considered abuse and/or duping.

No, you don't need "DayZGiveEnabler" to give items. That's the script which allows to type /give to give items. You can still give items even if you don't have it.

Link to comment
  • 8 months later...
  • 1 year later...

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