Raised This Month: $32 Target: $400
 8% 

Solved weaponbox/armoury_entity Touch


Post New Thread Reply   
 
Thread Tools Display Modes
E1_531G
Senior Member
Join Date: Dec 2017
Old 01-16-2018 , 19:01   Re: weaponbox/armoury_entity Touch
Reply With Quote #41

You should go with engine touch hook, not ham.
You get spam because ent touches world every frame.
__________________
My English is A0

Last edited by E1_531G; 01-16-2018 at 19:03.
E1_531G is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-16-2018 , 19:27   Re: weaponbox/armoury_entity Touch
Reply With Quote #42

Quote:
Originally Posted by E1_531G View Post
You should go with engine touch hook, not ham.
You get spam because ent touches world every frame.
You're right, as with Hamsandwich you can't specify what armoury_entity will be touching.

EDIT: Here's a full debug:

Debug #1, just started the listenserver. No bugs here. I never dropped my weapon that's why it showed straight 1.
PHP Code:
L 01/17/2018 01:32:47m_iType13 m_iCount1
L 01
/17/2018 01:32:47m_iType13 m_iCount0
L 01
/17/2018 01:32:47m_iType13 m_iCount0
L 01
/17/2018 01:32:47m_iType13 m_iCount0
L 01
/17/2018 01:32:47m_iType13 m_iCount0
L 01
/17/2018 01:32:47m_iType13 m_iCount0
L 01
/17/2018 01:32:47m_iType13 m_iCount0
L 01
/17/2018 01:32:53m_iTypem_iCount1
L 01
/17/2018 01:32:53m_iTypem_iCount1
L 01
/17/2018 01:32:53m_iTypem_iCount1
L 01
/17/2018 01:32:53m_iTypem_iCount1
L 01
/17/2018 01:32:53m_iTypem_iCount1
L 01
/17/2018 01:32:53m_iTypem_iCount1
L 01
/17/2018 01:32:54m_iTypem_iCount1
L 01
/17/2018 01:32:54m_iTypem_iCount1
L 01
/17/2018 01:32:54m_iTypem_iCount1
L 01
/17/2018 01:32:54m_iTypem_iCount
Debug #2, 2nd round, here is the bug. I had no Primary weapon but I couldn't pick-up the AWP.
PHP Code:
L 01/17/2018 01:35:24m_iType10 m_iCount1
L 01
/17/2018 01:35:24m_iType10 m_iCount1
L 01
/17/2018 01:35:24m_iType10 m_iCount1
L 01
/17/2018 01:35:24m_iType10 m_iCount1
L 01
/17/2018 01:35:24m_iType10 m_iCount1
L 01
/17/2018 01:35:24m_iType10 m_iCount1
L 01
/17/2018 01:35:24m_iType10 m_iCount1
L 01
/17/2018 01:35:24m_iType10 m_iCount1
L 01
/17/2018 01:35:24m_iType10 m_iCount1
L 01
/17/2018 01:35:24m_iType10 m_iCount1
L 01
/17/2018 01:35:24m_iType10 m_iCount1
L 01
/17/2018 01:35:24m_iType10 m_iCount1
L 01
/17/2018 01:35:24m_iType10 m_iCount1
L 01
/17/2018 01:35:24m_iType10 m_iCount1
L 01
/17/2018 01:35:24m_iType10 m_iCount1
L 01
/17/2018 01:35:26m_iType10 m_iCount1
L 01
/17/2018 01:35:26m_iType10 m_iCount1
L 01
/17/2018 01:35:26m_iType10 m_iCount1
L 01
/17/2018 01:35:26m_iType10 m_iCount1
L 01
/17/2018 01:35:26m_iType10 m_iCount1
L 01
/17/2018 01:35:26m_iType10 m_iCount1
L 01
/17/2018 01:35:26m_iType10 m_iCount1
L 01
/17/2018 01:35:26m_iType10 m_iCount
Debug #3, game still acts like I have a primary weapon, but I don't, all I do have is a knife. It lets me pick-up secondary stuff, such as grenades, maybe Armor too, idk.

