Raised This Month: $ Target: $400
 0% 

Error Tag Mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-11-2011 , 04:10   Re: Error Tag Mismatch
Reply With Quote #1

Again you haven't gave the whole code.

new team_names[CsTeams][]
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
deadman909
Veteran Member
Join Date: Oct 2008
Old 08-11-2011 , 04:13   Re: Error Tag Mismatch
Reply With Quote #2

Quote:
Originally Posted by ConnorMcLeod View Post
Again you haven't gave the whole code.

new team_names[CsTeams][]
What you mean it is the exact same code exept I removed what you told me.
__________________


Last edited by deadman909; 08-11-2011 at 19:41.
deadman909 is offline
Send a message via MSN to deadman909 Send a message via Yahoo to deadman909
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-11-2011 , 06:23   Re: Error Tag Mismatch
Reply With Quote #3

Remove :

#define OFFSET_TEAM 114
#define cs_get_user_team(%1) get_pdata_int( %1, OFFSET_TEAM )

#define OFFSET_DEATHS 444
#define cs_get_user_deaths(%1) get_pdata_int( %1, OFFSET_DEATHS )
#define cs_set_user_deaths(%1,%2) set_pdata_int( %1, OFFSET_DEATHS, %2 )


And remove all fm_ things

fm_give_item -> give_item
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
deadman909
Veteran Member
Join Date: Oct 2008
Old 08-11-2011 , 10:03   Re: Error Tag Mismatch
Reply With Quote #4

wouldnt that stop the plugin from doing what its suppose to?
__________________

deadman909 is offline
Send a message via MSN to deadman909 Send a message via Yahoo to deadman909
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-11-2011 , 10:10   Re: Error Tag Mismatch
Reply With Quote #5

Quote:
Originally Posted by deadman909 View Post
wouldnt that stop the plugin from doing what its suppose to?
Do you even know what you're doing?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-11-2011 , 16:09   Re: Error Tag Mismatch
Reply With Quote #6

Quote:
Originally Posted by deadman909 View Post
wouldnt that stop the plugin from doing what its suppose to?
You tell us. Do you think Connor has a reason to give you bad information?
__________________
fysiks is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-11-2011 , 19:24   Re: Error Tag Mismatch
Reply With Quote #7

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define PLUGIN_NAME "TEAM NAMES"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "=TEAM NAMES"

new bool:b_FirstLaunch[33];

// default names
new const TeamT[] = "\yEVIL"        // Terrorists
new const TeamCT[] = "\yBRAVE"    // Counter-Terrorists

// default round end sounds
#define SOUND_CT_WIN "music/downed_intro.mp3"
#define SOUND_T_WIN "music/motor_intro.mp3"
//new const SoundT[] = "music/downed_intro.mp3"
//new const SoundCT[] = "music/motor_intro.mp3"

// Some variables
new mChooseTeam
new showMsg 0

//new pcTeamT, pcTeamCT, pcSoundT, pcSoundCT, pcUseSounds
new pcTeamTpcTeamCT

public plugin_init() {
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR);

    
register_message(get_user_msgid("ShowMenu"), "message_show_menu");
    
//   register_event("ResetHUD", "set_hud", "be");
    
RegisterHam(Ham_Spawn"player""CBasePlayer_Spawn_Post"1)

    
register_clcmd"say /shopT""ShopT" );
    
register_clcmd"say /shopCT""ShopCT" );

    
// change round end message / sounds
    
register_message(get_user_msgid("SendAudio"), "message_sendaudio");
    
register_message(get_user_msgid("TextMsg"), "message_textmsg");

    
pcTeamT register_cvar("ctn_team_t"TeamT);
    
pcTeamCT register_cvar("ctn_team_ct"TeamCT);
    
//pcUseSounds = register_cvar("ctn_use_sounds", "1");
    //pcSoundT  = register_cvar("ctn_sound_t", SoundT);
    //pcSoundCT = register_cvar("ctn_sound_ct", SoundCT);

    
register_clcmd("chooseteam""cmdBlock");

    
createMenu();
}

public 
ShopCT(id)
{
    new 
menu menu_create("\yWhat well you buy?""CTsubmenu_handler")

    
menu_additem(menu"\wExtra 35 HP for ($5000)""1"0);
    
menu_additem(menu"\wExtra 60 HP for ($10000)""1"0);

    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
}

