Raised This Month: $51 Target: $400
 12% 

I can't compile plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jievylook
Senior Member
Join Date: Sep 2018
Old 08-02-2019 , 20:43   I can't compile plugin
Reply With Quote #1

I need to compile this plugin in amx 1.8.2 but I can't.

Can someone help me please?

PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <dhudmessage>
#include <zombieplague>

//#define g_bDebug;

const g_iTaskCountdownID 57;
const 
g_iTaskLightningID 75;

new const 
g_szSoundsRoundStart[][] =
{
    
""
}
const 
g_iSizeSoundsRoundStart sizeof g_szSoundsRoundStart 1;

new const 
g_szSoundsThunderRoundStart[][] =
{
    
"TalRasha/countdown/thunder",
    
"TalRasha/countdown/thunder2"
}
const 
g_iSizeSoundsThunderRoundStart sizeof g_szSoundsThunderRoundStart 1;

new const 
g_szLightsThunderClap1[][2] =
{
    
"z"
}
const 
g_iSizeLightsThunderClap1 sizeof g_szLightsThunderClap1 1;

new const 
g_szLightsThunderClap2[][2] =
{
    
"z"
}
const 
g_iSizeLightsThunderClap2 sizeof g_szLightsThunderClap2 1;

#define MESSAGE_SOUND    "TalRasha/countdown/player.wav"

new const g_szSoundsCountdown[][] =
{
    
"TalRasha/countdown/one",                        // 1
    
"TalRasha/countdown/two",                        // 2
    
"TalRasha/countdown/three",                        // 3
    
"TalRasha/countdown/four",                        // 4
    
"TalRasha/countdown/five",                        // 5
    
"TalRasha/countdown/six",                        // 6
    
"TalRasha/countdown/seven",                        // 7
    
"TalRasha/countdown/eight",                        // 8
    
"TalRasha/countdown/nine",                        // 9
    
"TalRasha/countdown/ten",                        // 10
    
"",                                                // 11
    
"TalRasha/countdown/NewRoundIn",                // 12
    
"",                                                // 13
    
"",                                                // 14 
    
"TalRasha/countdown/You_are_attacking",            // 15
    
"",                                                // 16
    
"",                                                // 17
    
"fvox/biohazard_detected",                        // 18
    
"",                                                // 19
    
"TalRasha/countdown/20_seconds",                // 20
    
"",                                                // 21
    
"TalRasha/countdown/New_assault_in",            // 22
    
"",                                                // 23
    
"sound/TalRasha/countdown/start.mp3",            // 24
    
"",                                                // 25
    
"TalRasha/countdown/care_infection",            // 26
    
"",                                                // 27
    
"",                                                // 28
    
"TalRasha/countdown/sirena",                    // 29
    
"TalRasha/countdown/30_seconds"                 // 30
}
const 
g_iSizeSoundsCountdown sizeof g_szSoundsCountdown 1;

new const 
g_szLightsCountdownLevels[][2] =
{
    
"b""c""d""e""f""g""h""i""j""k""l""m"
}
const 
g_iSizeLightsCountdownLevels sizeof g_szLightsCountdownLevels 1;

new const 
g_szSoundsModeStart[][] =
{
    
"TalRasha/countdown/start_infect",
    
"TalRasha/countdown/start_infect2",
    
"TalRasha/countdown/start_infect3"
}
const 
g_iSizeSoundsModeStart sizeof g_szSoundsModeStart 1;

new const 
g_szSoundsThunderModeStart[][] =
{
    
"TalRasha/countdown/thunder",
    
"TalRasha/countdown/thunder2"
}
const 
g_iSizeSoundsThunderModeStart sizeof g_szSoundsThunderModeStart 1;

new 
g_pCvarEffectsg_pCvarDelayg_pCvarLightingg_iDelayg_szLighting[2], g_iSeconds;

public 
plugin_init()
{
    
register_plugin("Countdown""1.7.3""T a l R a s h a")
    
    
register_dictionary("gameplay_countdown.txt")
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
    
g_pCvarEffects register_cvar("zpnm_countdown_effects""1");
}

IsMp3(const szSound[])
    return 
equali(szSound[strlen(szSound) - 4], ".mp3");

