Jump to content

WHATS WRONG IN THIS SCRIPT? SAVING CARS/INTERIORS/DIMENSIONS


HeavyMetal

Recommended Posts

You are not using the latest script I posted? that one worked fine for me.

@50p: His variables are "interior" and "dimension".

I'm not using the script. I never test people's script either. I only test them after I don't see anything wrong with the code. I just looked at the mistakes he made and I quickly looked at local interior" but missed the "Interior" which I copied.

@HeavyMetal, Dimension is not the same as dimension.

Link to comment

thanks! it is now working but only when the car is created on the dimension and interior, when it is changed from one to another it dont work, is there anything that need to be updated when the vehicle is changed from dimension or interior, or something to get the current dimension/interior?

Link to comment

i know, but for some reason it is returning the dimension and interior the car was created, not its current one, example: if i create a car on dimension 0, interior 0 it will be saved on 0 0 , even if i take it to dimension and interior 1, but if i create it on interior and dimension 1 it works, only if i dont take it to the 0 again, because it will be saved on 1(where it was created), is there anyway to "update" the getElementByType? or something like this?

Link to comment

Are you changing these client-side? Get in the car and run this code from admin panel:

setElementDimension( getPedOccupiedVehicle( getPlayerFromName( "YOUR NICK" ) ), 2) 

Then this:

getElementDimension( getPedOccupiedVehicle( getPlayerFromName( "YOUR NICK" ) ) ) 

Watch the chatbox and see if the second run will return 2.

Link to comment

i found the problem,it was the marker,it was using the "OnClientMarkerHit", so it was not setting the interior and dimension on a way the server could recognize (i guess), well, so i changed to "OnMarkerHit" and now im running it server side, now everything is working!

thanks ! i learned a lot with you guys doing this script! i hope this topic helps more people with this problem!

thanks very much for all the help :D

Link to comment
i found the problem,it was the marker,it was using the "OnClientMarkerHit", so it was not setting the interior and dimension on a way the server could recognize (i guess), well, so i changed to "OnMarkerHit" and now im running it server side, now everything is working!

thanks ! i learned a lot with you guys doing this script! i hope this topic helps more people with this problem!

thanks very much for all the help :D

Do server-side scripting as much as possible. Only do UI based scripts client-side this way your script is safer, clients don't have to download as much and last but not least everything is synced.

Good luck.

Link to comment

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