magic95607
|
分享:
x0
|
[1.6][插件] 有谁能帮我解读一下sma拜托><~
就是这个sma影行指令被打会解除隐形之后要卖掉技能才能使用= =我想知道原因
#pragma semicolon 1
#include <amxmodx> #include <fun> #include <rpgx>
#define MIN_ALPHA 25
new upgrade_id;
public plugin_init() register_plugin("Stealth RPGx Upgrade", "2.0", "SnowBall");
public RPGx_OnPluginReady() upgrade_id = RPGx_MakeUpgrade("学习隐形", 5, 15, 10);
public RPGx_OnPlayerSpawn(id) SetStealth(id);
public RPGx_OnUpgradePurchase(id, upgrade, newlevel){ if(upgrade == upgrade_id) SetStealth(id); }
public RPGx_OnUpgradeSell(id, upgrade, newlevel){ if(upgrade == upgrade_id) SetStealth(id); }
SetStealth(id){ new level = RPGx_GetUpgradeLevel(id, upgrade_id); if(level){ new newalpha = floatround((255 / RPGx_GetUpgradeMaxLevel(upgrade_id)) * ((float(RPGx_GetUpgradeMaxLevel(upgrade_id)) - float(level)))); if(newalpha < MIN_ALPHA) newalpha = MIN_ALPHA; set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, newalpha); } else set_user_rendering(id); }
|