AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Plugin Error (https://forums.alliedmods.net/showthread.php?t=243041)

dfb212 06-28-2014 19:33

Plugin Error
 
1 Attachment(s)
So Im getting these errors on a Plugin while Im trying to compile it:

http://i.imgur.com/lgXc4a4.png

Im pretty newbish at Scripting, If any of you guys could help me I would be very grateful! :fox:

Here is the plugin:

4dead 06-28-2014 20:28

Re: Plugin Error
 
Can you test & report ?
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <dhudmessage>

#define PLUGIN "JailBreak: Dni"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

new iRoundiSyncHud
new iFd
new szSound[] = "sound/JailBreak/sirenne.wav"

new i

new iDays_FreeDay[] = {
        
1,
        
11,
        
21,
        
31,
        
41
}

new 
rounds

public plugin_init() 
{
        
register_plugin(PLUGINVERSIONAUTHOR)
        
        
register_logevent("logevent_roundEnd"2"1=Round_End")
        
        
register_event("HLTV""event_newRound""a""1=0""2=0")
        
        
RegisterHam(Ham_Killed"player""ham_playerDeath"1)
        
        
register_clcmd("drop""clcmd_Drop")
        
register_clcmd("say /fd""clcmd_FreeDay")
        
register_clcmd("say /freeday""clcmd_FreeDay")
    
    
iSyncHud CreateHudSyncObj()
}

public 
plugin_precache(){
    
precache_soundszSound );
}

public 
clcmd_FreeDay(id)
{
        if(
cs_get_user_team(id) != CS_TEAM_CT)
                return 
1
        
        
new menu menu_create("Escolha o player para ser freeday""FreeDayPlayerMenu_Handler")
        
        static 
szName[40]
        for(new 
1maxplayers get_maxplayers(); <= maxplayersi++)
        {
                if(!
is_user_connected(i))
                        continue
                
                if(
cs_get_user_team(i) != CS_TEAM_T || !is_user_alive(i))
                        continue
                
                
get_user_name(idszNamecharsmax(szName))
                
menu_additem(menuszName"")
        }
        
menu_display(idmenu)
        
        
        return 
1
}
public 
FreeDayPlayerMenu_Handler(idmenuitem)
{
        
menu_destroy(menu)
        
        new 
target = ++item
        
        
if(!is_user_connected(target) || cs_get_user_team(target) != CS_TEAM_T || !is_user_alive(target))
                return 
1
        
        set_user_rendering
(targetkRenderFxGlowShell2552150kRenderNormal20)
        
        return 
1
}

public 
clcmd_Drop(id)
{
        for(
0sizeof(iDays_FreeDay); i++)
        {
                if(
iRound == iDays_FreeDay[i])
                {
                        new 
iClipiAmmo
                        get_user_weapon
(idiClipiAmmo)
                        
                        if(
iClip != || iAmmo != 0)
                        {
                                
client_print(idprint_chat"Voce so pode dropar a arma depois de ter acabado as balas")
                                return 
1
                        
}
                        else    return 
0
                
}
        }
        return 
0
}

public 
round_end()
{
    
rounds ++
}

public 
restart_roundsnum() 
{
    
rounds 
}

public 
client_disconnect(id)
        
remove_task(id)

public 
logevent_roundEnd()
        
remove_task(0)

public 
event_newRound()
{          
        
iRound++
        
        for(
0sizeof(iDays_FreeDay); i++)
        {
                if(
iRound <= iDays_FreeDay[i])
                {
                        
iFd = (iDays_FreeDay[i] - iRound)
                        
                        if(
iRound == iDays_FreeDay[i])
                        {
                                
set_task(0.1"hudmsg"'f'__"b")
                                
client_cmd(0"spk %s"szSound)
                                break
                        }
                        else
                        {
                                
set_task(0.1"hudmsg"'d'__"b")
                                break
                        }
                        
                        break
                }
        }
}

public 
ham_playerDeath(vitima)
        
remove_task(vitima)

public 
hudmsg(arg)
{
        
set_dhudmessage(025500.480.1206.03.0)
        
ShowSyncHudMsg(0iSyncHud"[Tag do Clan]")
        if(
arg == 'f')
                
ShowSyncHudMsg(0iSyncHud"HOJE E FREEDAY ^nGUARDAS PARA FORA DO PRESIDIO AGORA !!!")
        
        else if(
arg == 'd')
                
ShowSyncHudMsg(0iSyncHud"HOJE E DIA %i^nFALTAM %i DIAS PARA FREEDAY !!!"iRoundiFd)



dfb212 06-28-2014 21:52

Re: Plugin Error
 
1 Attachment(s)
Quote:

Originally Posted by 4dead (Post 2158980)
Can you test & report ?

I edited the original script but the messages are overlapping each other and the szSound isnt playing. Any help is appreciated:


All times are GMT -4. The time now is 21:11.

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