Raised This Month: $ Target: $400
 0% 

Weird Bug in Deathrun


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-18-2018 , 04:34   Re: Weird Bug in Deathrun
Reply With Quote #1

Simply use amx latest stable version and its 182.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 06-18-2018 at 04:34.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-18-2018 , 07:57   Re: Weird Bug in Deathrun
Reply With Quote #2

Quote:
Originally Posted by Natsheh View Post
Simply use amx latest stable version and its 182.
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(idCSW_USP100)
    }

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.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
marcelowzd
Senior Member
Join Date: Feb 2011
Location: São Paulo, Brazil
Old 06-18-2018 , 10:43   Re: Weird Bug in Deathrun
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
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(idCSW_USP100)
    }

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( )
{
       
RegisterHamHam_Spawn,      "player""FwdHamPlayerSpawn");
}

public 
FwdHamPlayerSpawnid ) {
    if( !
g_bEnabled || !is_user_aliveid ) )
        return 
HAM_IGNORED;
    
    if( 
get_pcvar_numg_pBlockRadio ) ) // thanks to ConnorMcLeod for this good way :)
        
set_pdata_intid192);
    
#if defined FAKE_PLAYER
    
if( g_iFakeplayer == id ) {
        
set_pevidpev_frags, -1000.0 );
        
cs_set_user_deathsid, -1000 );
        
        
set_pevidpev_effectspevidpev_effects ) | EF_NODRAW );
        
set_pevidpev_solidSOLID_NOT );
        
entity_set_originidFloat:{ 999999.0999999.0999999.0 } );
        
dllfuncDLLFunc_Thinkid );
    } else {
#endif
        
new CsTeams:iTeam cs_get_user_teamid );
        
        
// An small delay for message
        
if( get_pcvar_numg_pLifeSystem ) != && iTeam == CS_TEAM_CT )
            
set_task0.8"Showlifes"id );
        
        
strip_user_weaponsid );
        
give_itemid"weapon_knife" );
        
        
set_pdata_intid116); // Pickup fix by ConnorMcLeod
        
        
if( g_bGamerFun && iTeam == CS_TEAM_CT )
            
give_itemid"weapon_smokegrenade" );
        
        if( 
get_pcvar_numg_pGiveUsp ) && iTeam == CS_TEAM_CT && !g_bHauntedHouse )
            
set_task1.0"GiveUsp"id );
    
        
set_user_gravity(id1.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)
__________________

Last edited by marcelowzd; 06-18-2018 at 11:00.
marcelowzd 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 12:51.


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