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

[ES]Ayuda YAP debug


  
 
 
Thread Tools Display Modes
Author Message
Lchriaz
Senior Member
Join Date: Nov 2008
Location: Venezuelaa - Anzoategui
Old 09-19-2009 , 00:06   [ES]Ayuda YAP debug
#1

Hola, tenia tiempo sin entrar al foro por falta de coneccion :@

Buenoo aqui les traigo mi problemaa

L 09/18/2009 - 23:20:16: [CSTRIKE] Invalid player 1
L 09/18/2009 - 23:20:16: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/18/2009 - 23:20:16: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

Porq es el debug y como podria solucionarlo
Gracias,Salu2
__________________
Mapper level: Mid
Sorry for me inglish
+karmita


Lchriaz is offline
Old 09-19-2009, 00:08
Asd'
This message has been deleted by Asd'.
Old 09-19-2009, 00:09
vazmar
This message has been deleted by vazmar.
Lchriaz
Senior Member
Join Date: Nov 2008
Location: Venezuelaa - Anzoategui
Old 09-19-2009 , 01:21   Re: [ES]Ayuda YAP debug
#2

Code:
L 09/17/2009 - 14:45:58: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 14:48:00: Start of error session.
L 09/17/2009 - 14:48:00: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20090917.log")
L 09/17/2009 - 14:48:00: [CSTRIKE] Invalid player 8
L 09/17/2009 - 14:48:00: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 14:48:00: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 14:48:07: [CSTRIKE] Invalid player 8
L 09/17/2009 - 14:48:07: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 14:48:07: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 14:48:14: [CSTRIKE] Invalid player 8
L 09/17/2009 - 14:48:14: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 14:48:14: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 14:55:51: [CSTRIKE] Invalid player 7
L 09/17/2009 - 14:55:51: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 14:55:51: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 15:07:19: [CSTRIKE] Invalid player 8
L 09/17/2009 - 15:07:19: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 15:07:19: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 15:07:19: [CSTRIKE] Invalid player 10
L 09/17/2009 - 15:07:19: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 15:07:19: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 15:07:26: [CSTRIKE] Invalid player 8
L 09/17/2009 - 15:07:26: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 15:07:26: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 15:07:26: [CSTRIKE] Invalid player 10
L 09/17/2009 - 15:07:26: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 15:07:26: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 15:07:32: [CSTRIKE] Invalid player 10
L 09/17/2009 - 15:07:32: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 15:07:32: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 15:57:55: Start of error session.
L 09/17/2009 - 15:57:55: Info (map "de_inferno") (file "addons/amxmodx/logs/error_20090917.log")
L 09/17/2009 - 15:57:55: [CSTRIKE] Invalid player 10
L 09/17/2009 - 15:57:55: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 15:57:55: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 15:58:01: [CSTRIKE] Invalid player 10
L 09/17/2009 - 15:58:01: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 15:58:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 15:58:07: [CSTRIKE] Invalid player 10
L 09/17/2009 - 15:58:07: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 15:58:07: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 16:29:17: [CSTRIKE] Invalid player 8
L 09/17/2009 - 16:29:17: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 16:29:17: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 16:31:26: [CSTRIKE] Invalid player 5
L 09/17/2009 - 16:31:26: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 16:31:26: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 16:37:28: Start of error session.
L 09/17/2009 - 16:37:28: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20090917.log")
L 09/17/2009 - 16:37:28: [CSTRIKE] Invalid player 1
L 09/17/2009 - 16:37:28: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 16:37:28: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 16:37:28: [CSTRIKE] Invalid player 9
L 09/17/2009 - 16:37:28: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 16:37:28: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 16:37:35: [CSTRIKE] Invalid player 1
L 09/17/2009 - 16:37:35: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 16:37:35: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 16:37:35: [CSTRIKE] Invalid player 9
L 09/17/2009 - 16:37:35: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 16:37:35: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 16:37:41: [CSTRIKE] Invalid player 1
L 09/17/2009 - 16:37:41: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 16:37:41: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 16:37:41: [CSTRIKE] Invalid player 9
L 09/17/2009 - 16:37:41: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 16:37:41: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 17:01:32: [CSTRIKE] Invalid player 10
L 09/17/2009 - 17:01:32: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 17:01:32: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 17:01:32: [CSTRIKE] Invalid player 12
L 09/17/2009 - 17:01:32: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 17:01:32: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 17:01:39: [CSTRIKE] Invalid player 10
L 09/17/2009 - 17:01:39: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 17:01:39: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 17:01:39: [CSTRIKE] Invalid player 12
L 09/17/2009 - 17:01:39: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 17:01:39: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 17:01:45: [CSTRIKE] Invalid player 10
L 09/17/2009 - 17:01:45: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 17:01:45: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 17:01:45: [CSTRIKE] Invalid player 12
L 09/17/2009 - 17:01:45: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 17:01:45: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 17:16:38: Start of error session.
L 09/17/2009 - 17:16:38: Info (map "de_inferno") (file "addons/amxmodx/logs/error_20090917.log")
L 09/17/2009 - 17:16:38: [CSTRIKE] Invalid player 7
L 09/17/2009 - 17:16:38: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 17:16:38: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 17:16:45: [CSTRIKE] Invalid player 7
L 09/17/2009 - 17:16:45: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 17:16:45: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 17:16:51: [CSTRIKE] Invalid player 7
L 09/17/2009 - 17:16:51: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 17:16:51: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 18:12:17: [CSTRIKE] Invalid player 5
L 09/17/2009 - 18:12:17: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 18:12:17: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 18:12:17: [CSTRIKE] Invalid player 9
L 09/17/2009 - 18:12:17: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 18:12:17: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 18:12:17: [CSTRIKE] Invalid player 11
L 09/17/2009 - 18:12:17: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 18:12:17: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 18:12:17: [CSTRIKE] Invalid player 12
L 09/17/2009 - 18:12:17: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 18:12:17: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 18:15:53: [CSTRIKE] Invalid player 11
L 09/17/2009 - 18:15:53: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 18:15:53: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 18:15:53: [CSTRIKE] Invalid player 12
L 09/17/2009 - 18:15:53: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 18:15:53: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 18:15:59: [CSTRIKE] Invalid player 11
L 09/17/2009 - 18:15:59: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 18:15:59: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 18:15:59: [CSTRIKE] Invalid player 12
L 09/17/2009 - 18:15:59: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 18:15:59: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 18:16:05: [CSTRIKE] Invalid player 11
L 09/17/2009 - 18:16:05: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 18:16:05: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 09/17/2009 - 18:16:05: [CSTRIKE] Invalid player 12
L 09/17/2009 - 18:16:05: [AMXX] Run time error 10 (plugin "yap_cs.amxx") (native "cs_reset_user_model") - debug not enabled!
L 09/17/2009 - 18:16:05: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
Aqui esta el log
__________________
Mapper level: Mid
Sorry for me inglish
+karmita


