Vehicle without engine issue
#10

Quote:
Originally Posted by SyS
Посмотреть сообщение
481 || 509 || 510 is 1.If you want to check it using || (logical OR) you should go for something like this:
PHP код:
if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 ||GetVehicleModel(vehicleid) == 510
or even
PHP код:
new tempidGetVehicleModel(vehicleid);
if(
tempid== 481 || tempid == 509 || tempid == 510
also
PHP код:
new vehicleid
you only declared the variable.you should give it some value.
PHP код:
new vehicleid GetPlayerVehicleID(playerid); 
but i would suggest use the function that someone posted above

PHP код:
EnginedVehicle(carid

    switch(
GetVehicleModel(carid)) 
    { 
        case 
400..480482..500502..508511..554556..563565..568571..583585..589592593595..605609: return true
    } 
    return 
false

and call the function
PHP код:
new vehicleid GetPlayerVehicleID(playerid);
if(
EnginedVehicle(vehicleid))
{
/*process*/

Thanks, +rep.
Reply


Messages In This Thread
Vehicle without engine issue - by Mike861 - 24.07.2018, 18:42
Re: Vehicle without engine issue - by Florin48 - 24.07.2018, 19:49
Re: Vehicle without engine issue - by Mike861 - 24.07.2018, 19:53
Re: Vehicle without engine issue - by Florin48 - 24.07.2018, 20:04
Re: Vehicle without engine issue - by JasonRiggs - 24.07.2018, 20:27
Re: Vehicle without engine issue - by Florin48 - 24.07.2018, 20:31
Re: Vehicle without engine issue - by JasonRiggs - 24.07.2018, 20:55
Re: Vehicle without engine issue - by Mike861 - 25.07.2018, 07:19
Re: Vehicle without engine issue - by SyS - 25.07.2018, 08:17
Re: Vehicle without engine issue - by Mike861 - 25.07.2018, 08:25

Forum Jump:


Users browsing this thread: 3 Guest(s)