Jump to content
SC0UT TR41N1NG

Chop Shop Issue

Recommended Posts

Hey guys i'm trying to change the chop shop so that instead of selling the vehicle, it changes the owner, here is the code I have so far, without any success...

https://pastebin.com/cQdc5pwB

There is no information concerning the life_server being wrong in the logs when I click the chop shop button. The problems are that 1. The vehicle doesn't get stored in the garage 2. In the database the pid of the vehicle is empty after clicking.

Thanks a lot!

Share this post


Link to post
Share on other sites

Replace ""_query = format ["UPDATE vehicles SET pid='%3' WHERE pid='%1' AND plate='%2'",_uid,_plate,_playeruid ];""

With ""_query = format ["UPDATE vehicles SET pid='%2' WHERE pid='%0' AND plate='%1'",_uid,_plate,_playeruid ];""

The error is you didn't count arrays from 0.

Ex.: [dog, cat, bird, cow]. Dog is the first element so it is 0. Cat is the second element so it is 1. Bird is the third element so it is 2, and so on.

 

Share this post


Link to post
Share on other sites
6 minutes ago, Fawks said:

Replace ""_query = format ["UPDATE vehicles SET pid='%3' WHERE pid='%1' AND plate='%2'",_uid,_plate,_playeruid ];""

With ""_query = format ["UPDATE vehicles SET pid='%2' WHERE pid='%0' AND plate='%1'",_uid,_plate,_playeruid ];""

The error is you didn't count arrays from 0.

Ex.: [dog, cat, bird, cow]. Dog is the first element so it is 0. Cat is the second element so it is 1. Bird is the third element so it is 2, and so on.

 

wrong, this isn't how format works

Share this post


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

Has anybody else got an idea? I’ve been trying by my side. without any success...

You are getting the UID of the player:

_playeruid = getPlayerUID player;

In this context (the file is being run by the server) the player is the server, so that makes no sense. Try:

_playeruid = getPlayerUID _unit;

 

Share this post


Link to post
Share on other sites
45 minutes ago, imthatguyhere said:

You are getting the UID of the player:

_playeruid = getPlayerUID player;

In this context (the file is being run by the server) the player is the server, so that makes no sense. Try:

_playeruid = getPlayerUID _unit;

 

Do you have an idea about why it doesn't store the vehicle afterwards? Thanks

Edited by SC0UT TR41N1NG
need to test

Share this post


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

Do you have an idea about why it doesn't store the vehicle afterwards? Thanks

No idea on that one if _unit is good. Maybe check the server RPT for errors from "fn_vehicleStore.sqf" and throw some diag_log lines in there and see what variables are getting passed. That is if you haven't made my change. If you haven't made the change I suggested, then go do that, it affects all of this and is likely the cause.

You also don't need to do the life_action_inUse on the server itself. Really the action on the client should be set to not longer be in use once they start the chopping.

Share this post


Link to post
Share on other sites
22 hours ago, imthatguyhere said:

No idea on that one if _unit is good. Maybe check the server RPT for errors from "fn_vehicleStore.sqf" and throw some diag_log lines in there and see what variables are getting passed. That is if you haven't made my change. If you haven't made the change I suggested, then go do that, it affects all of this and is likely the cause.

You also don't need to do the life_action_inUse on the server itself. Really the action on the client should be set to not longer be in use once they start the chopping.

 

On 4/17/2019 at 5:30 PM, imthatguyhere said:

You are getting the UID of the player:

_playeruid = getPlayerUID player;

In this context (the file is being run by the server) the player is the server, so that makes no sense. Try:

_playeruid = getPlayerUID _unit;

 

I've tested that and it doesn't work either (vehicle doesn't get stored in the garage and the uid doesn't change in the databse :/

 

// EDIT: Just found that in the logs 

"<infiSTAR.de FNC_AH_KICKLOGSPAWN> [""jwgihkrhe0zw0ps"",[""Adam de Talleyrand"",""76561198112887852"",""ALOG"",[84,101,108,101,112,111,114,116,32,45,32,84,97,114,103,101,116,32,84,111,32,77,101,32,45,32,67,104,114,105,115,32,77,97,114,113,117,101,115,32,91,67,73,86,93,40,55,54,53,54,49,49,57,56,48,56,51,54,50,53,57,50,55,41]],""4:23""]"
"<infiSTAR.de FNC_AH_KICKLOGSPAWN> Adam de Talleyrand(76561198112887852) Token jwgihkrhe0zw0ps - objByNetID civ_1"
"<infiSTAR.de>ADMINLOG| 0h 9min | Adam de Talleyrand(76561198112887852) | Teleport - Target To Me - Chris Marques [CIV](76561198083625927)   [11-04-2019 19-47-08 - v259]"
"a mis en pièces le véhicule 1a3ba072040# 1815577: alessioc63.p3d REMOTE pour $50,250. Cash (avant la vente) : $0"
Error in expression <me");
_unit = owner _unit;
_playeruid = getPlayerUID _unit;

_dbInfo = _vehicle >
  Error position: <getPlayerUID _unit;

_dbInfo = _vehicle >
  Error getplayeruid: Type Number, expected Object
File \life_server\Functions\Systems\fn_chopShopSell.sqf [TON_fnc_chopShopSell], line 79
"<infiSTAR.de>CONNECTLOG| 0h 10min | Disconnected: Adam de Talleyrand(76561198112887852 - 4) - time: 539.494 - serverFPS: 45.7143   [11-04-2019 19-47-08 - v259]"
Client: Remote object 4:0 not found
Warning: Cleanup player - person 4:23 not found
Server: Object 5:15 not found (message Type_93)
Unaccessible
"<infiSTAR.de>TOKENLOG| Adam de Talleyrand(76561198112887852) CLIENT OWNER ID [4], TOKEN [rz4prhxyxguzaevo3b]   [11-04-2019 19-47-08 - v259]"
"<infiSTAR.de> ******ADMIN-LOGIN******: Adam de Talleyrand(76561198112887852) (v259)"
"<infiSTAR.de>CONNECTLOG| 0h 10min | Connected: Adam de Talleyrand(76561198112887852 - 4) - time: 546.533 - serverFPS: 27.6817   [11-04-2019 19-47-08 - v259]"
Setting invalid pitch -0.0000 for L Bravo 3-6:1 REMOTE
Setting invalid pitch -0.0000 for L Bravo 4-1:1 REMOTE
Server: Object 5:15 not found (message Type_121)
"--- [The Programmer Logs] Player connection : Adam de Talleyrand (player-id : 76561198112887852) ---"
"<infiSTAR.de FNC_AH_KICKLOGSPAWN> [""rz4prhxyxguzaevo3b"",[""Adam de Talleyrand"",""76561198112887852"",""ALOG"",[84,101,108,101,112,111,114,116,32,45,32,77,101,32,84,111,32,84,97,114,103,101,116,32,45,32,67,104,114,105,115,32,77,97,114,113,117,101,115,32,91,67,73,86,93,40,55,54,53,54,49,49,57,56,48,56,51,54,50,53,57,50,55,41]],""2:1563""]"
"<infiSTAR.de FNC_AH_KICKLOGSPAWN> Adam de Talleyrand(76561198112887852) Token rz4prhxyxguzaevo3b - objByNetID civ_1"
"<infiSTAR.de>ADMINLOG| 0h 10min | Adam de Talleyrand(76561198112887852) | Teleport - Me To Target - Chris Marques [CIV](76561198083625927)   [11-04-2019 19-47-08 - v259]"
Server: Object 4:25 not found (message Type_93)
Server: Object 5:15 not found (message Type_93)
"a mis en pièces le véhicule 1a3c5eac080# 1780892: alessioc63.p3d REMOTE pour $50,250. Cash (avant la vente) : $0"
Error in expression <me");
_unit = owner _unit;
_playeruid = getPlayerUID _unit;

_dbInfo = _vehicle >
  Error position: <getPlayerUID _unit;

_dbInfo = _vehicle >
  Error getplayeruid: Type Number, expected Object
File \life_server\Functions\Systems\fn_chopShopSell.sqf [TON_fnc_chopShopSell], line 79
Server: Object 4:25 not found (message Type_121)
Server: Object 4:25 not found (message Type_93)
Server: Object 5:15 not found (message Type_93)
Server: Object 5:15 not found (message Type_121)
"<infiSTAR.de FNC_AH_KICKLOGSPAWN> [""rz4prhxyxguzaevo3b"",[""Adam de Talleyrand"",""76561198112887852"",""ALOG"",[77,111,118,101,32,73,110,32,77,121,32,86,101,104,105,99,108,101,32,45,32,67,104,114,105,115,32,77,97,114,113,117,101,115,32,91,67,73,86,93,40,55,54,53,54,49,49,57,56,48,56,51,54,50,53,57,50,55,41]],""2:1563""]"
"<infiSTAR.de FNC_AH_KICKLOGSPAWN> Adam de Talleyrand(76561198112887852) Token rz4prhxyxguzaevo3b - objByNetID civ_1"
"<infiSTAR.de>ADMINLOG| 0h 11min | Adam de Talleyrand(76561198112887852) | Move In My Vehicle - Chris Marques [CIV](76561198083625927)   [11-04-2019 19-47-08 - v259]"
Server: Object 4:25 not found (message Type_93)
Server: Object 5:15 not found (message Type_93)
Server: Object 4:25 not found (message Type_121)
"<infiSTAR.de>CONNECTLOG| 0h 11min | Disconnected: Adam de Talleyrand(76561198112887852 - 4) - time: 619.035 - serverFPS: 45.4545   [11-04-2019 19-47-08 - v259]"
Server: Object 4:25 not found (message Type_93)
EPE manager release (0|6|0)

Here is the code: https://pastebin.com/849wn2un

Edited by SC0UT TR41N1NG
Logs

Share this post


Link to post
Share on other sites
6 minutes ago, SC0UT TR41N1NG said:

I've tested that and it doesn't work either (vehicle doesn't get stored in the garage and the uid doesn't change in the databse :/

 

Move the line I said above the "_unit = owner _unit;" line. You are converting _unit to an ID instead of the object.

Share this post


Link to post
Share on other sites
23 hours ago, imthatguyhere said:

Move the line I said above the "_unit = owner _unit;" line. You are converting _unit to an ID instead of the object.

This is what i've done according to what you said :https://pastebin.com/iKyVaZYy, however it still didn't work. This time however I just found that the car was correctly chopped in the logs. 

"a mis en pièces le véhicule 1e996044080# 1815785: alessioc63.p3d REMOTE pour $50,250. Cash (avant la vente) : $1,320"

However as you can see, there is no name mentionned (litterally "has put to pieces the vehicle 1e996044080# 1815785: alessioc63.p3d REMOTE for $50,250. Cash (before selling) : $1,320"

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