Lchriaz is offline
Kiske
Veteran Member
Join Date: May 2009
Old 09-19-2009 , 02:57   Re: [ES]Ayuda YAP debug
#3

Estas usando mal la Native CS_SET_USER_MODEL

Pasa todas las Lineas que tengas con CS_SET_USER_MODEL
__________________

Kiske is offline
Send a message via Skype™ to Kiske
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-19-2009 , 03:04   Re: [ES]Ayuda YAP debug
#4

No estoy seguro, pero si no me equivoco el problema hay tiene que ver con algun index mal usado, que puede ser dentro de un loop.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Kiske
Veteran Member
Join Date: May 2009
Old 09-19-2009 , 10:25   Re: [ES]Ayuda YAP debug
#5

Quote:
Originally Posted by Alucard^ View Post
No estoy seguro, pero si no me equivoco el problema hay tiene que ver con algun index mal usado, que puede ser dentro de un loop.
Si fuera un LOOP creo que el Erro tendria que ser:
Quote:
14:45:58
14:45:58
14:45:58
14:45:58
14:45:58
14:45:58
14:45:58
14:45:58
14:45:59
14:45:59
14:45:59
14:45:59
14:45:59
14:45:59
14:45:59
14:45:59
14:46:01
14:46:01
14:46:01
14:46:01
14:46:01
14:46:01
14:46:01
14:46:02
14:46:02
14:46:02
14:46:02
14:46:02
14:46:02
14:46:02
14:46:03
14:46:03
14:46:03
14:46:03
14:46:03
14:46:03
Etc !