PHP Code:
L 01/17/2018 01:38:09m_iType10 m_iCount1
L 01
/17/2018 01:38:09m_iType10 m_iCount1
L 01
/17/2018 01:38:09m_iType10 m_iCount1
L 01
/17/2018 01:38:09m_iType10 m_iCount1
L 01
/17/2018 01:38:09m_iType10 m_iCount1
L 01
/17/2018 01:38:09m_iType10 m_iCount1
L 01
/17/2018 01:38:09m_iType10 m_iCount1
L 01
/17/2018 01:38:09m_iType10 m_iCount1
L 01
/17/2018 01:38:09m_iType10 m_iCount1
L 01
/17/2018 01:38:29m_iTypem_iCount1
L 01
/17/2018 01:38:29m_iTypem_iCount1
L 01
/17/2018 01:38:29m_iTypem_iCount1
L 01
/17/2018 01:38:29m_iTypem_iCount1
L 01
/17/2018 01:38:29m_iTypem_iCount1
L 01
/17/2018 01:38:29m_iTypem_iCount1
L 01
/17/2018 01:38:29m_iTypem_iCount1
L 01
/17/2018 01:38:29m_iTypem_iCount1
L 01
/17/2018 01:38:29m_iTypem_iCount1
L 01
/17/2018 01:38:32m_iType14 m_iCount1
L 01
/17/2018 01:38:32m_iType14 m_iCount
__________________

Last edited by edon1337; 01-16-2018 at 19:42.
edon1337 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-16-2018 , 19:32   Re: weaponbox/armoury_entity Touch
Reply With Quote #43

Try my Armoury Manager plugin and see if entity's created by the plugin work.
__________________
Bugsy is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-16-2018 , 19:54   Re: weaponbox/armoury_entity Touch
Reply With Quote #44

Quote:
Originally Posted by Bugsy View Post
Try my Armoury Manager plugin and see if entity's created by the plugin work.
I installed your plugin and nothing is happening, I'm holding IN_USE button but nothing is appearing

EDIT: I wrote am_info and it only displayed 2 awp entities, but there's loads of armoury_entities on the ground. Also it shows 'Deleted: No' and 'Created: No'..
__________________

Last edited by edon1337; 01-16-2018 at 20:06.
edon1337 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-17-2018 , 04:47   Re: weaponbox/armoury_entity Touch
Reply With Quote #45

Quote:
Originally Posted by edon1337 View Post
There's nothing related to this thread in the rest of the code.
I did some debugs and, as soon as I spawned, I got 75 KB of debugs in just a few seconds, no idea why it spammed me like this
PHP Code:
L 01/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:58m_iType12 m_iCount1
L 01
/16/2018 23:21:58m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iType12 m_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iType12 m_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iType12 m_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iType12 m_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iType12 m_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iType12 m_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iType12 m_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iType12 m_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iType12 m_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iType12 m_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iTypem_iCount1
L 01
/16/2018 23:21:59m_iType12 m_iCount
Wasn't even able to touch any armoury_entity because of the intense spam.
PHP Code:
#include < amxmodx >
#include < fakemeta >
#include < hamsandwich >

const m_iType 34 // armoury_entity index( see above enum )
const m_iCount 35 // hold the number of weapons that the armoury_entity will have 

public plugin_init( )
{
    
RegisterHamHam_Touch"armoury_entity""fw_HamTouchArmouryEntity_Pre");
}

public 
fw_HamTouchArmouryEntity_PreiEnt )
{
    if( 
pev_validiEnt ) != )
    return 
HAM_IGNORED;
    
    
log_to_file"DebugArmoury.txt""m_iType: %d | m_iCount: %d"get_pdata_intiEntm_iType ), get_pdata_intiEntm_iCount ) );
    return 
HAM_IGNORED;

Maybe I want to be able to test so I can debug your code. How can I do that without a working plugin? What's the value of m_bHasPrimary offset ?
(116)
__________________

