Hello, need help again
it should be black and shake but i do nothing. thanks a lot again
Code:
#define SHAKE_AMPLITUDE 16.0 // max = 16.0
#define SHAKE_DURATION 6.0 // max = 16.0
#define SHAKE_FREQUENCY 100.0 // max = 256.0
Code:
if (equali(arg1, "/zariche") == 1)
{
ScreenFade_Zariche(id)
return PLUGIN_HANDLED
}
Code:
public ScreenFade_Zariche(id)
{
print_color(id, "Napisal si zariche") // jsut check if function was called
new players[32], num
//get_players(players, num, "ace", "CT")
get_players(players, num);
new shakeAmplitude = __FixedUnsigned16(SHAKE_AMPLITUDE, 1<<12)
new shakeDuration = __FixedUnsigned16(SHAKE_DURATION, 1<<12)
new shakeFrequency = __FixedUnsigned16(SHAKE_FREQUENCY, 1<<9)
for(--num; num>=0; num--)
{
message_begin(MSG_ONE, gmsgShake, .player = players[num])
{
write_short( shakeAmplitude ) // shake amount.
write_short( shakeDuration ) // shake lasts this long.
write_short( shakeFrequency ) // shake noise frequency.
}
message_end()
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, players[num]);
{
write_short(4096*10); // Duration
write_short(4); // Hold time 4096*2
write_short(4096); // Fade type
write_byte(0); // Red
write_byte(0); // Green
write_byte(0); // Blue
write_byte(255); // Alpha
}
message_end();
}
return PLUGIN_HANDLED
}
Code:
__FixedUnsigned16(Float:flValue, iScale)
{
new iOutput;
iOutput = floatround(flValue * iScale)
if ( iOutput < 0 )
iOutput = 0
if ( iOutput > 0xFFFF )
iOutput = 0xFFFF
return iOutput
}