Adding Cars - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Adding Cars (
/showthread.php?tid=110836)
Adding Cars -
whitedragon - 28.11.2009
I make more cars but when i add then it say that im stealing hospital cars... How i make new id for then? (Using LARP)
Re: Adding Cars -
dice7 - 28.11.2009
Ask in the larp topic
Re: Adding Cars -
whitedragon - 28.11.2009
Quote:
Originally Posted by dice7
Ask in the larp topic
|
You cant answer ? LARP Topic is very slow moving
Re: Adding Cars -
Naruto4 - 28.11.2009
Mate,i will help you.
Search for :
Код:
public IsAnAmbulance(carid)
then you will see this:
Код:
public IsAnAmbulance(carid)
{
if((carid >= 52) && (carid <= 55))
{
return 1;
}
return 0;
}
and that numbers are the cars counted from 1 to somenumber.
You must just increase that number depending on the number you added.
It is like you added 2 more cars under 52 then it would be
Код:
public IsAnAmbulance(carid)
{
if((carid >= 54) && (carid <= 57))
{
return 1;
}
return 0;
}
it is simple.It is the same trick for Stealing a police car,you are not a taxi driver and things like that.
IsAboat...
-Naruto4
Re: Adding Cars -
MJ! - 28.11.2009
or if you don't want like every time when you add a new Paramedic Car / Firetruck , use the native function GetVehicleModel
eg:
pawn Код:
public IsAnAmbulance(car)
{
new model = GetVehicleModel(car);
if(model == 416 || model == 407 || model == 544) return true;
return false;
}
Re: Adding Cars -
Naruto4 - 28.11.2009
i didnt know that
Thanks man
Re: Adding Cars -
whitedragon - 29.11.2009
i but cars to cops. the id-s are 54 to 60
btw how i add gangs cars?