Raised This Month: $ Target: $400
 0% 

[ES] Ayuda Error al Compilar ˇURGENTE!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
yenfer
BANNED
Join Date: Apr 2010
Old 07-30-2013 , 23:42   [ES] Ayuda Error al Compilar ˇURGENTE!
#1

Hola amigos, tengo error al compilar este plugin que me lo paso mi amigo kwpd que es muy util para el pug pero tiene error y no se como resolverlo por favor ayudenme se los agradeseria mucho enserio.

ˇEspero sus Respuestas!

PHP Code:
/* Plugin generated by kwpd */
/*.group <tag> - Crear un grupo con el tag especificado
.add <name> - Invitar a el jugador con el tag especifico del grupo
.accept <name> - Aceptar la invitación de grupo por el jugador que se especifica
.leavegroup - Dejar el grupo que se encuentra actualmente */ 

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

#define TASK_INGROUP 232323

const MAX_GROUPS 2
new g_InGroup33 ]
new 
g_HasInvitation33 ]
new 
g_PlayerTag33 ][ 32 ]
new 
g_PlayerGroupNum33 ]
new 
g_GroupPlayersNumMAX_GROUPS ]
new 
g_GroupPlayersTagMAX_GROUPS ][ 32 ]
new 
g_GroupNum 0
new g_EliminatedGroup 0
new const g_Tag[] = "-->"

new cvar_enabled1 


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd"say""clcmd_say" )
    
register_clcmd"say_team""clcmd_say" )
}

public 
clcmd_sayid )
{
    new 
szArgs32 ], szArgs132 ], szArgs232 ]
    
read_argsszArgscharsmaxszArgs ) )
    
remove_quotesszArgs )
    
parseszArgsszArgs1charsmaxszArgs1 ), szArgs2charsmaxszArgs2 ) )
    
    if ( 
equaliszArgs1".add" ) )
    {
        if ( !
g_InGroupid ] )
            return 
PLUGIN_CONTINUE
        
        
new player cmd_targetidszArgs2CMDTARGET_NO_BOTS )
        
        if ( 
player )
        {
            if ( !
g_InGroupplayer ] )
            {   
                if( 
g_GroupPlayersNumg_PlayerGroupNumid ]  ] > )
                {
                    
client_printidprint_chat"%s Max 2 players per group."g_Tag)
                    return 
PLUGIN_CONTINUE                   
                
}
                
                if ( !
g_HasInvitationplayer ] )
                {
                    new 
szCreatorName32 ], szInvitedName[32]
                    
                    
get_user_nameidszCreatorNamecharsmaxszCreatorName ) )
                    
get_user_nameplayerszInvitedNamecharsmaxszInvitedName ) )
                    
                    
g_HasInvitationplayer ] = 1
                    
                    g_PlayerGroupNum
player ] = g_PlayerGroupNumid ]
                    
                    
copyg_PlayerTagplayer ], charsmaxg_PlayerTag[] ), g_PlayerTagid ] )
                    
                    
client_printplayerprint_chat"%s %s you just invite your group to accept writes .accept"g_TagszCreatorName )
                    
client_printidprint_chat"%s Request sent to %s"g_TagszInvitedName )
                }
                else
                    
client_printidprint_chat"%s Since this player has been invited to a group"g_Tag )               
            }
            else
                
client_printidprint_chat"%s player is already in a group"g_Tag )               
        }
        else
            
client_printidprint_chat"%s Player was not found"g_Tag )
    }
    else if ( 
equaliszArgs1".accept" ) )
    {
        if ( 
g_HasInvitationid ] )
        {
            new 
szOldName33 ]
            
get_user_nameidszOldNamecharsmaxszOldName ) )
            
g_HasInvitationid ] = 0
            client_cmd
id"name ^"%s. %s^""g_PlayerTagid ], szOldName )
            
g_GroupPlayersNumg_PlayerGroupNumid ] ]++
            
set_task1.0"set_group"id TASK_INGROUP )
        }
        else
            
