08.04.2014, 11:36
that function only returns a value (1) when that control structure equals true.
But what if that's not the case?
pawn doesen't know what to do.
do it like this:
btw. relying on assumptions is the worst thing you could ever do.
it could easily mess up stuff. use an array to store the id's
like, when you create the vehicle:
But what if that's not the case?
pawn doesen't know what to do.
do it like this:
pawn Код:
stock IsPlayerInCopVehicle(playerid)
{
if(IsPlayerInVehicle(playerid, 427) || IsPlayerInVehicle(playerid, 490) ||
IsPlayerInVehicle(playerid, 497) || IsPlayerInVehicle(playerid, 523) ||
IsPlayerInVehicle(playerid, 596) || IsPlayerInVehicle(playerid, 597) ||
IsPlayerInVehicle(playerid, 598) || IsPlayerInVehicle(playerid, 599))
return 1;
else return 0;
}
it could easily mess up stuff. use an array to store the id's
like, when you create the vehicle:
pawn Код:
//globally
new copCar[8];//space for 8 id's (idx from 0 - 7)
//then when creating the cars:
copCar[0] = CreateVeh....
copCar[1] = CreateVeh....
//and so on