04.01.2013, 13:47
Hi Guys!
I have a problem since a couple of months ago but i cannot find whats wrong.
Its a command /car where you can get a car by carname. But you can only keep 1 car.
my code:
Definition:
OnPlayerDisconnect:
at the /car command:
the problem is, that sometimes when someone spawn a car, the car from another person disappeared, so that they have the same slot, how can that be?
MfG CC
I have a problem since a couple of months ago but i cannot find whats wrong.
Its a command /car where you can get a car by carname. But you can only keep 1 car.
my code:
Definition:
Код:
new Vehicle[MAX_PLAYERS] = {INVALID_VEHICLE_ID,...};
Код:
DestroyVehicle(Vehicle[playerid]); Vehicle[playerid] = INVALID_VEHICLE_ID;
Код:
if(Vehicle[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(Vehicle[playerid]); Vehicle[playerid] = CreateVehicle(vehicle, x, y, z, a+90, c1, c2, -1);
the problem is, that sometimes when someone spawn a car, the car from another person disappeared, so that they have the same slot, how can that be?
MfG CC