client_printidprint_chat"%s Player was not found"g_Tag )
    }
    else if ( 
equaliszArgs1".leavegroup" ) )
    {
        if ( 
g_InGroupid ] )
        {   
            if ( --
g_GroupPlayersNumg_PlayerGroupNumid ] ] == )
            {
                
copyg_GroupPlayersTagg_PlayerGroupNumid ] ], charsmaxg_GroupPlayersTag[] ), "" )
                
g_EliminatedGroup g_PlayerGroupNumid ] + 1
                g_GroupNum
--
            }
            
            
g_InGroupid ] = 0
            
new szOldName33 ], szNewName33 ], szDummy33 ]
            
get_user_nameidszOldNamecharsmaxszOldName ) )
            
strtokszOldNameszDummycharsmaxszDummy ), szNewNamecharsmaxszNewName ), '.' )
            
client_cmdid"name ^"%s^""szNewName )
            
client_printidprint_chat"%s You have left the group"g_Tag )       
        }
        else
            
client_printidprint_chat"%s You were not in any group"g_Tag )
        return 
PLUGIN_CONTINUE
    
}
    
    else if ( 
equaliszArgs1".group" ) )
    {
        if( 
get_pcvar_numcvar_enabled1 ) == )
            
client_print(idprint_chat"%s You must wait. A Change of Maps."g_Tag)
        
        else if( 
get_pcvar_num(cvar_enabled1) > )
        {
            if ( 
g_InGroupid ] )
            {
                
client_printidprint_chat"%s You belong to a group."g_Tag)
                return 
PLUGIN_CONTINUE
            
}
            
            if ( 
g_GroupNum >  MAX_GROUPS )
            {
                
client_printidprint_chat"%s It has reached the max number of groups created."g_Tag)
                return 
PLUGIN_CONTINUE
            
}
            
            for ( new 
iMAX_GROUPSi++ )
            {
                if ( 
equalig_GroupPlayersTag], szArgs2 ) )
                {
                    
client_printidprint_chat"%s .group <tag>"g_Tag )
                    return 
PLUGIN_CONTINUE
                
}
            }
            
            if ( 
strlenszArgs2 ) > )
            {
                
client_printidprint_chat"%s Max 3 characters"g_Tag )
                return 
PLUGIN_CONTINUE
            
}
            
            if ( 
szArgs2] == '.' || szArgs2] == '.' || szArgs2] == '.')
            {
                
client_printidprint_chat"%s You can not include the point (.) in the tag"g_Tag )
                return 
PLUGIN_CONTINUE
            
}
            
            new 
szOldName33 ]
            
get_user_nameidszOldNamecharsmaxszOldName ) )
            
client_cmdid"name ^"%s. %s^""szArgs2szOldName )
            
copyg_PlayerTagid ], charsmaxg_PlayerTag[] ), szArgs2 )
            
            if ( 
g_EliminatedGroup )
            {
                
g_EliminatedGroup--
                
copyg_GroupPlayersTagg_EliminatedGroup ], charsmaxg_GroupPlayersTag[] ), szArgs2 )
                
g_GroupPlayersNumg_EliminatedGroup ]++
                
g_PlayerGroupNumid ] = g_EliminatedGroup
                g_EliminatedGroup 
0
            
}
            else
            {
                
copyg_GroupPlayersTagg_GroupNum ], charsmaxg_GroupPlayersTag[] ), szArgs2 )
                
g_GroupPlayersNumg_GroupNum ]++
                
g_PlayerGroupNumid ] = g_GroupNum
            
}
            
            
set_task1.0"set_group"id TASK_INGROUP )
            
g_GroupNum++
        }
    }
    return 
PLUGIN_CONTINUE
}


public 
client_putinserverid )
{
    
g_PlayerGroupNumid ] = -2
    g_InGroup
id ] = 0
    g_HasInvitation
id ] = 0
}

public 
client_disconnect(id)
{
    if(
get_pcvar_num(cvar_enabled1)) 
    {
        
set_leavergroup1(id)
    }
}

