I started to work on vehicle streamer in august, now it's in alpha state so who interested, feel free to test it. It is the latest version + vehicle streamer. There will be bugs, it's on beta stage. Trailer functions not completed yet. Who have an idea how to write the best trailer streaming, help me
pawn Код:
#define STREAMER_VEHICLE_TYPE_STATIC (0)
#define STREAMER_VEHICLE_TYPE_DYNAMIC (1)
native AttachDynamicObjectToVehicle(objectid, vehicleid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz, vehicletype = STREAMER_VEHICLE_TYPE_DYNAMIC);
forward OnDynamicVehicleSpawn(vehicleid);
forward OnDynamicVehicleDeath(vehicleid, killerid);
forward OnPlayerEnterDynamicVehicle(playerid, vehicleid, ispassenger);
forward OnPlayerExitDynamicVehicle(playerid, vehicleid);
forward OnDynamicVehicleMod(playerid, vehicleid, componentid);
forward OnDynamicVehiclePaintjob(playerid, vehicleid, paintjobid);
forward OnDynamicVehicleRespray(playerid, vehicleid, color1, color2);
forward OnDynamicVehDamageStatusUpdate(vehicleid, playerid);
forward OnUnoccupiedDynamicVehUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z);
forward OnDynamicVehicleStreamIn(vehicleid, forplayerid);
forward OnDynamicVehicleStreamOut(vehicleid, forplayerid);
native CreateDynamicVehicle(modelid, Float:fX, Float:fY, Float:fZ, Float:fRot, color1, color2, respawndelay, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 300.0);
native DestroyDynamicVehicle(vehicleid);
native IsValidDynamicVehicle(vehicleid);
native IsDynamicVehicleStreamedIn(vehicleid, forplayerid);
native GetDynamicVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z);
native SetDynamicVehiclePos(vehicleid, Float:x, Float:y, Float:z);
native GetDynamicVehicleZAngle(vehicleid, &Float:z_angle);
native GetDynamicVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z);
native SetDynamicVehicleZAngle(vehicleid, Float:z_angle);
native SetDynamicVehParamsForPlayer(vehicleid,playerid,objective,doorslocked);
native SetDynamicVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
native GetDynamicVehicleParamsEx(vehicleid, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective);
native SetDynamicVehicleToRespawn(vehicleid);
native LinkDynamicVehicleToInterior(vehicleid, interiorid);
native AddDynamicVehicleComponent(vehicleid, componentid);
native RemoveDynamicVehicleComponent(vehicleid, componentid);
native ChangeDynamicVehicleColor(vehicleid, color1, color2);
native ChangeDynamicVehiclePaintjob(vehicleid, paintjobid);
native SetDynamicVehicleHealth(vehicleid, Float:health);
native GetDynamicVehicleHealth(vehicleid, &Float:health);
native AttachTrailerToDynamicVehicle(trailerid, vehicleid);
native DetachTrailerFromDynamicVeh(vehicleid);
native IsTrailerAttachedToDynamicVeh(vehicleid);
native GetDynamicVehicleTrailer(vehicleid);
native SetDynamicVehicleNumberPlate(vehicleid, plate[]);
native GetDynamicVehicleModel(vehicleid);
native RepairDynamicVehicle(vehicleid); // Repairs the damage model and resets the health
native GetDynamicVehicleVelocity(vehicleid, &Float:X, &Float:Y, &Float:Z);
native SetDynamicVehicleVelocity(vehicleid, Float:X, Float:Y, Float:Z);
native SetDynamicVehAngularVelocity(vehicleid, Float:X, Float:Y, Float:Z);
native GetDynamicVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires);
native UpdateDynamicVehDamageStatus(vehicleid, panels, doors, lights, tires);
native GetPlayerSurfingDynamicVehID(playerid);
native PutPlayerInDynamicVehicle(playerid, vehicleid, seatid);
native GetPlayerDynamicVehicleID(playerid);
native IsPlayerInDynamicVehicle(playerid, vehicleid);
native IsPlayerInAnyDynamicVehicle(vehicleid);
native PlayerSpectateDynamicVehicle(playerid, targetvehicleid, mode = SPECTATE_MODE_NORMAL);