|
|
#1 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2009
Location: Germany
Posts: 1,175
Reputation: 48
|
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 Code:
* GetVehicleModelByName(name[]); * IsValidVehicleModel(modelid); * VehicleExist(vehicleid); --> checks if a vehicle exists Code:
* 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 Code:
* Float:GetVehicleRot(vehicleid); - FreezeVehicle updated Code:
* 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 Code:
* 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 Code:
* 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 Thanks and I hope you'll like it, although there aren't that much new functions yet. External download: click here Last edited by Sascha; 14/12/2011 at 05:53 PM. |
|
|
|
|
|
#2 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: May 2010
Location: Republic of Moldova
Posts: 1,159
Reputation: 50
|
Damn, good job!
Add ToggleVehicleTrunk, Bonnet, Alarm, really useful, might use it one day. |
|
|
|
|
|
#3 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2009
Location: Germany
Posts: 1,175
Reputation: 48
|
thanks for the suggestion, added those function and uploaded version 0.2
|
|
|
|
|
|
#4 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2008
Location: Northern Ireland
Posts: 2,724
Reputation: 204
|
|
|
|
|
|
|
#5 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2009
Location: Germany
Posts: 1,175
Reputation: 48
|
nice idea, norn, I'll add that, too for 0.3
|
|
|
|
|
|
#6 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: May 2010
Location: Republic of Moldova
Posts: 1,159
Reputation: 50
|
|
|
|
|
|
|
#7 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2011
Location: Zadar, Croatia
Posts: 990
Reputation: 130
|
wow, very nice and greate idea
Keep it up man, rep+
|
|
|
|
|
|
#8 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2009
Location: Germany
Posts: 1,175
Reputation: 48
|
updated to 0.3
more suggestions for functions are appreciated |
|
|
|
|
|
#9 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Dec 2010
Location: Belgium
Posts: 2,411
Reputation: 709
|
God damn it
Thanks for FreezeVehicle() !!!!I tested it but it seem it has a problem with the timer, it freezes the vehicle less then a second then unfreeze (normal), then again freeze less then a second and unfreeze again ? You know what i mean
|
|
|
|
|
|
#10 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Mar 2011
Posts: 397
Reputation: 33
|
nice work friend
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [FilterScript] Sgt's Driving License | Sascha | Filterscripts | 16 | 16/11/2011 03:46 PM |
| [Include] [INC] Vehicle functions v0.2.1 R2 | kurta999 | Includes | 8 | 25/03/2011 05:19 PM |
| [FilterScript] [FS] Vehicle Functions | aircombat | Filterscripts | 19 | 25/08/2010 12:41 AM |
| [FilterScript] [FS] Vehicle Functions (Engine, Fuel, Car Names) | Homerman | Filterscripts | 120 | 03/01/2010 10:22 AM |