Multiple vehicles - 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: Multiple vehicles (
/showthread.php?tid=421349)
Multiple vehicles -
edzis84 - 09.03.2013
Hello its me again!
Thanks for all help, i have made my first car ownership but there you can only own one car.
I want to move like levelup and make multiple cars.
I had idea to duplicate all, like make
Код:
pCar
PCar2
pCar3
pCar4
pCar5
And then
Код:
if(PlayerInfo[playerid][pCar] > 399)
PlayerInfo[playerid][pCar2] = 415);
But i dont think its best idea how to make it because there i have to type a lot and it will be very useless.
Can anyone help?
Re: Multiple vehicles -
edzis84 - 09.03.2013
anyone?
Re: Multiple vehicles -
Luis- - 09.03.2013
Don't bump after 1 hour.
Re: Multiple vehicles -
mineralo - 09.03.2013
pawn Код:
#define max_owned 5
enum pinfo
{
pCar[max_owned];
};
new num=399;
for(new i=0;i<max_owned;i++)
{
if(pCar[i] >num)
{
num=+20;
pCar[i+1]=num;
}
}
something like this you meant?