public 
plugin_precache()
{
    new 
iszSound[64], iPositioniPositionTempszFolder[64];
    
    
precache_sound("TalRasha/chat/player.wav")
    
    for (
0<= g_iSizeSoundsRoundStarti++)
    {
        if (!
g_szSoundsRoundStart[i][0])
            continue;
        
        if (
IsMp3(g_szSoundsRoundStart[i]))
            
engfunc(EngFunc_PrecacheGenericg_szSoundsRoundStart[i])
        else
        {
            
// Doesn't contain any spaces
            
if (containi(g_szSoundsRoundStart[i], " ") == -1)
            {
                
formatex(szSound63"%s.wav"g_szSoundsRoundStart[i])
                
                
engfunc(EngFunc_PrecacheSoundszSound)
            }
            
// Contains spaces
            
else
            {
                
iPosition 0;
                
                while ((
iPositionTemp containi(g_szSoundsRoundStart[i][iPosition], "/")) != -1)
                {
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Scanning ^"%s^" for ^"/^" symbols."g_szSoundsRoundStart[i][iPosition])
                    
#endif
                    
                    
iPosition += iPositionTemp 1;
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""^"/^" symbol found at position %d: ^"%s^""iPositionTempg_szSoundsRoundStart[i][iPosition 1])
                    
log_to_file("CountDown.log""Remaining directories and sounds found: ^"%s^""g_szSoundsRoundStart[i][iPosition])
                    
log_to_file("CountDown.log""")
                    
#endif
                
}
                
                if (
iPosition)
                {
                    
formatex(szFolder63g_szSoundsRoundStart[i])
                    
replace(szFolder63g_szSoundsRoundStart[i][iPosition], "")
                }
                
                
#if defined g_bDebug
                
log_to_file("CountDown.log""Directory found: ^"%s^""szFolder)
                
log_to_file("CountDown.log""Sounds found: ^"%s^""g_szSoundsRoundStart[i][iPosition])
                
log_to_file("CountDown.log""")
                
#endif
                
                
while ((iPositionTemp containi(g_szSoundsRoundStart[i][iPosition], " ")) != -1)
                {
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Scanning ^"%s^" for ^" ^" symbols."g_szSoundsRoundStart[i][iPosition])
                    
#endif
                    
                    
formatex(szSound63g_szSoundsRoundStart[i][iPosition])
                    
                    
iPosition += iPositionTemp;
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""^" ^" symbol found at position %d: ^"%s^""iPositionTempg_szSoundsRoundStart[i][iPosition])
                    
#endif
                    
                    
replace(szSound63g_szSoundsRoundStart[i][iPosition], "")
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Found sound: ^"%s^""szSound)
                    
#endif
                    
                    
format(szSound63"%s%s.wav"szFolderszSound)
                    
engfunc(EngFunc_PrecacheSoundszSound)
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Precaching sound: ^"%s^""szSound)
                    
#endif
                    
                    
iPosition += 1;
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Remaining sounds found: ^"%s^""g_szSoundsRoundStart[i][iPosition])
                    
log_to_file("CountDown.log""")
                    
#endif
                
}
                
                
formatex(szSound63"%s%s.wav"szFolderg_szSoundsRoundStart[i][iPosition])
                
engfunc(EngFunc_PrecacheSoundszSound)
                
                
#if defined g_bDebug
                
log_to_file("CountDown.log""Precaching sound: ^"%s^""szSound)
                
log_to_file("CountDown.log""")
                
#endif
            
}
        }
    }
    
    for (
0<= g_iSizeSoundsThunderRoundStarti++)
    {
        if (!
g_szSoundsThunderRoundStart[i][0])
            continue;
        
        if (
IsMp3(g_szSoundsThunderRoundStart[i]))
            
engfunc(EngFunc_PrecacheGenericg_szSoundsThunderRoundStart[i])
        else
        {
            
// Doesn't contain any spaces
            
if (containi(g_szSoundsThunderRoundStart[i], " ") == -1)
            {
                
formatex(szSound63"%s.wav"g_szSoundsThunderRoundStart[i])
                
                
engfunc(EngFunc_PrecacheSoundszSound)
            }
            
// Contains spaces
            
else
            {
                
iPosition 0;
                
                while ((
iPositionTemp containi(g_szSoundsThunderRoundStart[i][iPosition], "/")) != -1)
                {
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Scanning ^"%s^" for ^"/^" symbols."g_szSoundsThunderRoundStart[i][iPosition])
                    
#endif
                    
                    
iPosition += iPositionTemp 1;
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""^"/^" symbol found at position %d: ^"%s^""iPositionTempg_szSoundsThunderRoundStart[i][iPosition 1])
                    
log_to_file("CountDown.log""Remaining directories and sounds found: ^"%s^""g_szSoundsThunderRoundStart[i][iPosition])
                    
log_to_file("CountDown.log""")
                    
#endif
                
}
                
                if (
iPosition)
                {
                    
formatex(szFolder63g_szSoundsThunderRoundStart[i])
                    
replace(szFolder63g_szSoundsThunderRoundStart[i][iPosition], "")
                }
                
                
#if defined g_bDebug
                
log_to_file("CountDown.log""Directory found: ^"%s^""szFolder)
                
log_to_file("CountDown.log""Sounds found: ^"%s^""g_szSoundsThunderRoundStart[i][iPosition])
                
log_to_file("CountDown.log""")
                
#endif
                
                
while ((iPositionTemp containi(g_szSoundsThunderRoundStart[i][iPosition], " ")) != -1)
                {
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Scanning ^"%s^" for ^" ^" symbols."g_szSoundsThunderRoundStart[i][iPosition])
                    
#endif
                    
                    
formatex(szSound63g_szSoundsThunderRoundStart[i][iPosition])
                    
                    
iPosition += iPositionTemp;
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""^" ^" symbol found at position %d: ^"%s^""iPositionTempg_szSoundsThunderRoundStart[i][iPosition])
                    
#endif
                    
                    
replace(szSound63g_szSoundsThunderRoundStart[i][iPosition], "")
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Found sound: ^"%s^""szSound)
                    
#endif
                    
                    
format(szSound63"%s%s.wav"szFolderszSound)
                    
engfunc(EngFunc_PrecacheSoundszSound)
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Precaching sound: ^"%s^""szSound)
                    
#endif
                    
                    
iPosition += 1;
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Remaining sounds found: ^"%s^""g_szSoundsThunderRoundStart[i][iPosition])
                    
log_to_file("CountDown.log""")
                    
#endif
                
}
                
                
formatex(szSound63"%s%s.wav"szFolderg_szSoundsThunderRoundStart[i][iPosition])
                
engfunc(EngFunc_PrecacheSoundszSound)
                
                
#if defined g_bDebug
                
log_to_file("CountDown.log""Precaching sound: ^"%s^""szSound)
                
log_to_file("CountDown.log""")
                
#endif
            
}
        }
    }
    
    for (
0<= g_iSizeSoundsCountdowni++)
    {
        if (!
g_szSoundsCountdown[i][0])
            continue;
        
        if (
IsMp3(g_szSoundsCountdown[i]))
            
engfunc(EngFunc_PrecacheGenericg_szSoundsCountdown[i])
        else
        {
            
// Doesn't contain any spaces
            
if (containi(g_szSoundsCountdown[i], " ") == -1)
            {
                
formatex(szSound63"%s.wav"g_szSoundsCountdown[i])
                
                
engfunc(EngFunc_PrecacheSoundszSound)
            }
            
// Contains spaces
            
else
            {
                
iPosition 0;
                
                while ((
iPositionTemp containi(g_szSoundsCountdown[i][iPosition], "/")) != -1)
                {
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Scanning ^"%s^" for ^"/^" symbols."g_szSoundsCountdown[i][iPosition])
                    
#endif
                    
                    
iPosition += iPositionTemp 1;
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""^"/^" symbol found at position %d: ^"%s^""iPositionTempg_szSoundsCountdown[i][iPosition 1])
                    
log_to_file("CountDown.log""Remaining directories and sounds found: ^"%s^""g_szSoundsCountdown[i][iPosition])
                    
log_to_file("CountDown.log""")
                    
#endif
                
}
                
                if (
iPosition)
                {
                    
formatex(szFolder63g_szSoundsCountdown[i])
                    
replace(szFolder63g_szSoundsCountdown[i][iPosition], "")
                }
                
                
#if defined g_bDebug
                
log_to_file("CountDown.log""Directory found: ^"%s^""szFolder)
                
log_to_file("CountDown.log""Sounds found: ^"%s^""g_szSoundsCountdown[i][iPosition])
                
log_to_file("CountDown.log""")
                
#endif
                
                
while ((iPositionTemp containi(g_szSoundsCountdown[i][iPosition], " ")) != -1)
                {
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Scanning ^"%s^" for ^" ^" symbols."g_szSoundsCountdown[i][iPosition])
                    
#endif
                    
                    
formatex(szSound63g_szSoundsCountdown[i][iPosition])
                    
                    
iPosition += iPositionTemp;
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""^" ^" symbol found at position %d: ^"%s^""iPositionTempg_szSoundsCountdown[i][iPosition])
                    
#endif
                    
                    
replace(szSound63g_szSoundsCountdown[i][iPosition], "")
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Found sound: ^"%s^""szSound)
                    
#endif
                    
                    
format(szSound63"%s%s.wav"szFolderszSound)
                    
engfunc(EngFunc_PrecacheSoundszSound)
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Precaching sound: ^"%s^""szSound)
                    
#endif
                    
                    
iPosition += 1;
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Remaining sounds found: ^"%s^""g_szSoundsCountdown[i][iPosition])
                    
log_to_file("CountDown.log""")
                    
#endif
                
}
                
                
formatex(szSound63"%s%s.wav"szFolderg_szSoundsCountdown[i][iPosition])
                
engfunc(EngFunc_PrecacheSoundszSound)
                
                
#if defined g_bDebug
                
log_to_file("CountDown.log""Precaching sound: ^"%s^""szSound)
                
log_to_file("CountDown.log""")
                
#endif
            
}
        }
    }
    
    for (
0<= g_iSizeSoundsModeStarti++)
    {
        if (!
g_szSoundsModeStart[i][0])
            continue;
        
        if (
IsMp3(g_szSoundsModeStart[i]))
            
engfunc(EngFunc_PrecacheGenericg_szSoundsModeStart[i])
        else
        {
            
// Doesn't contain any spaces
            
if (containi(g_szSoundsModeStart[i], " ") == -1)
            {
                
formatex(szSound63"%s.wav"g_szSoundsModeStart[i])
                
                
engfunc(EngFunc_PrecacheSoundszSound)
            }
            
// Contains spaces
            
else
            {
                
iPosition 0;
                
                while ((
iPositionTemp containi(g_szSoundsModeStart[i][iPosition], "/")) != -1)
                {
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Scanning ^"%s^" for ^"/^" symbols."g_szSoundsModeStart[i][iPosition])
                    
#endif
                    
                    
iPosition += iPositionTemp 1;
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""^"/^" symbol found at position %d: ^"%s^""iPositionTempg_szSoundsModeStart[i][iPosition 1])
                    
log_to_file("CountDown.log""Remaining directories and sounds found: ^"%s^""g_szSoundsModeStart[i][iPosition])
                    
log_to_file("CountDown.log""")
                    
#endif
                
}
                
                if (
iPosition)
                {
                    
formatex(szFolder63g_szSoundsModeStart[i])
                    
replace(szFolder63g_szSoundsModeStart[i][iPosition], "")
                }
                
                
#if defined g_bDebug
                
log_to_file("CountDown.log""Directory found: ^"%s^""szFolder)
                
log_to_file("CountDown.log""Sounds found: ^"%s^""g_szSoundsModeStart[i][iPosition])
                
log_to_file("CountDown.log""")
                
#endif
                
                
while ((iPositionTemp containi(g_szSoundsModeStart[i][iPosition], " ")) != -1)
                {
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Scanning ^"%s^" for ^" ^" symbols."g_szSoundsModeStart[i][iPosition])
                    
#endif
                    
                    
formatex(szSound63g_szSoundsModeStart[i][iPosition])
                    
                    
iPosition += iPositionTemp;
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""^" ^" symbol found at position %d: ^"%s^""iPositionTempg_szSoundsModeStart[i][iPosition])
                    
#endif
                    
                    
replace(szSound63g_szSoundsModeStart[i][iPosition], "")
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Found sound: ^"%s^""szSound)
                    
#endif
                    
                    
format(szSound63"%s%s.wav"szFolderszSound)
                    
engfunc(EngFunc_PrecacheSoundszSound)
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Precaching sound: ^"%s^""szSound)
                    
#endif
                    
                    
iPosition += 1;
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Remaining sounds found: ^"%s^""g_szSoundsModeStart[i][iPosition])
                    
log_to_file("CountDown.log""")
                    
#endif
                
}
                
                
formatex(szSound63"%s%s.wav"szFolderg_szSoundsModeStart[i][iPosition])
                
engfunc(EngFunc_PrecacheSoundszSound)
                
                
#if defined g_bDebug
                
log_to_file("CountDown.log""Precaching sound: ^"%s^""szSound)
                
log_to_file("CountDown.log""")
                
#endif
            
}
        }
    }
    
    for (
0<= g_iSizeSoundsThunderModeStarti++)
    {
        if (!
g_szSoundsThunderModeStart[i][0])
            continue;
        
        if (
IsMp3(g_szSoundsThunderModeStart[i]))
            
engfunc(EngFunc_PrecacheGenericg_szSoundsThunderModeStart[i])
        else
        {
            
// Doesn't contain any spaces
            
if (containi(g_szSoundsThunderModeStart[i], " ") == -1)
            {
                
formatex(szSound63"%s.wav"g_szSoundsThunderModeStart[i])
                
                
engfunc(EngFunc_PrecacheSoundszSound)
            }
            
// Contains spaces
            
else
            {
                
iPosition 0;
                
                while ((
iPositionTemp containi(g_szSoundsThunderModeStart[i][iPosition], "/")) != -1)
                {
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Scanning ^"%s^" for ^"/^" symbols."g_szSoundsThunderModeStart[i][iPosition])
                    
#endif
                    
                    
iPosition += iPositionTemp 1;
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""^"/^" symbol found at position %d: ^"%s^""iPositionTempg_szSoundsThunderModeStart[i][iPosition 1])
                    
log_to_file("CountDown.log""Remaining directories and sounds found: ^"%s^""g_szSoundsThunderModeStart[i][iPosition])
                    
log_to_file("CountDown.log""")
                    
#endif
                
}
                
                if (
iPosition)
                {
                    
formatex(szFolder63g_szSoundsThunderModeStart[i])
                    
replace(szFolder63g_szSoundsThunderModeStart[i][iPosition], "")
                }
                
                
#if defined g_bDebug
                
log_to_file("CountDown.log""Directory found: ^"%s^""szFolder)
                
log_to_file("CountDown.log""Sounds found: ^"%s^""g_szSoundsThunderModeStart[i][iPosition])
                
log_to_file("CountDown.log""")
                
#endif
                
                
while ((iPositionTemp containi(g_szSoundsThunderModeStart[i][iPosition], " ")) != -1)
                {
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Scanning ^"%s^" for ^" ^" symbols."g_szSoundsThunderModeStart[i][iPosition])
                    
#endif
                    
                    
formatex(szSound63g_szSoundsThunderModeStart[i][iPosition])
                    
                    
iPosition += iPositionTemp;
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""^" ^" symbol found at position %d: ^"%s^""iPositionTempg_szSoundsThunderModeStart[i][iPosition])
                    
#endif
                    
                    
replace(szSound63g_szSoundsThunderModeStart[i][iPosition], "")
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Found sound: ^"%s^""szSound)
                    
#endif
                    
                    
format(szSound63"%s%s.wav"szFolderszSound)
                    
engfunc(EngFunc_PrecacheSoundszSound)
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Precaching sound: ^"%s^""szSound)
                    
#endif
                    
                    
iPosition += 1;
                    
                    
#if defined g_bDebug
                    
log_to_file("CountDown.log""Remaining sounds found: ^"%s^""g_szSoundsThunderModeStart[i][iPosition])
                    
log_to_file("CountDown.log""")
                    
#endif
                
}
                
                
formatex(szSound63"%s%s.wav"szFolderg_szSoundsThunderModeStart[i][iPosition])
                
engfunc(EngFunc_PrecacheSoundszSound)
                
                
#if defined g_bDebug
                
log_to_file("CountDown.log""Precaching sound: ^"%s^""szSound)
                
log_to_file("CountDown.log""")
                
#endif
            
}
        }
    }
}

