Is that right?
#1

I script my own RealLife now...
I need a code for defines the vehicles
also motobikes, boats, bikes, and planes is that right?
Код:
public IstEinFahrrad(carid) //Bike
{
	new fahrrad = GetVehicleModel(carid);
	if(fahrrad==509||fahrrad==481||fahrrad==510)
	{
		return 1;
	}
	return 0;
}
public IstEinRoller(carid) //Motoroller
{
	new roller = GetVehicleModel(carid);
	if(roller==462||roller==448)
	{
		return 1;
	}
	return 0;
}
public IstEinQuad(carid) //Quad
{
	new quad = GetVehicleModel(carid);
	if(quad==471)
	{
		return 1;
	}
	return 0;
}
public IstEinMotorad(carid) //Motorbike
{
	new motorad = GetVehicleModel(carid);
	if(motorad==581||motorad==521||motorad==463||motorad==522||motorad==461||motorad==468||motorad==586)
	{
		return 1;
	}
	return 0;
}
public IstEinFlugzeug(carid) //Plane
{
	new flugzeug = GetVehicleModel(carid);
	if(flugzeug==592||flugzeug==577||flugzeug==511||flugzeug==512||flugzeug==593||flugzeug==520||flugzeug==553||flugzeug==476||flugzeug==519||flugzeug==460||flugzeug==513)
	{
		return 1;
	}
	return 0;
}
public IstEinHelikopter(carid) //Helikopter
{
	new helikopter = GetVehicleModel(carid);
	if(helikopter==548||helikopter==425||helikopter==417||helikopter==487||helikopter==488||helikopter==497||helikopter==563||helikopter==447||helikopter==469)
	{
		return 1;
	}
	return 0;
}
public IstEinBoot(carid) //Boat
{
	new boot = GetVehicleModel(carid);
	if(boot==472||boot==473||boot==493||boot==595||boot==484||boot==430||boot==453||boot==452||boot==446||boot==454)
	{
		return 1;
	}
	return 0;
}
public IstEinAuto(carid) //Car
{
	new fahrrad = CallLocalFunction("IstEinFahrrad","i");
	new roller = CallLocalFunction("IstEinRoller","i");
	new quad = CallLocalFunction("IstEinQuad","i");
	new motorad = CallLocalFunction("IstEinMotorad","i");
	new flugzeug = CallLocalFunction("IstEinFlugzeug","i");
	new helikopter = CallLocalFunction("IstEinHelikopter","i");
	new boot = CallLocalFunction("IstEinBoot","i");
	if(!boot && !helikopter && !flugzeug && !quad && !motorad && !roller && !fahrrad)
	{
		return 1;
	}
	return 0;
}
sorry but the public functions are german and sorry for my bad english iam come from germany
Reply
#2

i think you have to use stock instead of public because you are defining it
Reply
#3

what for a stock?can you please give a example?
Reply
#4

can anyone else help?
Reply
#5

heres an example by andre9977
pawn Код:
stock IsBike(carid)
{
  new Bikes[] = { 509, 481, 510 };
  for(new i = 0; i < sizeof(Bikes); i++)
  {
    if(GetVehicleModel(carid) == Bikes[i]) return 1;
  }
  return 0;
}
hope this helps and don't double post please
Reply
#6

Hi!
A Big THX for this Code but
I'm looking for exactly that all the car's ID defined but on the contrary, so all I Motorbikes, boats and so on, and then define only the contrary can also "else(" If you understand what I mean...
I need something like:
Код:
public IstEinAuto(carid)
{
	new fahrrad = CallLocalFunction("IstEinFahrrad","i");
	new roller = CallLocalFunction("IstEinRoller","i");
	new quad = CallLocalFunction("IstEinQuad","i");
	new motorad = CallLocalFunction("IstEinMotorad","i");
	new flugzeug = CallLocalFunction("IstEinFlugzeug","i");
	new helikopter = CallLocalFunction("IstEinHelikopter","i");
	new boot = CallLocalFunction("IstEinBoot","i");
	if(!boot && !helikopter && !flugzeug && !quad && !motorad && !roller && !fahrrad)
	{
		return 1;
	}
	return 0;
}
ok?
Reply
#7

nobody has a solution?
Reply
#8

here this is my solution
Код:
stock IstEinAuto(carid)
{
	if(!IstEinFahrrad(carid) && !IstEinMotorroller(carid) && !IstEinQuad(carid) && !IstEinMotorad(carid) && !IstEinBoot(carid) && !IstEinHelikopter(carid) && !IstEinFlugzeug(carid))
	{
		return 1;
	}
  return 0;
}
is that right?
Reply
#9

Try to find out.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)