You are not logged in.
Pages: 1
I'm doing a script that saves the last car the player drove and loads it later.
The script is almost like the example from the cleo tutorial, but saving more things.
One of these things is the car mods, like wheels, nitro, etc, but everytime the script runs this specific line it crashes:
06E7: 21@ = add_car_component 24@ to_car 0@
21@ is an unused var just to fullfil the parameter, 24@ is the component model obtained with the opcode 096D.
Of course I'm loading the component and checking is it already loaded before running this, but it keeps crashing.
This is the code that adds the component:
if
24@ <> 0
then
repeat
wait 0
until 06EA: car_component_available 24@
06E7: 21@ = add_car_component 24@ to_car 0@
06EB: release_car_component 24@
end
Why isn't this working? I'm declaring 24@ as Integer btw.
Oh, and btw there is a better way to save all components rather than trying to save like 5 (or another specific amount of) itens?
Because sometimes there's only one, sometimes there's more than 5 components.
I didn't know I could compare 2 cars as integers, thank you!
Hello all, I'm new to CLEO stripting but I'm a programmer.
I want to know how to compare 2 cars (0@ and 1@) and check if they are the same car.
I'll use this to check if the player is entering the last car he was driving or if it is a "new" car.
I tried using 0@ == 1@ but compiler told me I can't compare these kinds of variables ):
Pages: 1