__________________

Kiske is offline
Send a message via Skype™ to Kiske
Lchriaz
Senior Member
Join Date: Nov 2008
Location: Venezuelaa - Anzoategui
Old 09-19-2009 , 16:10   Re: [ES]Ayuda YAP debug
#6

Pero el problema es que yo no edite el plugin nada, lo tengo tal cual como lo descargue :S
__________________
Mapper level: Mid
Sorry for me inglish
+karmita


Lchriaz is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-19-2009 , 17:14   Re: [ES]Ayuda YAP debug
#7

Y entonces postea el sma?
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Lchriaz
Senior Member
Join Date: Nov 2008
Location: Venezuelaa - Anzoategui
Old 09-19-2009 , 17:49   Re: [ES]Ayuda YAP debug
#8

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <csx>

#include <yap_forwards>
#include <yap_natives>
#include <yap_stocks>
#include <yap_const>

new const plugin_author[] = "Twilight Suzuka"
new const plugin_name[] = "YAP-CS"
new const plugin_version[] = "0.0.1"

new mp_limitteams;

public 
pug_cvar_shield;
public 
pug_cvar_allow_spec;
public 
pug_cvar_switch_delay
public pug_cvar_force_restart

public plugin_init()
{
    
register_plugin(plugin_name,plugin_version,plugin_author);
    
register_clcmd("shield","block_shield")

    
register_dictionary("yap.txt")
    
register_dictionary("yap_mod.txt")

    
pug_cvar_shield register_cvar("pug_noshield","1")
    
pug_cvar_switch_delay register_cvar("pug_switch_delay","5")
    
pug_cvar_force_restart register_cvar("pug_force_restart","0")

    
register_event("HLTV""round_start""a""1=0""2=0"
    
//register_logevent("round_start", 2, "1=Round_Start") 
 
    
register_event("SendAudio""t_won""a""2&%!MRAD_terwin")
    
register_event("SendAudio""ct_won""a""2&%!MRAD_ctwin")
    
register_event("SendAudio","x_won","a","2=%!MRAD_terwin","2=%!MRAD_ctwin")

    
register_logevent("round_end"2"1=Round_End")  

    
register_event("ResetHUD","event_resethud","b")

    
// Rukia: Check to see if they try to buy a shield
    
register_menucmd(register_menuid("BuyItem"),511,"blockmenu")
    
register_menucmd(-34,511,"blockmenu")

    
// Rukia: Manipulate team joining
    
register_menucmd(register_menuid("Team_Select",1),(1<<0)|(1<<1)|(1<<4)|(1<<5),"team_select")
    
register_menucmd(-2,(1<<0)|(1<<1)|(1<<4)|(1<<5),"team_select")
    
register_clcmd("jointeam","join_team")

    
//parse_header("BOE-E",pug_header,5)
}

public 
plugin_cfg()
{
    
pug_register_team("Terrorists")
    
pug_register_team("Counter-Terrorists")

    
set_task(0.5,"get_mp_cvar")
}

public 
get_mp_cvar()
{
    
mp_limitteams get_cvar_pointer "mp_limitteams" )
    
pug_cvar_allow_spec get_cvar_pointer("pug_allowspec")
}

public 
plugin_natives()
{
    
register_native("pug_get_players","pug_get_players")
    
register_native("pug_teams_randomize","cs_teams_randomize")
    
register_native("pug_teams_balance","cs_teams_balance")
    
    
register_native("pug_get_client_team","cs_get_client_team")
    
register_native("pug_set_client_team","cs_set_client_team")
}