public 
plugin_cfg()
{
    
g_pCvarDelay get_cvar_pointer("zp_delay");
    
g_pCvarLighting get_cvar_pointer("zp_lighting");
}

public 
event_round_start(id)
{
    
g_iDelay get_pcvar_num(g_pCvarDelay) - 1;
    
    if (
g_iDelay 0)
        return;
    
    
remove_task(g_iTaskCountdownID)
    
remove_task(g_iTaskLightningID)
    
    if (
g_szLighting[0])
    {
        
engfunc(EngFunc_LightStyle0g_szLighting)
        
set_pcvar_string(g_pCvarLightingg_szLighting);
        
        
g_szLighting "";
    }
    
    new 
iRandom;
    
    
iRandom random_num(0g_iSizeSoundsRoundStart);
    
client_cmd(0"%s ^"%s^"", !IsMp3(g_szSoundsRoundStart[iRandom]) ? "spk" "mp3 play"g_szSoundsRoundStart[iRandom])
    
    if (
get_pcvar_num(g_pCvarEffects))
    {
        
get_pcvar_string(g_pCvarLightingg_szLighting1)
        
        
set_pcvar_string(g_pCvarLighting"0")
        
        
g_iSeconds 10// 1 second of lightning, 0.1 seconds for each light level
        
TaskThunderClapRoundStart(g_iTaskLightningID)
        
set_task(0.1"TaskThunderClapRoundStart"g_iTaskLightningID__"b")
        
        
iRandom random_num(0g_iSizeSoundsThunderRoundStart);
        
        
client_cmd(0"%s ^"%s^"", !IsMp3(g_szSoundsThunderRoundStart[iRandom]) ? "spk" "mp3 play"g_szSoundsThunderRoundStart[iRandom])
    }
    else
    {    
        
g_iSeconds g_iDelay;
        
        
set_task(1.0"CountDown"g_iTaskCountdownID__"b")
    }
}

public 
TaskThunderClapRoundStart(iTaskID)
{
    if (
g_iSeconds)
    {
        new 
iRandom;
        
        if (
g_iSeconds == 0)
        {
            
iRandom random_num(0g_iSizeLightsThunderClap1);
            
            
engfunc(EngFunc_LightStyle0g_szLightsThunderClap1[iRandom])
        }
        else
        {
            
iRandom random_num(0g_iSizeLightsThunderClap2);
            
            
engfunc(EngFunc_LightStyle0g_szLightsThunderClap2[iRandom])
        }
        
        
g_iSeconds--;
    }
    else
    {
        
remove_task(iTaskID)
        
        if (
get_pcvar_num(g_pCvarEffects))
        {
            if (
g_iDelay g_iSizeLightsCountdownLevels)
                
engfunc(EngFunc_LightStyle0g_szLightsCountdownLevels[g_iSizeLightsCountdownLevels])
            else
                
engfunc(EngFunc_LightStyle0g_szLightsCountdownLevels[g_iDelay])
        }
        else
        {
            if (!
g_szLighting[0])
                return;
            
            
engfunc(EngFunc_LightStyle0g_szLighting)
            
set_pcvar_string(g_pCvarLightingg_szLighting)
            
            
g_szLighting "";
        }
        
        
g_iSeconds g_iDelay;
        
CountDown(g_iTaskCountdownID)
        
set_task(1.0"CountDown"g_iTaskCountdownID__"b")
    }
}

public 
CountDown(iTaskID)
{
    
// Check for the external "TASK_MAKEZOMBIE" from inside ZPNM
    
if (!task_exists(30001)) //2010
    
{
        
remove_task(iTaskID)
        
        return;
    }
    
    
set_dhudmessage(random_num(57255), random_num(0255), random_num(0255), -1.00.3906.00.0010.11.0)
    
show_dhudmessage(0"%L"LANG_PLAYER"TALRASHA_COUNTDOWN"g_iSeconds 1)
    
    if (
g_iSeconds <= g_iSizeSoundsCountdown && g_szSoundsCountdown[g_iSeconds][0])
        
client_cmd(0"%s ^"%s^"", !IsMp3(g_szSoundsCountdown[g_iSeconds]) ? "spk" "mp3 play"g_szSoundsCountdown[g_iSeconds])
    
    if (
g_iSeconds <= g_iSizeLightsCountdownLevels && g_szLightsCountdownLevels[g_iSeconds][0] && get_pcvar_num(g_pCvarEffects))
        
engfunc(EngFunc_LightStyle0g_szLightsCountdownLevels[g_iSeconds])
    
    if(
g_iSeconds == 29)
    {
        for(new 
0<= get_maxplayers(); i++)
        {
            if(
is_user_connected(i))
            {
                
message_begin(MSG_ONEget_user_msgid("ScreenFade"), _i)
                
write_short(0// duration
                
write_short(0// hold time
                
write_short(0x0004// fade type
                
write_byte(50// red
                
write_byte(0// green
                
write_byte(0// blue
                
write_byte(255// alpha
                
message_end()
            }
        }
    }
        
    if(
g_iSeconds == 25)
    {
        
set_dhudmessage(25500, -1.00.3506.00.0010.11.0)
        
show_dhudmessage(0"%L"LANG_PLAYER"TALRASHA_WARNING");
        
        for(new 
0<= get_maxplayers(); i++)
        {
            if(
is_user_connected(i))
            {
                
message_begin(MSG_ONEget_user_msgid("ScreenFade"), _i)
                
write_short(0// duration
                
write_short(0// hold time
                
write_short(0x0004// fade type
                
write_byte(0// red
                
write_byte(0// green
                
write_byte(50// blue
                
write_byte(255// alpha
                
message_end()
            }
        }
    }
    
    if(
g_iSeconds == 23)
    {
        for(new 
0<= get_maxplayers(); i++)
        {
            if(
is_user_connected(i))
            {
                
message_begin(MSG_ONEget_user_msgid("ScreenFade"), _i)
                
write_short((1<<12)) // duration
                
write_short(0// hold time
                
write_short(0x0000// fade type
                
write_byte(0// red
                
write_byte(0// green
                
write_byte(50// blue
                
write_byte(255// alpha
                
message_end()
            }
        }    
    }
    
    if(
g_iSeconds == 21)
    {
        
set_dhudmessage(00255, -1.00.306.00.0010.11.0)
        
show_dhudmessage(0"%L"LANG_PLAYER"TALRASHA_BIO_DANGER");
    }
    
    if(
g_iSeconds == 17)
    {
        
set_dhudmessage(25500, -1.00.3506.00.0010.11.0)
        
show_dhudmessage(0"%L"LANG_PLAYER"TALRASHA_WARNING");
    }
        
    if(
g_iSeconds == 14)
    {
        
set_dhudmessage(00255, -1.00.306.00.0010.11.0)
        
show_dhudmessage(0"%L"LANG_PLAYER"TALRASHA_ATTACKING");
        
        
message_begin(MSG_BROADCASTget_user_msgid("ScreenShake"))
        
write_short((1<<12)*4// amplitude
        
write_short((1<<12)*2// duration
        
write_short((1<<12)*10// frequency
        
message_end()
        
        
PlaySound(0MESSAGE_SOUND)
    }
        
    if(
g_iSeconds == 11)
    {
        
set_dhudmessage(00255, -1.00.306.00.0010.11.0)
        
show_dhudmessage(0"%L"LANG_PLAYER"TALRASHA_EVACUATION");
    }
    
    if(
g_iSeconds == 9)
    {
        
message_begin(MSG_BROADCASTget_user_msgid("ScreenShake"))
        
write_short((1<<12)*4// amplitude
        
write_short((1<<12)*3// duration
        
write_short((1<<12)*12// frequency
        
message_end()
        
        
PlaySound(0MESSAGE_SOUND)
    }
        
    if(
g_iSeconds == 8)
    {
        
set_dhudmessage(25500, -1.00.3506.00.0010.11.0)
        
show_dhudmessage(0"%L"LANG_PLAYER"TALRASHA_WARNING");
    }
        
    if(
g_iSeconds == 6)
    {
        
set_dhudmessage(00255, -1.00.306.00.0010.11.0)
        
show_dhudmessage(0"%L"LANG_PLAYER"TALRASHA_PREPARE_ZOMBIES");
    }
        
    if(
g_iSeconds == 4)
    {
        
set_dhudmessage(255255255, -1.00.306.00.0010.11.0)
        
show_dhudmessage(0"%L"LANG_PLAYER"TALRASHA_PREPARE_WEAPON");
            
        
message_begin(MSG_BROADCASTget_user_msgid("ScreenShake"))
        
write_short((1<<12)*5// amplitude
        
write_short((1<<12)*4// duration
        
write_short((1<<12)*15// frequency
        
message_end()

        
PlaySound(0MESSAGE_SOUND)
    }
        
    if(
g_iSeconds == 2)
    {
        
set_dhudmessage(25500, -1.00.3506.00.0010.11.0)
        
show_dhudmessage(0"%L"LANG_PLAYER"TALRASHA_TVIRUS");

        
PlaySound(0MESSAGE_SOUND)
    }
        
    if(
g_iSeconds == 1)
        
PlaySound(0MESSAGE_SOUND)
        
    if(
g_iSeconds == 0)
    {
        
set_dhudmessage(02550, -1.00.606.00.0010.11.0)
        
show_dhudmessage(0"%L"LANG_PLAYER"TALRASHA_INFECTION_START");

        
PlaySound(0MESSAGE_SOUND)
    }
    
    
g_iSeconds--
    
    if (
g_iSeconds 0)
        
remove_task(iTaskID)
}

PlaySound(id, const sound[])
{
    
client_cmd(id"spk ^"%s^""sound)
}

public 
TaskThunderClapModeStart(iTaskID)
{
    if (
g_iSeconds)
    {
        new 
iRandom;
        
        if (
g_iSeconds != 0)
        {
            
iRandom random_num(0g_iSizeLightsThunderClap1);
            
            
engfunc(EngFunc_LightStyle0g_szLightsThunderClap1[iRandom])
        }
        else
        {
            
iRandom random_num(0g_iSizeLightsThunderClap2);
            
            
engfunc(EngFunc_LightStyle0g_szLightsThunderClap2[iRandom])
        }
        
        
g_iSeconds--
    }
    else
    {
        
remove_task(iTaskID)
        
        if (!
g_szLighting[0])
            return;
        
        
engfunc(EngFunc_LightStyle0g_szLighting)
        
set_pcvar_string(g_pCvarLightingg_szLighting)
        
        
g_szLighting "";
    }
}

public 
zp_user_infected_post(id)
{
    if((
zp_get_user_zombie(id) && !zp_get_user_nemesis(id)))
    {
        
random_num(0g_iSizeSoundsModeStart);
        
client_cmd(0"%s ^"%s^"", !IsMp3(g_szSoundsModeStart[random_num(0,2)]) ? "spk" "mp3 play"g_szSoundsModeStart[random_num(0,2)])
    }
}

public 
zp_round_started(iModeid)
{
    
    
remove_task(g_iTaskCountdownID)
    
remove_task(g_iTaskLightningID)
    
    new 
iRandom;
    
    
/*if (iMode == MODE_ASSASSIN)
        return;
    else if (!get_pcvar_num(g_pCvarEffects))
    {
        if (g_szLighting[0])
        {
            engfunc(EngFunc_LightStyle, 0, g_szLighting)
            set_pcvar_string(g_pCvarLighting, g_szLighting);
            
            g_szLighting = "z";
        }
        
        return;
    }*/
    

    
for(new 0<= get_maxplayers(); i++)
    {
        if(
is_user_connected(i))
        {
            
message_begin(MSG_ONEget_user_msgid("ScreenFade"), _i)
            
write_short((1<<12)) // duration
            
write_short(0// hold time
            
write_short(0x0000// fade type
            
write_byte(0// red
            
write_byte(0// green
            
write_byte(50// blue
            
write_byte(255// alpha
            
message_end()

            
message_begin(MSG_BROADCASTget_user_msgid("ScreenShake"))
            
write_short((1<<12)*6// amplitude
            
write_short((1<<12)*2// duration
            
write_short((1<<12)*22// frequency
            
message_end()
        }
    }
    
    
iRandom random_num(0g_iSizeSoundsThunderModeStart);
    
client_cmd(0"%s ^"%s^"", !IsMp3(g_szSoundsThunderModeStart[iRandom]) ? "spk" "mp3 play"g_szSoundsThunderModeStart[iRandom])
    
    
g_iSeconds 15;
    
TaskThunderClapModeStart(g_iTaskLightningID)
    
set_task(0.1"TaskThunderClapModeStart"g_iTaskLightningID__"b")
}

stock MsgScreenFade(id)
{
    static 
msg_screenfade; if(!msg_screenfademsg_screenfade get_user_msgid("ScreenFade");
    
message_begin(MSG_ONE_UNRELIABLEmsg_screenfade, {0,0,0}, id);
    
write_short(1<<10);
    
write_short(1<<10);
    
write_short(0x0000);
    
write_byte(0);
    
write_byte(0);
    
write_byte(200);
    
write_byte(75);
    
message_end();
}

stock MsgScreenFade_2(id)
{
    static 
msg_screenfade; if(!msg_screenfademsg_screenfade get_user_msgid("ScreenFade");
    
message_begin(MSG_ONE_UNRELIABLEmsg_screenfade, {0,0,0}, id);
    
write_short(1<<10);
    
write_short(1<<10);
    
write_short(0x0000);
    
write_byte(200);
    
write_byte(0);
    
write_byte(0);
    
write_byte(75);
    
message_end();

jievylook is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-03-2019 , 00:01   Re: I can't compile plugin
Reply With Quote #2

What is preventing you from compiling?

P.S. attaching or linking to compiled plugins is not allowed on this forum. So, if you are asking someone to compile it for you, I'd recommend compiling it yourself.
__________________

Last edited by fysiks; 08-03-2019 at 00:03.
fysiks is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 08-03-2019 , 05:45   Re: I can't compile plugin
Reply With Quote #3

If you are facing any errors while compiling, you need to post those errors, so, someone here can help you.
Alber9091 is offline
MagNNusS
Member
Join Date: May 2018
Location: World of Bushi
Old 08-03-2019 , 10:35   Re: I can't compile plugin
Reply With Quote #4

I don't see whats the problem.
I can compile it without any error.
__________________
Just an impractical signature
nothing to see here.
MagNNusS is offline
jievylook
Senior Member
Join Date: Sep 2018
Old 08-03-2019 , 19:13   Re: I can't compile plugin
Reply With Quote #5

I think the error is because I want to adapt it to ZP 5.0.8 and this code is for ZP 4.3 I have several errors in the dhudmessage.inc
jievylook is offline
thEsp
BANNED
Join Date: Aug 2017
Old 08-03-2019 , 19:31   Re: I can't compile plugin
Reply With Quote #6

Quote:
Originally Posted by thEsp View Post
Where do you think you are, a mind readers forum?
thEsp is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-03-2019 , 19:33   Re: I can't compile plugin
Reply With Quote #7

Quote:
Originally Posted by jievylook View Post
I think the error is because I want to adapt it to ZP 5.0.8 and this code is for ZP 4.3 I have several errors in the dhudmessage.inc
All ZP 4.3 plugins should work in ZP 5.0.8.
__________________
edon1337 is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 08-03-2019 , 20:04   Re: I can't compile plugin
Reply With Quote #8

Quote:
Originally Posted by jievylook View Post
I think the error is because I want to adapt it to ZP 5.0.8 and this code is for ZP 4.3 I have several errors in the dhudmessage.inc
I hope, you are compiling with AMXX 1.8.2 Compiler as dhudmessage.inc is already integrated in AMXX above 1.8.3.
Alber9091 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-04-2019 , 07:07   Re: I can't compile plugin
Reply With Quote #9

Quote:
Originally Posted by jievylook View Post
I think the error is because I want to adapt it to ZP 5.0.8 and this code is for ZP 4.3 I have several errors in the dhudmessage.inc
If you have a dhudmessage.inc error you're either NOT compiling with 1.8.2 (or you don't have the include which I doubt) or your 1.8.2 is NOT downloaded from the official webiste.

Again - if you want help, POST THE ERROR LOG.
__________________

Last edited by OciXCrom; 08-04-2019 at 09:59.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 08-04-2019 , 09:10   Re: I can't compile plugin
Reply With Quote #10

Im pretty sure he doesnt have the dhudmessage.inc, and i think he is compiling online
tarsisd2 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode