Vehicle ID problem.
#1

Ok, the problem is:
Debug is used on my server, so cars are spawned.
I also have commands which gets rid of vehicles.

I have cars which have certain jobs and do certain things.

The ID's seem to get messed up alot.

Say I have :
pawn Код:
regcar = AddStaticVehicle(560,2076.2837,1260.0215,10.3314,179.9376,6,6); // sultan
After a while this would no longer be the reg car, it's the the ID would change and another car would be the reg car.
Happens mostly for players when buying vehicles, they would buy a vehicle and it would say it's a regular player car or something.

Is there anyway to prevent this ?
Reply
#2

use CreateVehicle?
Reply
#3

Quote:
Originally Posted by Rk_
use CreateVehicle?
Would this fix the problem .. ?
Reply
#4

There is no harm in trying it?
Reply
#5

Quote:
Originally Posted by Rk_
There is no harm in trying it?
True. :P

Does it work the same as AddStaticVehicle ?
I don't need to change anything but the AddStaticVehicle to CreateVehicle ?
Reply
#6

at CreateVehicle you have extra argument named respawn_delay.

Yes, just replace AddStaticVehicle with CreateVehicle.
Reply
#7

Sorry, I know I sound like a nub, but I've never used CreateVehicle before ....

Lets take this for example:
pawn Код:
AddStaticVehicle(560,2076.2837,1260.0215,10.3314,179.9376,6,6); // sultan
What would I change it to ?
Because I changed it to:
pawn Код:
CreateVehicle(560,2076.2837,1260.0215,10.3314,179.9376,6,6); // sultan
And I got
Код:
warning 202: number of arguments does not match definition
Reply
#8

CreateVehicle


This function can add vehicles to your gamemode. You can use it in opposite to AddStaticVehicle at any time in the script.


Parameters:
(modelid, Float, Float:y,Float:z, Float:angle, color1, color2, respawn_delay)modelid The Vehicle ID for the vehicle.
Float:X The X-coordinate for the vehicle.
Float:Y The Y-coordinate for the vehicle.
Float:Z The Z-coordinate for the vehicle.
Float:angle The facing - angle for the vehicle.
color1 The primary color ID.
color2 The secondary color ID.
respawn_delay The delay until the car is respawned without a driver in seconds.


Returns The vehicle ID of the vehicle created.

FROM WIKI
Reply
#9

i said there was a extra argument at CreateVehicle named respawn_delay.
So do no forget that.!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)