Jump to content
  • 0

Displaying data from the database as an on screen message


Barnaldo

Question

6 answers to this question

Recommended Posts

  • 0

you can use commands like cutText or hint, or whatever Arma has to offer to display text and format the text with the format command, e.g.

_code = 1010;
cutText [format["The code is %1", _code ], "PLAIN"];

if you don't know how to get the the code from the database or anywhere, that depends what you actually want to display,

usually it is already in the game and you don't need to access the database at all (like safe combinations you don't need database access for that). :)

Link to comment
Share on other sites

  • 0

Sorry, I should have been a bit more specific, I know how to display on screen text, what I need to know how to do, is use data from the database and display that in the text.

 

So for the example you have given, "_code" would be taken from a object_data in the database, for instance, I would want _code to be the value of CharacterID where ObjectID = 111.

 

Is this at all possible?

Link to comment
Share on other sites

  • 0

what I don't understand what you wanna do sorry

you can't do SQL queries with the default epoch HiveExt.dll, you can compile the current HiveExt from the GitHub repository (https://github.com/vbawol/DayZhiveEpoch) yourself to get maca's additional sopport for CHILD:999 and 998 support and then you can do custom queries but maybe it is not needed if you would tell me what it is you want exactely in the end :D

 

I don't know how much experience you have got but for that your need to have at least some SQL, C++ and Arma script knowldge at some degree (I have made a custom HiveExt that is no easy c++ if you want to do that yourself)

Link to comment
Share on other sites

  • 0

Ok, here is exactly what I want to happen:

 

Player picks up an item(doesnt matter what)

 

If the player has this in their gear inventory they get a scroll option. (I can do this bit)

 

When they click the option, a message appears on screen and within the message is the code to a safe that is on the map. (I can display the message, just dont know how to have a certain safe's code to show in the message.)

Link to comment
Share on other sites

  • 0

well the easiest way to do that is to hardcode teh location and combination of the safe(s) in the game and not the database.

I mean just safe it on the server or just the init.sqf so all players can easily access it. that is the easy way you just have to edit your mission or serevr files when you wanna change the codes or whatever.

 

if you really want to access the database you need custom HiveExt.dll in epoch. even then you have to send a request to the server and the server queries the database and then send back the data to the client(s). it is possible but not that easy :D

Link to comment
Share on other sites

  • 0

well the easiest way to do that is to hardcode teh location and combination of the safe(s) in the game and not the database.

I mean just safe it on the server or just the init.sqf so all players can easily access it. that is the easy way you just have to edit your mission or serevr files when you wanna change the codes or whatever.

 

if you really want to access the database you need custom HiveExt.dll in epoch. even then you have to send a request to the server and the server queries the database and then send back the data to the client(s). it is possible but not that easy :D

 

Yeah, I think I'll hardcode it in, I have some SQL knowledge, some C# and a little Arma scripting knowledge, but Im very much still learning.

 

Thanks for the help.

Link to comment
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
  • Advertisement
  • Discord

×
×
  • Create New...