Quote:
Originally Posted by OciXCrom
Um, no.
I'm too lazy to download 5154 right now, but you can test this simple code and see if the same error pops up:
PHP Code:
#include <amxmodx> #include <cstrike> #include <fun> #include <hamsandwich>
public plugin_init() { register_plugin("PluginName", "1.0", "OciXCrom") RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1) }
public OnPlayerSpawn(id) { if(is_user_alive(id)) { give_item(id, "weapon_usp") cs_set_user_bpammo(id, CSW_USP, 100) } }
If it does and you're sure you didn't modify any of your default AMXX files, then it's a bug with the dev version that must be fixed immediately.
|
Code:
L 06/18/2018 - 11:30:50: Start of error session.
L 06/18/2018 - 11:30:50: Info (map "as_oilrig") (file "addons/amxmodx/logs/error_20180618.log")
L 06/18/2018 - 11:30:50: [CSTRIKE] Invalid weapon id 16
L 06/18/2018 - 11:30:50: [AMXX] Run time error 10 (plugin "test.amxx") (native "cs_set_user_bpammo") - debug not enabled!
L 06/18/2018 - 11:30:50: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/18/2018 - 11:30:50: [CSTRIKE] Invalid weapon id 16
L 06/18/2018 - 11:30:50: [AMXX] Run time error 10 (plugin "test.amxx") (native "cs_set_user_bpammo") - debug not enabled!
L 06/18/2018 - 11:30:50: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
Tested in a map where there wasn't any other plugin besides this one and the same happens.
For people requesting full code, it is just the default DeathrunManager. The only thing i replaced was the deprecated functions, like client_disconnect to client_disconnected, but when i was using 1.8.3 5151 they were already there.
PHP Code:
public plugin_init( )
{
RegisterHam( Ham_Spawn, "player", "FwdHamPlayerSpawn", 1 );
}
public FwdHamPlayerSpawn( id ) {
if( !g_bEnabled || !is_user_alive( id ) )
return HAM_IGNORED;
if( get_pcvar_num( g_pBlockRadio ) ) // thanks to ConnorMcLeod for this good way :)
set_pdata_int( id, 192, 0 );
#if defined FAKE_PLAYER
if( g_iFakeplayer == id ) {
set_pev( id, pev_frags, -1000.0 );
cs_set_user_deaths( id, -1000 );
set_pev( id, pev_effects, pev( id, pev_effects ) | EF_NODRAW );
set_pev( id, pev_solid, SOLID_NOT );
entity_set_origin( id, Float:{ 999999.0, 999999.0, 999999.0 } );
dllfunc( DLLFunc_Think, id );
} else {
#endif
new CsTeams:iTeam = cs_get_user_team( id );
// An small delay for message
if( get_pcvar_num( g_pLifeSystem ) != 0 && iTeam == CS_TEAM_CT )
set_task( 0.8, "Showlifes", id );
strip_user_weapons( id );
give_item( id, "weapon_knife" );
set_pdata_int( id, 116, 0 ); // Pickup fix by ConnorMcLeod
if( g_bGamerFun && iTeam == CS_TEAM_CT )
give_item( id, "weapon_smokegrenade" );
if( get_pcvar_num( g_pGiveUsp ) && iTeam == CS_TEAM_CT && !g_bHauntedHouse )
set_task( 1.0, "GiveUsp", id );
set_user_gravity(id, 1.0);
#if defined FAKE_PLAYER
}
#endif
return HAM_IGNORED;
}
I'll download again the cstrike module just to be sure.
EDIT - Added debug, but it doesn't say anything that changes the situation
Code:
L 06/18/2018 - 11:49:08: [CSTRIKE] Invalid weapon id 16
L 06/18/2018 - 11:49:08: [AMXX] Displaying debug trace (plugin "DeathrunManager.amxx", version "3.0.3")
L 06/18/2018 - 11:49:08: [AMXX] Run time error 10: native error (native "cs_set_user_bpammo")
L 06/18/2018 - 11:49:08: [AMXX] [0] DR_Core.sma::GiveUsp (line 678)
__________________