Finished
This commit is contained in:
@ -7,6 +7,8 @@
|
||||
int g_PowerupMsg = 0;
|
||||
int g_StopPowerupMsg = 0;
|
||||
int g_ExplosionMsg = 0;
|
||||
int g_TransformFX = 0;
|
||||
int g_StopTransform = 0;
|
||||
|
||||
static cell AMX_NATIVE_CALL esf_start_powerup(AMX *amx, cell *params)
|
||||
{
|
||||
@ -33,6 +35,76 @@ static cell AMX_NATIVE_CALL esf_start_powerup(AMX *amx, cell *params)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static cell AMX_NATIVE_CALL esf_transformfx_1(AMX *amx, cell *params)
|
||||
{
|
||||
int index = params[1];
|
||||
CHECKPLAYER(index);
|
||||
|
||||
if (!g_TransformFX)
|
||||
{
|
||||
g_TransformFX = GET_USER_MSG_ID(PLID, "TransformFX", NULL);
|
||||
if (!g_TransformFX)
|
||||
{
|
||||
MF_LogError(amx, AMX_ERR_NATIVE, "Could not find TransformFX message!");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
MESSAGE_BEGIN(MSG_ALL, g_TransformFX);
|
||||
WRITE_BYTE(index);
|
||||
WRITE_BYTE(50);
|
||||
WRITE_BYTE(75);
|
||||
MESSAGE_END();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static cell AMX_NATIVE_CALL esf_transformfx_2(AMX *amx, cell *params)
|
||||
{
|
||||
int index = params[1];
|
||||
CHECKPLAYER(index);
|
||||
|
||||
if (!g_TransformFX)
|
||||
{
|
||||
g_TransformFX = GET_USER_MSG_ID(PLID, "TransformFX", NULL);
|
||||
if (!g_TransformFX)
|
||||
{
|
||||
MF_LogError(amx, AMX_ERR_NATIVE, "Could not find TransformFX message!");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
MESSAGE_BEGIN(MSG_ALL, g_TransformFX);
|
||||
WRITE_BYTE(index);
|
||||
WRITE_BYTE(100);
|
||||
WRITE_BYTE(75);
|
||||
MESSAGE_END();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static cell AMX_NATIVE_CALL esf_transformfx_off(AMX *amx, cell *params)
|
||||
{
|
||||
int index = params[1];
|
||||
CHECKPLAYER(index);
|
||||
|
||||
if (!g_StopTransform)
|
||||
{
|
||||
g_StopTransform = GET_USER_MSG_ID(PLID, "StopTransFX", NULL);
|
||||
if (!g_StopTransform)
|
||||
{
|
||||
MF_LogError(amx, AMX_ERR_NATIVE, "Could not find StopTransFX message!");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
MESSAGE_BEGIN(MSG_ALL, g_StopTransform);
|
||||
WRITE_BYTE(index);
|
||||
MESSAGE_END();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static cell AMX_NATIVE_CALL esf_stop_powerup(AMX *amx, cell *params)
|
||||
{
|
||||
int index = params[1];
|
||||
@ -93,5 +165,8 @@ AMX_NATIVE_INFO g_EffectsNatives[] = {
|
||||
{"esf_start_powerup", esf_start_powerup},
|
||||
{"esf_stop_powerup", esf_stop_powerup},
|
||||
{"esf_explosion", esf_explosion},
|
||||
{"esf_transformfx_1", esf_transformfx_1},
|
||||
{"esf_transformfx_2", esf_transformfx_2},
|
||||
{"esf_transformfx_off", esf_transformfx_off},
|
||||
{NULL, NULL},
|
||||
};
|
||||
|
Reference in New Issue
Block a user