Last edited by HamletEagle; 01-17-2018 at 04:55.
HamletEagle is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-17-2018 , 08:10   Re: weaponbox/armoury_entity Touch
Reply With Quote #46

Quote:
Originally Posted by HamletEagle View Post
Maybe I want to be able to test so I can debug your code. How can I do that without a working plugin? What's the value of m_bHasPrimary offset ?
(116)
I can upload the mod in PM as it has many .sma's included, and it's a private project.
I guess the problem is m_bHasPrimary, it always stays 1. Maybe setting m_bHasPrimary on RoundEnd event to 0 for everyone would fix this?
PHP Code:
[1st round]
L 01/17/2018 14:02:34m_iType14 m_iCountm_bHasPrimary
L 01
/17/2018 14:02:34m_iType14 m_iCountm_bHasPrimary
L 01
/17/2018 14:02:34m_iType14 m_iCountm_bHasPrimary
L 01
/17/2018 14:02:34m_iType14 m_iCountm_bHasPrimary
L 01
/17/2018 14:02:34m_iType14 m_iCountm_bHasPrimary
L 01
/17/2018 14:02:41m_iType17 m_iCountm_bHasPrimary
L 01
/17/2018 14:02:41m_iType17 m_iCountm_bHasPrimary
L 01
/17/2018 14:02:41m_iType17 m_iCountm_bHasPrimary
L 01
/17/2018 14:02:41m_iType17 m_iCountm_bHasPrimary
L 01
/17/2018 14:02:41m_iType17 m_iCountm_bHasPrimary
L 01
/17/2018 14:03:05m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:03:05m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:03:05m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:03:08m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:03:08m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:03:08m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:03:08m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:03:08m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:03:08m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:03:08m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:03:08m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:03:08m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:03:08m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:40m_iType11 m_iCountm_bHasPrimary

[2nd round]
L 01/17/2018 14:04:46m_iType16 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:46m_iType16 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:46m_iType16 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:46m_iType16 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:46m_iType16 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:46m_iType16 m_iCountm_bHasPrimary
L 01
/17/2018 14:04:46m_iType16 m_iCountm_bHasPrimary
__________________

Last edited by edon1337; 01-17-2018 at 08:12.
edon1337 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-17-2018 , 09:40   Re: weaponbox/armoury_entity Touch
Reply With Quote #47

Are you using strip_user_weapons? You can extract from your mod only the stuff related to armoury_entity and post that.
__________________

Last edited by HamletEagle; 01-17-2018 at 09:41.
HamletEagle is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-17-2018 , 09:43   Re: weaponbox/armoury_entity Touch
Reply With Quote #48

Quote:
Originally Posted by HamletEagle View Post
Are you using strip_user_weapons? You can extract from your mod only the stuff related to armoury_entity and post that.
Yes, I am using strip_user_weapons in Ham_Spawn Post and give_item to give him weapon_knife. I was thinking of telling you about it, but had no idea if it would matter, does it?
The code that I provided before, is all that is related to armoury_entity.
__________________

Last edited by edon1337; 01-17-2018 at 09:45.
edon1337 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-17-2018 , 09:46   Re: weaponbox/armoury_entity Touch
Reply With Quote #49

If you are using an old server build(before 2013) there's a bug, the game does not reset the offset when it should. Do it manually after strip_user_weapons or update your server.
__________________
HamletEagle is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-17-2018 , 11:37   Re: weaponbox/armoury_entity Touch
Reply With Quote #50

Quote:
Originally Posted by HamletEagle View Post
If you are using an old server build(before 2013) there's a bug, the game does not reset the offset when it should. Do it manually after strip_user_weapons or update your server.
I manually set m_bHasPrimary to 0 after using strip_user_weapons just to be safe, you never know whether other people who will use this plugin won't have the same server build as me.
I think you should also add this statement in your FAQ of armoury_entities.

Thank you Hamlet and Bugsy!
__________________
edon1337 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 00:41.


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