Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- @Release Name: GetVehicleColor
- @Release Type: Include
- @Author: RyDeR`
- @Version: 1.0
- @Last Update: 13/09/2010 ~ 16:30
- @Bugs: /
- @Author Notes: You must use addStaticVehicle(Ex) and/or createVehicle and/or destroyVehicle instead of the standart functions!
- @Functions:
- // -- [Need Functions] -- //
- @Function: addStaticVehicle(modelid, Float: x, Float: y, Float: z, Float: angle, color1, color2)
- @Info: Same function as AddStaticVehicle
- @Params:
- - /(Obvious)
- @Function: addStaticVehicleEx(modelid, Float: x, Float: y, Float: z, Float: angle, color1, color2, respawn_delay)
- @Info: Same function as AddStaticVehicleEx
- @Params:
- - /(Obvious)
- @Function: createVehicle(vehicletype, Float: x, Float: y, Float: z, Float: rotation, color1, color2, respawn_delay)
- @Info: Same function as CreateVehicle
- @Params:
- - /(Obvious)
- @Function: destroyVehicle(vehicleid)
- @Info: Same function as DestroyVehicle
- @Params:
- - /(Obvious)
- // -- [Main Function] -- //
- @Function: GetVehicleColor(vehicleid, &color1, &color2)
- @Info: Will store the vehicle colors in variable color1 and color2 you create.
- @Params:
- - vehicleid = The ID of the vehicle
- - &color1 = The variable you create to store color1 in.
- - &color2 = Same here as above but for color2.
- */
- new
- vehicleColor[MAX_VEHICLES][2]
- ;
- stock addStaticVehicle(modelid, Float: x, Float: y, Float: z, Float: angle, color1, color2)
- {
- new
- vehicleid = AddStaticVehicle(modelid, x, y, z, angle, color1, color2)
- ;
- return ((vehicleColor[vehicleid][0] = color1), (vehicleColor[vehicleid][1] = color2));
- }
- stock addStaticVehicleEx(modelid, Float: x, Float: y, Float: z, Float: angle, color1, color2, respawn_delay)
- {
- new
- vehicleid = AddStaticVehicleEx(modelid, x, y, z, angle, color1, color2, respawn_delay)
- ;
- return ((vehicleColor[vehicleid][0] = color1), (vehicleColor[vehicleid][1] = color2));
- }
- stock createVehicle(vehicletype, Float: x, Float: y, Float: z, Float: rotation, color1, color2, respawn_delay)
- {
- new
- vehicleid = CreateVehicle(vehicletype, x, y, z, rotation, color1, color2, respawn_delay)
- ;
- return ((vehicleColor[vehicleid][0] = color1), (vehicleColor[vehicleid][1] = color2));
- }
- stock destroyVehicle(vehicleid)
- {
- return DestroyVehicle(vehicleid);
- }
- stock GetVehicleColor(vehicleid, &color1, &color2)
- {
- return ((color1 = vehicleColor[vehicleid][0]), (color2 = vehicleColor[vehicleid][1]));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement