Возникла такая проблема:
Вот для пилотных лицензий и тд самолёты считываются у меня так:
[pwn]new VihAir[8]; public IsAPlane(carid)
{
if(carid >= VihAir[0] && carid <= VihAir[7])
{
return 1;
}
return 0;
}
public InitLockDoors(playerid)
{
if (gdebug >= 1){printf("DEBUG1 InitLockDoors(%d)",playerid);}
new c;
while (c < 254)
{
c++;
if (gCarLock[c] == 1)
{
if (gdebug >= 1){printf("DEBUG3 InitLockDoors(%d)car(%d)",playerid,c);}
SetVehicleParamsForPlayer(c,playerid,0,1);
}
}
if(PlayerInfo[playerid][PLicence] != 1)
{
for(new w = 0; w < sizeof(VihAir); w++)
{
SetVehicleParamsForPlayer(VihAir[w],playerid,0,1);
}
}
else
{
for(new w = 0; w < sizeof(VihAir); w++)
{
SetVehicleParamsForPlayer(VihAir[w],playerid,0,0);
}
}
return 1;
}
//Air Vihecle
VihAir[0] = CreateStreamVehicle(476,1935.763794,-2416.733887,13.846451,89.0,-1,-1);//dodos//ls//87
VihAir[1] = CreateStreamVehicle(511,1848.121704,-2435.860352,13.754265,89.0,-1,-1);//ls
VihAir[2] = CreateStreamVehicle(476,-1297.811279,-457.169250,14.448013,89.0,-1,-1);//lv
VihAir[3] = CreateStreamVehicle(511,-1286.913696,-394.913086,14.448013,89.0,-1,-1);//lv
VihAir[4] = CreateStreamVehicle(476,1586.432007,1615.842651,11.119888,89.0,-1,-1);//sf
VihAir[5] = CreateStreamVehicle(511,1634.947388,1555.917969,11.109032,89.0,-1,-1);//sf//92
VihAir[6] = CreateStreamVehicle(497, 1517.8,-1656.1,13.7,0.0, -1, -1);//police mavric//93
VihAir[7] = CreateStreamVehicle(497,1116.5,-2053.9,74.4,358.5, -1, -1);//94[/pwn]
А мне надо чтобы считывался ИД траспорта
Допустим вот так:
[pwn]public IsAPlaneM(carid)
{
new planemodel;
planemodel = GetVehicleModel(carid);
if((planemodel==520)||(planemodel==476)||(planemodel==593)||(planemodel==553)||(planemodel==513)||(planemodel==512)||(planemodel==577)||( planemodel==592)||(planemodel==511)||(planemodel==539)||(planemodel==464)||(planemodel==460)||(planemodel==519))
{
return 1;
}
return 0;
}[/pwn]
Как вставить это в предыдущие функции??