Help on Getvehiclemodel
#1

I know, this is a noob question but I need your help.

How to increase the Vehicle ids in this line?
PHP код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == [COLOR="Red"][B]476[/B][/COLOR]) 
Reply
#2

Use enum or use || or && on the right of the line.
Like
PHP код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) =** && GetVehicleModel(GetPlayerVehicleID(playerid)) = ** && ** 
Reply
#3

If you want to check if it's within the range of two integers, you can use the ">=" operator along with the "<=" operator, example:

pawn Код:
bool IsWithinRange(number, n1, n2)
{
      if(number >= n1 && number <= n2)
      {
             return true;
      }

      return false;
}
Then you can use it like:
pawn Код:
if(isWithinRange(GetVehicleModel(GetPlayerVehicleID), 478, 480))
This will return true if the model is within 478 and 480. Otherwise the function will return false. If you mean you want to actually increase the model of the vehicle then you will need to recreate it with the new model.
Reply
#4

Quote:
Originally Posted by Abagail
Посмотреть сообщение
If you want to check if it's within the range of two integers, you can use the ">=" operator along with the "<=" operator, example:

pawn Код:
bool IsWithinRange(number, n1, n2)
{
      if(number >= n1 && number <= n2)
      {
             return true;
      }

      return false;
}
Then you can use it like:
pawn Код:
if(isWithinRange(GetVehicleModel(GetPlayerVehicleID), 478, 480))
This will return true if the model is within 478 and 480. Otherwise the function will return false. If you mean you want to actually increase the model of the vehicle then you will need to recreate it with the new model.
ok thank you m8
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)