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); }
|