HELP ME PLEEASE - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: HELP ME PLEEASE (
/showthread.php?tid=349039)
HELP ME PLEEASE -
jamax - 07.06.2012
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
Re: HELP ME PLEEASE -
zDevon - 07.06.2012
Post your OnPlayerStateChange and OnPlayerEnterVehicle callbacks please.
Re: HELP ME PLEEASE -
Yuryfury - 08.06.2012
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
}