Help -
JonathanW - 10.08.2014
Hello there, lads!
Let's get to the problem. I am using an Enumerator for the Vehicle System. I tried debugging it to see if it works, and guess what ....... it does. But the problem is,...errr... it doesn't create the vehicle In Game.
That's the Samp-server.
This is the Creation of vehicles under OnGameModeInit
pawn Код:
for(new i = 184; i < sizeof(VehicleInfo); i++)
{
AddStaticVehicleEx(VehicleInfo[i][vModel],VehicleInfo[i][vLocX],VehicleInfo[i][vLocY],VehicleInfo[i][vLocZ],VehicleInfo[i][vAngle],
VehicleInfo[i][vColorOne],VehicleInfo[i][vColorTwo],60000);
SetVehicleNumberPlate(i,VehicleInfo[i][vPlate]);
SetVehicleToRespawn(i);
}
That's how I debugged it.
pawn Код:
printf("Vehicle ID: %d | Model: %d | Owner: %s | LicensePlate %s",idx,VehicleInfo[idx][vModel],VehicleInfo[idx][vOwner],VehicleInfo[idx][vPlate]);
Earlier, I used Player Vehicles but that's actually pretty useless, lacking many Functions like MDC check e.t.c
Please help me.
Re: Help -
Faisal_khan - 10.08.2014
Debug the co-ordinates too and let us know.
Re: Help -
JonathanW - 10.08.2014
Alrighty. I'll hit up here, in five.
EDIT: Ah well, it Debugged correctly again. But, it still doesn't spawn the Vehicles. I wonder, if it's something with AddStaticVehicleEx, is it?

Off Topic: You're my Indian Brother
Re: Help -
JonathanW - 10.08.2014
Any Help Mr. Faisal?
Re: Help -
Misiur - 10.08.2014
All the data seems correct. Could you do something like
pawn Код:
new temporary = AddStaticVehicleEx(...);
printf("Created vehicle id: %d", temporary);
If it returns something like 65535, the vehicle is not created at all. Also:
pawn Код:
new isValid = SetVehicleToRespawn(i);
printf("If %d is equal 0, the vehicle does not exist", isValid);
If you have some "teleport car to me" command, try using it.
Re: Help -
JonathanW - 10.08.2014
Quote:
Originally Posted by Misiur
All the data seems correct. Could you do something like
pawn Код:
new temporary = AddStaticVehicleEx(...); printf("Created vehicle id: %d", temporary);
If it returns something like 65535, the vehicle is not created at all. Also:
pawn Код:
new isValid = SetVehicleToRespawn(i); printf("If %d is equal 0, the vehicle does not exist", isValid);
If you have some "teleport car to me" command, try using it.
|
Well, duck yeah. It spawned the vehicle. Honestly, I don't know what and why did you do all that, but I got it working. You win a Rep, Sir.
http://i61.tinypic.com/ny92ty.png
Re: Help -
PawnOX - 10.08.2014
debug the coord. mate
Re: Help -
JonathanW - 10.08.2014
Quote:
Originally Posted by PawnOX
debug the coord. mate
|
Yes I did.
Re: Help -
JonathanW - 10.08.2014
EDIT : What Misiur said worked but, I didn't notice,... it worked ONLY for one car. When I spawn two, it stays on the same car. You'll see that in this picture.
In the scriptfiles, I've created 2 Vehicles.

And when I run samp-server,it goes onto the next ID but not the next car's Details, for example. The Plate, Owner's name e.t.c
Please help me, I've been trying to figure it out since th emorning.
Re: Help -
[L]azy[H]aze - 10.08.2014
Anyone help us?