public 
CTsubmenu_handler(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], szName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback);

    new 
key str_to_num(data);

    switch(
key)
    {
        case 
1:
        {
           if(
cs_get_user_moneyid ) < 5000
           {
               
client_print(idprint_chat"You do not have enough money.")
               return 
PLUGIN_CONTINUE
           
}
           
set_user_health(idget_user_health(id) + 35)
           
cs_set_user_money(idcs_get_user_money(id) - 5500)
        }
        case 
2:
        {
           if(
cs_get_user_moneyid ) < 12000)
           {
               
client_print(idprint_chat"You do not have enough money.")
               return 
PLUGIN_CONTINUE
           
}
           
set_user_health(idget_user_health(id) + 65)     
           
cs_set_user_money(idcs_get_user_money(id) - 10000)
        }

    }
    return 
PLUGIN_HANDLED;
}

public 
ShopT(id)
{
    new 
menu menu_create("\yWhat well you buy?""submenu_handler")

    
menu_additem(menu"\wExtra 25 HP for ($5000)""1"0);
    
menu_additem(menu"\wExtra 50 HP for ($10000)""1"0);

    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
}

public 
submenu_handler(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], szName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback);

    new 
key str_to_num(data);

    switch(
key)
    {
        case 
1:
        {
           if(
cs_get_user_moneyid ) < 5000
           {
               
client_print(idprint_chat"You do not have enough money.")
               return 
PLUGIN_CONTINUE
           
}
           
set_user_health(idget_user_health(id) + 25)
           
cs_set_user_money(idcs_get_user_money(id) - 5000)
        }
        case 
2:
        {
           if(
cs_get_user_moneyid ) < 10000)
           {
               
client_print(idprint_chat"You do not have enough money.")
               return 
PLUGIN_CONTINUE
           
}
           
set_user_health(idget_user_health(id) + 50)     
           
cs_set_user_money(idcs_get_user_money(id) - 10000)
        }

    }
    return 
PLUGIN_HANDLED;
}

public 
client_putinserver(id)
{
    
b_FirstLaunch[id] = true
}

public 
client_disconnect(id)
{
    if (
b_FirstLaunch[id])
        
b_FirstLaunch[id] = false
}

public 
fn_CheckTeam(id)
{
    if (
b_FirstLaunch[id])
    {
        
b_FirstLaunch[id] = false

        
static CsTeams:user_team;

        
user_team cs_get_user_team(id);

        switch (
user_team)
        {
            case 
CS_TEAM_CT:
            
ShopCT(id)

            case 
CS_TEAM_T:
            
ShopT(id)
        }
    }
}

public 
client_connect(id)
{
    
set_user_info(id"_vgui_menus""0");

    return 
PLUGIN_CONTINUE;
}

public 
CBasePlayer_Spawn_Post(id)
{
    if( 
is_user_alive(id) )
    {
        
showMsg 0;
        
set_task(0.3"fadeOut"id);

        
// some fixes if the HUD is destroyed
        
if (!user_has_weapon(idCSW_KNIFE))
        {
            
set_pev(idpev_weaponspev(idpev_weapons) | (1<<31))
            
give_item(id"weapon_knife");

            switch (
cs_get_user_team(id))
            {
                case 
CS_TEAM_CT:
                {
                    
give_item(id"weapon_usp");
                    
give_item(id"ammo_45acp");
                }

                case 
CS_TEAM_T:
                {
                    
give_item(id"weapon_glock18");
                    
give_item(id"ammo_9mm");
                }
            }
        }

    }
}

// end of a round
public round_end_msg(params[]) {
    if (
showMsg == 1)
    {
        
client_print(0print_center"%s win!"params);
        
set_task(0.2"round_end_msg"0params128);
    }
}

