HELP ME PLEEASE
#1

First of all Hello,

I have a realy anoying bug in my gamemode and I just cant fix it in every car I enter its buyable so when somebody finds a car on the road and enter it he must buy it to drive or on events nobody can drive the car unless they buy it I would paste here the code but I don't know which part of it should I paste so if somebody thinks he knows where the bug is tell me and I will paste ! Thanks anyway
Reply
#2

Post your OnPlayerStateChange and OnPlayerEnterVehicle callbacks please.
Reply
#3

You will need to create an array to store whether or not a certain vehicle is purchasable.

pawn Код:
//top of script (not under any callback)
new Purchasable[MAX_VEHICLES];

//when you create a vehicle that is purchasable
new vid = CreateVehicle(blablabla);
Purchasable[vid]=1;

//under OnPlayerEnterVehicle, perform a check:
if(Purchasable[vehicleid]==1)
{
     //if this is a vehicle that has to be bought
}
else
{
     //any normal vehicle
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)