28.02.2017, 05:47
(
Последний раз редактировалось AbyssMorgan; 17.05.2017 в 21:29.
)
[REMOVED]
SetVehicleParachuteKey(key);
#define VP_LANG_01 "~g~Parachute has been thrown"
#define VP_LANG_02 "~g~Parachute has been opened"
#define VP_LANG_03 "~g~Cannot use parachute"
#include <VehPara>
stock ToggleVehicleParachute(vehicleid,bool:toggle){ for(new i = 0; i < 3; i++) { if(IsValidDynamicObject(VehicleParachuteObject[vehicleid][i])) DestroyDynamicObject(VehicleParachuteObject[vehicleid][i]); VehicleParachuteObject[vehicleid][i] = INVALID_STREAMER_ID; }
stock StartVehicleParachuteAction(playerid){ TogglePlayerUsingVehPara(playerid,1); new vid = GetPlayerVehicleID(playerid); for(new i = 0; i < MAX_PARA_OBJECTS; i++) { if(IsValidDynamicObject(VehicleParachuteObject[vid][i])) { DestroyDynamicObject(VehicleParachuteObject[vid][i]); if(i == 0) CreateDynamicObject(18849,0.0,0.0,-6000.0,0.0,0.0,0.0,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid)); else DestroyDynamicObject(VehicleParachuteObject[vid][i]); } }
I know what it is like when you write a lot of shit and getting it to work takes a bit of time then you look back and say "why the fuck did I do that like that?" how about these updates in school they teach about lowest common factors it applies vigorously to any coding
Код:
stock ToggleVehicleParachute(vehicleid,bool:toggle){ for(new i = 0; i < 3; i++) { if(IsValidDynamicObject(VehicleParachuteObject[vehicleid][i])) DestroyDynamicObject(VehicleParachuteObject[vehicleid][i]); VehicleParachuteObject[vehicleid][i] = INVALID_STREAMER_ID; } Код:
stock StartVehicleParachuteAction(playerid){ TogglePlayerUsingVehPara(playerid,1); new vid = GetPlayerVehicleID(playerid); for(new i = 0; i < MAX_PARA_OBJECTS; i++) { if(IsValidDynamicObject(VehicleParachuteObject[vid][i])) { DestroyDynamicObject(VehicleParachuteObject[vid][i]); if(i == 0) CreateDynamicObject(18849,0.0,0.0,-6000.0,0.0,0.0,0.0,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid)); else DestroyDynamicObject(VehicleParachuteObject[vid][i]); } } |