New to fivem development

Hello everyone,

I am trying to gather as much information as possible and learn as much as i can but i cant seem to figure this out and i feel like i didn’t get much wiser looking at google.

Code

This is the standard code QB gave me, i want to change the location for the first clothingroom for the ambulance. I thought if i would just change the vector’s location this would work but the whole script stops working if i do that. Any suggestions to what i am doing wrong here and how i should look at this in the future?

You have there an vector4 coordinate you need a vector3 coordinate :slight_smile:
Copy the code in here than I can show you exactly what I mean :slight_smile:

This is the script im using, the code that you see there was the default code. I just tried to change it to a vector 3 but its not working. What is also strange is that if i teleport to the other jobs most of them i spawn under the map and there is nothing there.

Yes but, can you send the code from your image :slight_smile:

Do you mean this?

Config.ClothingRooms = {
[1] = {requiredJob = ‘police’, isGang = false, coords = vector3(454.68, -990.89, 29.69), width = 2, length = 2, cameraLocation = vector4(454.42, -990.52, 30.69, 358.48)},
[2] = {requiredJob = ‘ambulance’, isGang = false, coords = vector4(342.47, -586.15, 43.32, 342.56), width = 2, length = 2, cameraLocation = vector4(342.47, -586.15, 43.32, 342.56)},
[3] = {requiredJob = ‘police’, isGang = false, coords = vector3(314.76, 671.78, 14.73), width = 2, length = 2, cameraLocation = vector4(317.62, 671.86, 14.73, 91.53)},
[4] = {requiredJob = ‘ambulance’, isGang = false, coords = vector3(338.70, 659.61, 14.71), width = 2, length = 2, cameraLocation = vector4(339.27, 661.63, 14.71, 315.5)},
[5] = {requiredJob = ‘ambulance’, isGang = false, coords = vector3(-1098.45, 1751.71, 23.35), width = 2, length = 2, cameraLocation = vector4(-1097.15, 1750.19, 23.35, 38.70)},
[6] = {requiredJob = ‘police’, isGang = false, coords = vector3(-77.59, -129.17, 5.03), width = 2, length = 2, cameraLocation = vector4(-80.36, -130.76, 5.03, 300.44)},
[7] = {requiredJob = “realestate”, isGang = false, coords = vector3(-131.45, -633.74, 168.82), width = 2, length = 2, cameraLocation = vector4(-131.45, -633.74, 168.82, 2.18)}

Config.ClothingRooms = {
[1] = {requiredJob = ‘police’, isGang = false, coords = vector3(454.68, -990.89, 29.69), width = 2, length = 2, cameraLocation = vector3(454.42, -990.52, 30.69)},
[2] = {requiredJob = ‘ambulance’, isGang = false, coords = vector3(342.47, -586.15, 43.32), width = 2, length = 2, cameraLocation = vector4(342.47, -586.15, 43.32, 342.56)},
[3] = {requiredJob = ‘police’, isGang = false, coords = vector3(314.76, 671.78, 14.73), width = 2, length = 2, cameraLocation = vector4(317.62, 671.86, 14.73, 91.53)},
[4] = {requiredJob = ‘ambulance’, isGang = false, coords = vector3(338.70, 659.61, 14.71), width = 2, length = 2, cameraLocation = vector4(339.27, 661.63, 14.71, 315.5)},
[5] = {requiredJob = ‘ambulance’, isGang = false, coords = vector3(-1098.45, 1751.71, 23.35), width = 2, length = 2, cameraLocation = vector4(-1097.15, 1750.19, 23.35, 38.70)},
[6] = {requiredJob = ‘police’, isGang = false, coords = vector3(-77.59, -129.17, 5.03), width = 2, length = 2, cameraLocation = vector4(-80.36, -130.76, 5.03, 300.44)},
[7] = {requiredJob = “realestate”, isGang = false, coords = vector3(-131.45, -633.74, 168.82), width = 2, length = 2, cameraLocation = vector4(-131.45, -633.74, 168.82, 2.18)}

try it with this here

it worked?

I am going to check in a bit when im home. Thanks for your responses anyway and i will let you know! :slight_smile:

I just tried it but the whole script didnt work, none of the clothing rooms were there. I am getting this error in live console:

script:qb-clothing] Error parsing script @qb-clothing/config.lua in resource qb-clothing: @qb-clothing/config.lua:559: unexpected symbol near ‘<\226>’

Maybe I see the mistake I will sent it to you when im on the pc

Thanks a lot!

Do you have any idea though why the other coords send me under the map? Very strange especially since its standard qb-clothing script.

Try it with this here :slight_smile: Maybe you set the coordinate false?

Config.ClothingRooms = {
[1] = {requiredJob = ‘police’, isGang = false, coords = vector3(454.68, -990.89, 29.69), width = 2, length = 2, cameraLocation = vector4(454.42, -990.52, 30.69, 358.48)},
[2] = {requiredJob = ‘ambulance’, isGang = false, coords = vector3(342.47, -586.15, 43.32), width = 2, length = 2, cameraLocation = vector4(342.47, -586.15, 43.32, 342.56)},
[3] = {requiredJob = ‘police’, isGang = false, coords = vector3(314.76, 671.78, 14.73), width = 2, length = 2, cameraLocation = vector4(317.62, 671.86, 14.73, 91.53)},
[4] = {requiredJob = ‘ambulance’, isGang = false, coords = vector3(338.70, 659.61, 14.71), width = 2, length = 2, cameraLocation = vector4(339.27, 661.63, 14.71, 315.5)},
[5] = {requiredJob = ‘ambulance’, isGang = false, coords = vector3(-1098.45, 1751.71, 23.35), width = 2, length = 2, cameraLocation = vector4(-1097.15, 1750.19, 23.35, 38.70)},
[6] = {requiredJob = ‘police’, isGang = false, coords = vector3(-77.59, -129.17, 5.03), width = 2, length = 2, cameraLocation = vector4(-80.36, -130.76, 5.03, 300.44)},
[7] = {requiredJob = “realestate”, isGang = false, coords = vector3(-131.45, -633.74, 168.82), width = 2, length = 2, cameraLocation = vector4(-131.45, -633.74, 168.82, 2.18)}

}

Will try it now. The coordinates that are in there are standard provided by the script.

Well, tried changing the location for 2 ambulance with a vector3, and its not showing up ingame. What is also strange is that if i change it back to its original code and restart the script the clothingroom is not there at the original place anymore.

I got it to work by myself :slight_smile:

What i did was just delete the whole code and replace it with custom code with custom locations, now its working :slight_smile:

Thankyou for your time!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.