#1

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.
Reply
#2

Debug the co-ordinates too and let us know.
Reply
#3

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
Reply
#4

Any Help Mr. Faisal?
Reply
#5

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.
Reply
#6

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
Reply
#7

debug the coord. mate
Reply
#8

Quote:
Originally Posted by PawnOX
Посмотреть сообщение
debug the coord. mate
Yes I did.
Reply
#9

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.
Reply
#10

Anyone help us?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)