Помогите сделать в первом плагине так как во втором когда биндишь кнопку bind mouse3 +sm_jetpack и после зажатия её то ты взлетаешь когда отпускаешь то джетпак отключается №1
Код
#include <sourcemod> #include <sdktools> #include <morecolors> new fuel[MAXPLAYERS+1] new fuelreset[MAXPLAYERS+1] new Handle:player[MAXPLAYERS+1] //new Handle:g_password; new Handle:g_fuel; new Handle:g_fuelreset;
//new Float:Location[3]; //This plugin must not be sold!
public Plugin:myinfo = { name = "Adv Jetpack", author = "ShadowDragon", description = "a private plugin request for R@ Blackglade", version = "1.0", url = ""
}
public OnPluginStart() { AutoExecConfig(); RegConsoleCmd("sm_jet", Command_jet); //g_password = CreateConVar("sm_jetpassword", "1", "Password to run the plugin", 0, true, 0.0); g_fuel = CreateConVar("sm_jetfuel", "10", "The amount of time the jet pack will last", 0, true, 0.0); g_fuelreset = CreateConVar("sm_jetfuelreset", "30", "The amount of time it takes to refule", 0, true, 0.0);
}
public OnMapStart() { PrecacheSound("jetpack/jetpack.wav"); PrecacheSound("jetpack/redalert.wav"); PrecacheSound("jetpack/cloak.wav"); } public OnClientPutInServer(client) {
}
public Action:Command_jet(client, args) { if (client && IsClientInGame(client)) { //new value; //value = GetConVarInt(g_password) new peet; peet = GetConVarInt(g_fuel)
// ConVars new Handle:sm_jetpack = INVALID_HANDLE; new Handle:sm_jetpack_sound = INVALID_HANDLE; new Handle:sm_jetpack_speed = INVALID_HANDLE; new Handle:sm_jetpack_volume = INVALID_HANDLE;
// SendProp Offsets new g_iLifeState = -1; new g_iMoveCollide = -1; new g_iMoveType = -1; new g_iVelocity = -1;
// Soundfile new String:g_sSound[255] = "vehicles/airboat/fan_blade_fullthrottle_loop1.wav";
// Is Jetpack Enabled new bool:g_bJetpacks[MAXPLAYERS + 1] = {false,...}; new bool:g_bAllowedToUseJetpack[MAXPLAYERS+1] = {false,...};
new Float:g_flJetpackLength[MAXPLAYERS+1] = {0.0,...};
// Timer For GameFrame new Float:g_fTimer = 0.0;
// MaxClients new g_iMaxClients = 0;
public Plugin:myinfo = { name = "Jetpack", author = "Knagg0", description = "", version = PLUGIN_VERSION, url = "http://www.mfzb.de" };