public 
set_leavergroup1(id)
{
    if ( 
g_InGroupid ] )
    {
        if ( --
g_GroupPlayersNumg_PlayerGroupNumid ] ] == )
        {
            
copyg_GroupPlayersTagg_PlayerGroupNumid ] ], charsmaxg_GroupPlayersTag[] ), "" )
            
g_EliminatedGroup g_PlayerGroupNumid ] + 1
            g_GroupNum
--
        }
        
        
g_InGroupid ] = 0
        
new szOldName33 ], szNewName33 ], szDummy33 ]
        
get_user_nameidszOldNamecharsmaxszOldName ) )
        
strtokszOldNameszDummycharsmaxszDummy ), szNewNamecharsmaxszNewName ), '.' )
    }
    else
    {
        
client_printidprint_chat"%s You were not in any group"g_Tag )
    }
    return 
PLUGIN_CONTINUE
}

public 
cmd_cancelgroup(id,level,cid)
{
    if(!
cmd_access(idlevelcid1)) return PLUGIN_HANDLED
    
    
if ( g_InGroupid ] )
    {
        if ( --
g_GroupPlayersNumg_PlayerGroupNumid ] ] == )
        {
            
copyg_GroupPlayersTagg_PlayerGroupNumid ] ], charsmaxg_GroupPlayersTag[] ), "" )
            
g_EliminatedGroup g_PlayerGroupNumid ] + 1
            g_GroupNum
--
        }
        
        
g_InGroupid ] = 0
        
new szOldName33 ], szNewName33 ], szDummy33 ]
        
get_user_nameidszOldNamecharsmaxszOldName ) )
        
strtokszOldNameszDummycharsmaxszDummy ), szNewNamecharsmaxszNewName ), '.' )
        
client_cmdid"name ^"%s^""szNewName )
    }
    else
    {
        
client_printidprint_chat"%s You were not in any group"g_Tag )
    }
    
    
// new arg[32]   
    // read_argv(1,arg,31)
    // 
    // new iPlayer[32], iNum
    // get_players(iPlayer, iNum)
    // 
    // for(new i; i < iNum; i++)
    // {
    //     set_leavergroup2(iPlayer[i])
    // }
    
return PLUGIN_CONTINUE
}

public 
set_leavergroup2(id)
{
    if ( 
g_InGroupid ] )
    {
        if ( --
g_GroupPlayersNumg_PlayerGroupNumid ] ] == )
        {
            
copyg_GroupPlayersTagg_PlayerGroupNumid ] ], charsmaxg_GroupPlayersTag[] ), "" )
            
g_EliminatedGroup g_PlayerGroupNumid ] + 1
            g_GroupNum
--
        }
        
        
g_InGroupid ] = 0
        
new szOldName33 ], szNewName33 ], szDummy33 ]
        
get_user_nameidszOldNamecharsmaxszOldName ) )
        
strtokszOldNameszDummycharsmaxszDummy ), szNewNamecharsmaxszNewName ), '.' )
        
client_cmdid"name ^"%s^""szNewName )
    }
    else
    {
        
client_printidprint_chat"%s You were not in any group"g_Tag )
    }
    return 
PLUGIN_CONTINUE
}

public 
set_groupid )
{
    
id -=TASK_INGROUP
    
    g_InGroup
id ] = 1   
}

public 
ClientUserInfoChangedidBuffer )
{
    if( !
is_user_connectedid ) ) return FMRES_IGNORED
    
    
static szNewName32 ], szOldName32 ]
    
get_user_nameidszOldName31 )
    
engfuncEngFunc_InfoKeyValueBuffer"name"szNewName31 );
    
    if( 
equalszNewNameszOldName ) ) return FMRES_IGNORED;
    
    static 
szNickName32 ]
    
    
copyszNickNamecharsmaxszNickName ), g_InGroupid ] ? szOldName szNewName )
    
engfuncEngFunc_SetClientKeyValueidBuffer"name"szNickName )
    
    
client_cmdid"name ^"%s^"; setinfo name ^"%s^""szNickNameszNickName )
    
    return 
FMRES_SUPERCEDE

yenfer is offline
 



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 07:52.


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