17.06.2015, 11:29
what is wrong with that code, it won't create third vehicle. #pBVeh
pawn Код:
if(PlayerInfo[playerid][pVeh])
{
PlayerInfo[playerid][pVVeh] = CreateVehicle(carid, 532.3726,-1287.4926,17.2422,272.3125,0,0,32000);
SetVehicleParamsEx(PlayerInfo[playerid][pVVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vVLocked] = 1;
PlayerInfo[playerid][vVModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVX], PlayerInfo[playerid][vVY], PlayerInfo[playerid][vVZ]);
GetVehicleZAngle(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVA]);
PlayerInfo[playerid][vVC1] = 0;
PlayerInfo[playerid][vVC2] = 0;
return 1;
}
if(!PlayerInfo[playerid][pVeh])
{
PlayerInfo[playerid][pVeh] = CreateVehicle(carid, 532.3726,-1287.4926,17.2422,272.3125,0,0,32000);
SetVehicleParamsEx(PlayerInfo[playerid][pVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vLocked] = 1;
PlayerInfo[playerid][vModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vX], PlayerInfo[playerid][vY], PlayerInfo[playerid][vZ]);
GetVehicleZAngle(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vA]);
PlayerInfo[playerid][vC1] = 0;
PlayerInfo[playerid][vC2] = 0;
return 1;
}
if(PlayerInfo[playerid][pVVeh])
{
PlayerInfo[playerid][pBVeh] = CreateVehicle(carid, 532.3726,-1287.4926,17.2422,272.3125,0,0,32000);
SetVehicleParamsEx(PlayerInfo[playerid][pBVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vBLocked] = 1;
PlayerInfo[playerid][vBModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pBVeh], PlayerInfo[playerid][vBX], PlayerInfo[playerid][vBY], PlayerInfo[playerid][vBZ]);
GetVehicleZAngle(PlayerInfo[playerid][pBVeh], PlayerInfo[playerid][vBA]);
PlayerInfo[playerid][vBC1] = 0;
PlayerInfo[playerid][vBC2] = 0;
return 1;
}
}
}