Jump to content
Snipes Murphy

[Tutorial] Advanced Banking System, With Pins.

Recommended Posts

Hi

 

can some please help me and show me where this:

 

 * In case west, add
*/
_tmp = _queryResult select 12;
_queryResult set[16,[_tmp] call DB_fnc_numberSafe];
/*
 * In case independent, add
*/
_tmp = _queryResult select 11;
_queryResult set[16,[_tmp] call DB_fnc_numberSafe];
/*
 * In case civilian, add
*/
_tmp = _queryResult select 13;
_queryResult set[16,[_tmp] call DB_fnc_numberSafe];

go in your fn_queryRequest.sqf 

 

 

HERE i have added the first part:

 

_query = switch (_side) do {
    // West - 11 entries returned
    case west: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, cop_licenses, coplevel, cop_gear, blacklist, cop_stats, playtime, banking_pin FROM players WHERE pid='%1'",_uid];};
    // Civilian - 12 entries returned
    case civilian: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, civ_licenses, arrested, civ_gear, civ_stats, civ_alive, civ_position, playtime, banking_pin FROM players WHERE pid='%1'",_uid];};
    // Independent - 10 entries returned
    case independent: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, med_licenses, mediclevel, med_gear, med_stats, playtime, banking_pin FROM players WHERE pid='%1'",_uid];};

 

Now where do i copy the second part? can some1 copy theres or show me a pic or something please i know it must be before the switch but how?

 

Thanks

 

 

Share this post


Link to post
Share on other sites
2 hours ago, G3NDeadpool said:

Hi

 

can some please help me and show me where this:

 

 * In case west, add
*/
_tmp = _queryResult select 12;
_queryResult set[16,[_tmp] call DB_fnc_numberSafe];
/*
 * In case independent, add
*/
_tmp = _queryResult select 11;
_queryResult set[16,[_tmp] call DB_fnc_numberSafe];
/*
 * In case civilian, add
*/
_tmp = _queryResult select 13;
_queryResult set[16,[_tmp] call DB_fnc_numberSafe];

go in your fn_queryRequest.sqf 

 

 

HERE i have added the first part:

 

_query = switch (_side) do {
    // West - 11 entries returned
    case west: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, cop_licenses, coplevel, cop_gear, blacklist, cop_stats, playtime, banking_pin FROM players WHERE pid='%1'",_uid];};
    // Civilian - 12 entries returned
    case civilian: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, civ_licenses, arrested, civ_gear, civ_stats, civ_alive, civ_position, playtime, banking_pin FROM players WHERE pid='%1'",_uid];};
    // Independent - 10 entries returned
    case independent: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, med_licenses, mediclevel, med_gear, med_stats, playtime, banking_pin FROM players WHERE pid='%1'",_uid];};

 

Now where do i copy the second part? can some1 copy theres or show me a pic or something please i know it must be before the switch but how?

 

Thanks

 

 

scroll down...?

wQzEazH.png

Share this post


Link to post
Share on other sites
4 hours ago, G3NDeadpool said:

Hi

where do i add it above CASE CIV or above the _queryResult under case civ?

Probably all the way at the bottom if you looked at the numerical result order? 

Trial and error my friend

Edited by Deadlesszombie

Share this post


Link to post
Share on other sites

I put everything in my 5.0 Altis Life Server and everything works perfectly except for one thing. It will not save the banking pin to the database, so every time someone joins the server (including new and old) they have to constantly remake a pin. Our RPT logs show nothing, and ive gone over it multiple times. Any help will be much appreciated :) Thank you!

Share this post


Link to post
Share on other sites
11 hours ago, Puma Power.PT said:

For me not work have atm i insert card but not say make new pin account 

Pastebin a client and server RPT from when you tried it.

Share this post


Link to post
Share on other sites
16 hours ago, Puma Power.PT said:

ok thanks

https://pastebin.com/Dxys3N3t

https://pastebin.com/tKLqNV1h

 

and now after try install that script my status bar disappears 

22:04:36 File mpmissions\__CUR_MP.Altis\Functions.hpp, line 257: '/CfgFunctions/Life_Client_Core/Scripts.file': Missing ';' at the end of line

 

Share this post


Link to post
Share on other sites
7 hours ago, imthatguyhere said:
22:04:36 File mpmissions\__CUR_MP.Altis\Functions.hpp, line 257: '/CfgFunctions/Life_Client_Core/Scripts.file': Missing ';' at the end of line

 

i thnik the status bar is fixed but  atm not working :/ 

 

i find that errors in rpt server

rror in expression <players WHERE pid='%1'",_uid];};
_tmp = _queryResult select 12;
_queryResult set>
  Error position: <_queryResult select 12;
_queryResult set>
  Error Undefined variable in expression: _queryresult
File \life_server\Functions\MySQL\fn_queryRequest.sqf [DB_fnc_queryRequest], line 83

 

i dont know what is wrong 

Edited by Puma Power.PT

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.


×
×
  • Create New...