[HELP] Look at this... Dont even know how to call it.
#1

SOLVED

PS. trolol
Reply
#2

Well?
Reply
#3

in your LoadVehicle(), i suspect THIS line to cause the trouble:
Код:
SetVehicleNumberPlate(CreateVehicle(carDB[i][cModel].....
CreateVehicle() returns not 1, but the Vehicles' ID it created, your car gets assigned the 1 (as first vehicle created).
i suggest you to create a large array for holding the cars you want to control, like
Код:
new Vehicle[MAX_VEHICLES];
then you can access it anytime by using that Variable w/o need to think which "real" ID it got:
Код:
for(new loop=0;loop<MAX_VEHICLES;loop++)
{
SetVehicleNumberPlate(Vehicle[i],carDB[Vehicle[i]][cNumber]);
}
this will fuck up your /lock command now, but the sense of using arrays are obvious i guess
btw: it (arrays used as pointers) do excellent with streamed objects aswell ^^
Reply
#4

Quote:
Originally Posted by Babul
Посмотреть сообщение
in your LoadVehicle(), i suspect THIS line to cause the trouble:
Код:
SetVehicleNumberPlate(CreateVehicle(carDB[i][cModel].....
CreateVehicle() returns not 1, but the Vehicles' ID it created, your car gets assigned the 1 (as first vehicle created).
i suggest you to create a large array for holding the cars you want to control, like
Код:
new Vehicle[MAX_VEHICLES];
then you can access it anytime by using that Variable w/o need to think which "real" ID it got:
Код:
for(new loop=0;loop<MAX_VEHICLES;loop++)
{
SetVehicleNumberPlate(Vehicle[i],carDB[Vehicle[i]][cNumber]);
}
this will fuck up your /lock command now, but the sense of using arrays are obvious i guess
btw: it (arrays used as pointers) do excellent with streamed objects aswell ^^
So now, instea of using this:

pawn Код:
for(new i=0; i<MAX_VEHICLES; i++)
{
 if(IsPlayerInVehicle(playerid,i))
 {
   return 1;
 }
}
I should do this:
pawn Код:
for(new i=0; i<MAX_VEHICLES; i++)
{
       if(IsPlayerInVehicle(playerid,Vehicle[i]))
      {
             return 1;
        }
}
?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)