12.11.2011, 21:41
(
Последний раз редактировалось Sascha; 07.05.2016 в 09:45.
)
Sgt's Vehicle Functions Include
Hi guys,This include contains some functions to control vehicles more easily. Some are "new" some are just re-called.
The current release is a beta stage and I would be happy about some suggestions for more functions (either re-names of old, or creation of new functions)!!
Version 0.6
Код:
* GetVehicleModelByName(name[]); * IsValidVehicleModel(modelid); * VehicleExist(vehicleid); --> checks if a vehicle exists
Код:
* GetPlayerVehicleModel(playerid); * GetVehicleSpeed(vehicleid); * GetVehiclePlayers(vehicleid, player1, player2, player3, player4); --> DOES NOT RECOGNIZE PLAYERS IN SEATS HIGHER THAN ID 3 ----- 0.5.1 - GetVehicleSpeed fixed
Код:
* Float:GetVehicleRot(vehicleid); - FreezeVehicle updated
Код:
* StopVehicle(vehicleid); * FreezeVehicle(vehicleid, freezstate); --> 1 = freezed & 0 = unfreezed * ToggleVehicleParams(vehicleid, params[], pstate) --> T_ENGINE, T_LIGHTS, T_ALARM, T_TRUNK, T_BONNET, T_OBJECTIVE
Код:
* ToggleVehicleTrunk(vehicleid, trunkstate); --> 0 = closed & 1 = open * ToggleVehicleBonnet(vehicleid, bonnetstate); --> 0 = closed & 1 = open * ToggleVehicleAlarm(vehicleid, alarmstate); --> 0 = off & 1 = on * ToggleVehicleObjective(vehicleid, objectivestate); --> 0 = off & 1 = on
Код:
* RespawnVehicle(vehicleid) * SetVehicleColor(vehicleid, color1, color2); * SetVehicleModel(vehicleid, newmodel); --> Does only work for vehicles created with "CreateVehicle" * SetVehicleInterior(vehicleid, interiorid); * FlipVehicle(vehicleid); * SetVehicleRandomNumberPlate(vehicleid); * ExplodeVehicle(vehicleid); * ToggleVehicleEngine(vehicleid, enginestate); --> 0 = off & 1 = on * ToggleVehicleLight(vehicleid, lightstate); --> 0 = off & 1 = on * TeleportVehicle(vehicleid, Float:XCoord, Float:YCoord, Float:ZCoord, Float:Angle, Interiorid); * TeleportVehicleToPlayer(vehicleid, playerid); * Float:GetPlayerDistanceToVehicle(playerid, vehicleid); * GetPlayerNearestVehicle(playerid); * PutPlayerInNearestVehicle(playerid, seatid); --> same seatIDs as for PutPlayerInVehicle
External download: click here