09.09.2017, 20:48
(
Последний раз редактировалось Puff; 10.09.2017 в 05:29.
)
PHP код:
public onCreateFactionVehicle(factionid, model, Float:X, Float:Y, Float:Z, Float:Angle, c1, c2) {
new id = mysql_insert_id();
new msg[128];
format(msg, sizeof(msg), "* Faction Vehicle SQL ID: %d", id);
ABroadcast(X11_YELLOW, msg, EAdminFlags_FactionAdmin);
new carid = CreateVehicle(model,X,Y,Z,Angle,c1,c2,DEF_RESPAWN_DELAY,0);
if(!IsACar(model)) {
VehicleInfo[carid][EVEngine] = 1;
} else {
VehicleInfo[carid][EVEngine] = 0;
}
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(carid,VehicleInfo[carid][EVEngine],lights,alarm,doors,bonnet,boot,objective);
VehicleInfo[carid][EVToDelete] = 0;
VehicleInfo[carid][EVOwner] = factionid;
VehicleInfo[carid][EVColour][0] = c1;
VehicleInfo[carid][EVColour][1] = c2;
VehicleInfo[carid][EVFuel] = 100;
VehicleInfo[carid][EVRadioStation] = -1;
VehicleInfo[carid][EVLockType] = ELockType_Default;
VehicleInfo[carid][EVSQLID] = id;
VehicleInfo[carid][EVType] = EVehicleType_Faction;
if(getFactionType(VehicleInfo[carid][EVOwner]) != EFactionType_Hitman) {
SetVehicleNumberPlate(carid, GetFactionName(factionid));
}
SetVehicleStation(carid, 0);
}