public 
message_textmsgmsg_idmsg_destmsg_entity )
{
    static 
message[10];
    
get_msg_arg_string2messagesizeof  message );

    if( 
message[1] == 'T' && message[2] == 'e' // #Terrorists_Win message
    
{
        
set_hudmessage(255,0,0,-1.0,0.3,0,2.0,2.0,0.0,0.0,-1)
        
show_hudmessage0"Terro Message Here")
        return 
PLUGIN_HANDLED
    }
    else if( 
message[1] == 'C' && (message[2] == 'T' || message[2] == 't') )
    {
        
set_hudmessage(0,64,255,-1.0,0.3,0,2.0,2.0,0.0,0.0,-1)
        
show_hudmessage0"CT Message Here")
        return 
PLUGIN_HANDLED
    }
    
    return 
PLUGIN_CONTINUE;
}

// sounds
public fadeOut()
{
    
client_cmd(0"cd fadeout");
    return 
PLUGIN_CONTINUE;
}

public 
message_sendaudiomsg_idmsg_destmsg_entity )
{
    static 
message[10];
    
get_msg_arg_string2messagesizeof  message );

    if( 
message[7] == 't' )
    {
        
client_cmdmsg_entity"spk path/to/sound.extension" ); // or mp3 play
        // What you want to do other than sound
        
return PLUGIN_HANDLED
    }
    else if( 
message[7] == 'c' )
    {
        
client_cmdmsg_entity"spk path/to/sound.extension" ); // or mp3 play
        // What you want to do other than sound.
        
return PLUGIN_HANDLED
    }

    return 
PLUGIN_CONTINUE;
}

public 
cmdBlock(id)
{
    
menu_display(idmChooseTeam0);
    return 
PLUGIN_HANDLED;
}

// custom menu
public createMenu() {
    
mChooseTeam menu_create("\wCHOOSE WHAT FORCE YOU WANT""mh_ChooseTeam");

    new 
t_name[128], ct_name[128];
    
get_pcvar_string(pcTeamTt_name127);
    
get_pcvar_string(pcTeamCTct_name127);

    
menu_additem(mChooseTeamt_name"ma_ChooseTeam"ADMIN_ALL);
    
menu_additem(mChooseTeamct_name"ma_ChooseTeam"ADMIN_ALL);
    
menu_additem(mChooseTeam"\rPokemon Spectator""ma_ChooseTeam"ADMIN_ALL);

    return 
PLUGIN_CONTINUE;
}

public 
message_show_menu(msgiddestid) {
    if (
get_user_team(id) || task_exists(id))
        return 
PLUGIN_CONTINUE;

    static 
team_select[] = "#Team_Select";
    static 
menu_text_code[sizeof team_select];

    
get_msg_arg_string(4menu_text_codesizeof menu_text_code 1);

    if (!
equal(menu_text_codeteam_select))
        return 
PLUGIN_CONTINUE;

    
set_task(0.1"force_team_join"id);

    return 
PLUGIN_HANDLED;
}

public 
force_team_join(id) {
    
engclient_cmd(id"jointeam""6");
    
menu_display(idmChooseTeam0);

    return 
PLUGIN_CONTINUE;
}

public 
mh_ChooseTeam(idmenuitem) {
    switch (
item)
    {
        case -
3: return PLUGIN_HANDLED;

        case 
0:
            if (
cs_get_user_team(id) == CS_TEAM_T)
                return 
PLUGIN_HANDLED;
        
        case 
1:
            if (
cs_get_user_team(id) == CS_TEAM_CT)
                return 
PLUGIN_HANDLED;

        case 
2:
            if (
cs_get_user_team(id) == CS_TEAM_SPECTATOR)
                return 
PLUGIN_HANDLED;
    }    

    if (
cs_get_user_team(id) != CS_TEAM_SPECTATOR)
    {
        
user_silentkill(id);
        
cs_set_user_deaths(idcs_get_user_deaths(id) - 1);
    }

    
cs_set_user_team(iditem 1random_num(15));

    
// restart round if there is only one player (excl. bot)
    
new Players[32], playerCount;
    
get_players(PlayersplayerCount"c");

    if (
playerCount == 1)
        
server_cmd("sv_restart 1");

    return 
PLUGIN_HANDLED;
}

public 
plugin_precache() {

        
#if defined SOUND_CT_WIN
                
precache_sound(SOUND_CT_WIN);
        
#endif
        #if defined SOUND_T_WIN
                
precache_sound(SOUND_T_WIN);
        
#endif

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 08-11-2011 at 19:27.
ConnorMcLeod 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 03:29.


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