public 
cs_get_client_team()
{
    return 
_:cs_get_user_team(get_param(1));
}    

public 
cs_set_client_team()
{
    
cs_set_user_team(get_param(1),_:get_param(2));
}

public 
force_restart()
{
    
server_cmd("sv_restartround 1")
    
server_exec()
}

public 
cs_teams_randomize()
{
    static 
Players[32]
    new 
playerCountiplayer
    get_players
(PlayersplayerCount"ch")

    new 
type 0;
    for (
i=0i<playerCounti++)
    {
        
player Players[i]

        switch ( 
cs_get_user_team(player) )
        {
            case 
1
            {
                if(
type == 0) { type random_num(1,2); cs_set_user_team(player,_:type); }
                else { 
cs_set_user_team(player,(type == 1) ? 1); type 0; }
            }
            case 
2:
            {
                if(
type == 0) { type random_num(1,2); cs_set_user_team(player,_:type); }
                else { 
cs_set_user_team(player,(type == 1) ? 1); type 0; }
            }
        }
    }
    if(
get_pcvar_num(pug_cvar_force_restart)) force_restart()
}

public 
cs_teams_balance()
{
    static 
Players[32]
    new 
playerCountiplayer
    get_players
(PlayersplayerCount"ch")

    new 
aba_playerb_player;
    for (
i=0i<playerCounti++)
    {
        
player Players[i]

        switch ( 
cs_get_user_team(player) )
        {
            case 
1: { ++aa_player player; }
            case 
2: { ++bb_player player; }
        }
    }
    if(
== b) return;
    else if( (
2) == bcs_set_user_team(a_player,_:2)
    else if( (
2) == acs_set_user_team(b_player,_:1)

    else if( (
a+b) < GET_CVAR_MINPLAYERS() )
    {
        
pug_get_team_score(1)
        
pug_get_team_score(2)

        if(
bcs_set_user_team(b_player,_:1)
        else if(
acs_set_user_team(a_player,_:2)
    }
}    

public 
pug_get_players()
{
    static 
Players[32]
    new 
playerCountiplayer
    get_players
(PlayersplayerCount"ch")

    new 
players 0;
    for (
i=0i<playerCounti++)
    {
        
player Players[i]

        switch ( 
cs_get_user_team(player) )
        {
            case 
1: ++players;
            case 
2: ++players;
        }
    }
    return 
players;
}

public 
event_resethud(idcs_reset_user_model(id)

public 
block_shield(id
{
    if(
get_pcvar_num(pug_cvar_shield) == 1
    {
        
//client_print(id,print_center,shield_disabled)
        
return PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}

public 
blockmenu(id,key
{
    if( (
key == 7) && (get_pcvar_num(pug_cvar_shield) == 1) ) 
    {
        
//client_print(id,print_center,shield_disabled)
        
return PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}

new 
who_won

public t_won()
{
    if(
who_won != -1who_won 1
}

public 
ct_won()
{
    if(
who_won != -1who_won 2
}

public 
x_won()
{
    if(
who_won == -1) return;

    static 
msg[32]
    
read_data(2,msg,32)
    if(
containi(msg,"ct") != -1who_won 2;
    else if(
containi(msg,"ter") != -1who_won 1;
}

public 
round_end()
{
    
pug_call_roundend((who_won == -1) ? who_won);
    
who_won = -1;
}

public 
round_start()
{
    
who_won 0
    pug_call_roundstart
();
}

public 
pug_intermission(GEN_FORW_ID(forward_id))
{
    
switch_teams()
}

public 
pug_ot_intermission(GEN_FORW_ID(forward_id))
{
    
switch_teams()
}

public 
switch_teams()
{
    
set_task(get_pcvar_float(pug_cvar_switch_delay),"switch_teams_really")
}

public 
switch_teams_really()
{
    new 
score pug_get_team_score(1)
    
pug_set_team_score(1,pug_get_team_score(2) )
    
pug_set_team_score(2,score)

    static 
limitt
    limitt 
get_pcvar_num(mp_limitteams)
    
set_pcvar_num(mp_limitteams,0)

    static 
Players[32]
    new 
playerCountiplayer
    get_players
(PlayersplayerCount"ch")

    for (
i=0i<playerCounti++)
    {
        
player Players[i]

        switch ( 
cs_get_user_team(player) )
        {
            case 
1cs_set_user_team(player,_:2);
            case 
2cs_set_user_team(player,_:1);
        }
    }

    
set_pcvar_num(mp_limitteams,limitt)
    if(
get_pcvar_num(pug_cvar_force_restart)) force_restart()
}

public 
join_team(id
{
    new 
arg[2]
    
read_argv(1,arg,1)
    return 
check_team(id,str_to_num(arg))
}

public 
team_select(id,key) return check_team(id,key+1)

public 
check_team(id,newteam
{
    new 
players pug_get_players()
    new 
oldteam _:cs_get_user_team(id)

    
// Rukia: We allow spectators and such in, but they can't join the teams.

    
new min_players GET_CVAR_MINPLAYERS()
    if( (
players >= min_players ) && (oldteam != 1) && (oldteam != 2) ) 
    {
        return 
pug_msg_tmp_empty(id,"PUG_FULL")
    }
    
// Rukia: If its live, we can slot people in, but we shouldn't let people change teams.
    
else if(GET_PUG_STATUS() == PUG_STATUS_LIVE)
    {
        if( (
oldteam == 1) || (oldteam == 2) ) return pug_msg_tmp_empty(id,"PUG_SELECTTEAM_NOSWITCH")
    }
    
// Rukia: Don't let them go to spec unless they are admin!
    
else if(newteam == 6
    {
        if(
access(id,PUG_CMD_LVL) || get_pcvar_num(pug_cvar_allow_spec) ) return PLUGIN_CONTINUE
        
        pug_msg_tmp_empty
(id,"PUG_SELECTTEAM_NOSPC")
        
engclient_cmd(id,"chooseteam")

        return 
PLUGIN_HANDLED
    
}
    
// Rukia: Also, no switching to same team.
    
else if(oldteam == newteam) return pug_msg_tmp_empty(id,"PUG_SELECTTEAM_SAMETEAM")

    static 
Players[32]
    new 
playerCountiplayer
    get_players
(PlayersplayerCount"ch")

    new 
t_playersct_players
    
for (i=0i<playerCounti++)
    {
        
player Players[i]

        switch ( 
cs_get_user_team(player) )
        {
            case 
1: ++t_players;
            case 
2: ++ct_players;
        }
    }

    if( (
newteam == 1) && ( t_players == (min_players 2) ) )
    { return 
pug_msg_tmp_empty(id,"PUG_SELECTTEAM_TEAMFULL"); }

    if( (
newteam == 2) && ( ct_players == (min_players 2) ) )
    { return 
pug_msg_tmp_empty(id,"PUG_SELECTTEAM_TEAMFULL"); }

    
// Rukia: Lets hope the CS auto balancer can figure out what we want
    
else if(newteam == 5
    {
        return 
PLUGIN_CONTINUE
    
}

    return 
PLUGIN_CONTINUE

__________________
Mapper level: Mid
Sorry for me inglish
+karmita



Last edited by Lchriaz; 09-19-2009 at 20:19.
Lchriaz is offline
Raddish
BANNED
Join Date: Jul 2008
Location: Argentina
Old 09-19-2009 , 17:55   Re: [ES]Ayuda YAP debug
#9

Usa php man

[ php] code[/php]
Raddish is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-19-2009 , 18:06   Re: [ES]Ayuda YAP debug
#10

@ Raddish

Si bien es mas facil leer con los php bbcodes, tmpoco es obligacion usarlos ><

@ lchriaz

No estoy seguro, pero...

PHP Code:
public event_resethud(idcs_reset_user_model(id
-->

PHP Code:
public event_resethud(id)
{
if(
is_user_alive(id) )
  
cs_reset_user_model(id)

Proba ><
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
 



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 12:11.


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