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

Counter-Strike Pick Up Manager


Post New Thread Reply   
 
Thread Tools Display Modes
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-11-2016 , 09:02   Re: Counter-Strike Pick Up Manager
Reply With Quote #21

Please test if everything is working before posting a new version. Anyway:

Be consistent, use the same naming technique on all vars and functions, make sure every line has ;. Any style is ok as long as it's used everywhere in the plugin. Also make sure the spacing is correct(for example you should not have if(function()) and if( function( ) ) or if(function() ) or other variations at the same time).

Another thing:
PHP Code:
case WT_Weaponboxcall_thinkent );
                    
case 
WT_ShieldengfuncEngFunc_RemoveEntityent );

case 
BT_BlockPickup
{    
        return 
PLUGIN_HANDLED
}
            default: 
            {
                return 
PLUGIN_CONTINUE
            } 
Use { } for single instructions nowhere or everywere, don't mix them.

pev_valid check should be the first one, not the last.

In cs_get_weaponbox_type you are still not using sizeof.

Fix above things, test and post if everything is working fine.
__________________
HamletEagle is offline
Old 12-11-2016, 09:06
Craxor
This message has been deleted by Craxor. Reason: offf
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 12-11-2016 , 09:18   Re: Counter-Strike Pick Up Manager
Reply With Quote #22

Quote:
Originally Posted by HamletEagle View Post
Please test if everything is working before posting a new version. Anyway:

Be consistent, use the same naming technique on all vars and functions, make sure every line has ;. Any style is ok as long as it's used everywhere in the plugin. Also make sure the spacing is correct(for example you should not have if(function()) and if( function( ) ) or if(function() ) or other variations at the same time).
Ok, i checked everywhere and they are the same so you say 'where' you seee i'm using if(function()) insteand of my style if ( function( ) ); ... maybe i miss some but say where please

Quote:
Another thing:
PHP Code:
case WT_Weaponboxcall_thinkent );
                    
case 
WT_ShieldengfuncEngFunc_RemoveEntityent );

case 
BT_BlockPickup
{    
        return 
PLUGIN_HANDLED
}
            default: 
            {
                return 
PLUGIN_CONTINUE
            } 
Use { } for single instructions nowhere or everywere, don't mix them.
Done ... i use {} only on WT_Armoury .. sorry about this i observe it but i forgot to make the changes, thanks for reminder

Quote:
pev_valid check should be the first one, not the last.
If you are talking about reset function where i have like that:
PHP Code:
if ( BlockType:get_pcvar_numgiTypeCvar ) == BT_Remove )
    {
        while ( ( 
iEntity find_ent_by_classiEntity "armoury_entity" ) ) )
        {
            if ( ( 
g_ArmouryTypes[get_pdata_intiEntity m_iType XoCArmoury ) ] ) && pev_validiEntity ) )
                
ExecuteHamHam_CS_Restart iEntity );
        }
    } 
It is not normaly to be there? if i'm taking the entity in the while after that i'm checking for entity ... or you're saying to leave the condition like that:
PHP Code:
if ( ( pev_validiEntity ) && g_ArmouryTypes[get_pdata_intiEntity m_iType XoCArmoury ) ] ) ) 
Quote:
In cs_get_weaponbox_type you are still not using sizeof.
Because it is a number there '5' sizeof is not returning the size from a variable ? So do you think i still should use it ?
sizeof 5; ... ??

Edit: Is not even compile Sizeof is not required there.

Quote:
Fix above things, test and post if everything is working fine.
Ok
__________________
Project: Among Us

Last edited by Craxor; 12-11-2016 at 09:25.
Craxor is offline
Send a message via ICQ to Craxor
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-11-2016 , 09:26   Re: Counter-Strike Pick Up Manager
Reply With Quote #23

Like that:
PHP Code:
if ( ( pev_validiEntity ) && g_ArmouryTypes[get_pdata_intiEntity m_iType XoCArmoury ) ] ) ) 
PHP Code:
for ( new <sizeof m_rgpPlayerItems_CWeaponBoxi++ ) 
__________________
HamletEagle is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 12-11-2016 , 09:33   Re: Counter-Strike Pick Up Manager
Reply With Quote #24

All done, can you please check the source from first post? (also tested, it works!)

Now you can download , sorry about cs_get_weaponbox it is not my stock , i do your changes .. you can check the source now
__________________
Project: Among Us

Last edited by Craxor; 12-11-2016 at 09:36.
Craxor is offline
Send a message via ICQ to Craxor
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 12-11-2016 , 09:41   Re: Counter-Strike Pick Up Manager
Reply With Quote #25

To do:
- ML.
- Find a solution to block also the kevlar.
- Create a the command 'amx_cspum' wich will show a list will cspum_ commands.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-11-2016 , 10:44   Re: Counter-Strike Pick Up Manager
Reply With Quote #26

The issue with kevlar not being loaded by nvault is that, in the gKeyList vest should have index 31, vesthelm will be 32 and shield 33. And on loading, when you do: ( 1 << i ) and i is 32 it goes back to 0 AFAIK(bugsy could explain more about this, I had always a hard time with bits). And 0 is to be ignored according with your gIgnoreWeapons. The solution is to remove that and simply check if gKeyList[i][0] is not EOS.

The const should look like this:
PHP Code:
new const gKeyList[][] = 

    
"" 
    
"p228" 
    
"" 
    
"scout" 
    
"hegrenade" 
    
"xm1014" 
    
"c4" 
    
"mac10" 
    
"aug" 
    
"smokegrenade" 
    
"elite" 
    
"fiveseven" 
    
"ump45" 
    
"sg550" 
    
"galil" 
    
"famas" 
    
"usp" 
    
"glock18" 
    
"" 
    
"mp5navy" 
    
"m249" 
    
"m3" 
    
"m4a1" 
    
"tmp" 
    
"g3sg1" 
    
"flashbang" 
    
"deagle" 
    
"sg552" 
    
"ak47" 
    
"" 
    
"p90" 
    
"vest",
    
"vesthelm",
    
"shield"
}; 

const 
CSW_SHIELD 33 
Also remove g_ArmouryTypes and use directly cs_get_armoury_type(ent) where needed.
__________________

Last edited by HamletEagle; 12-11-2016 at 10:45.
HamletEagle is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 12-11-2016 , 10:48   Re: Counter-Strike Pick Up Manager
Reply With Quote #27

so the problem is with gBlockWeapons bitfield, it supports just 32 indexes or something like that?

Are you sure it should be vesthelm and not 'kevlar' ?
About gArmoury_Types:

Should look like this:
PHP Code:
cs_get_armoury_type( [get_pdata_intiEntity m_iType XoCArmoury ) ] ) 
Or i directly put the entity ?
PHP Code:
cs_get_armoury_typeiEntity  
__________________
Project: Among Us

Last edited by Craxor; 12-11-2016 at 10:52.
Craxor is offline
Send a message via ICQ to Craxor
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-11-2016 , 10:51   Re: Counter-Strike Pick Up Manager
Reply With Quote #28

A cell has 32 bytes, so yeah. About what enums are you talking about?
__________________
HamletEagle is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 12-11-2016 , 10:53   Re: Counter-Strike Pick Up Manager
Reply With Quote #29

Check my edit ( forgot about what enum .. )
__________________
Project: Among Us

Last edited by Craxor; 12-11-2016 at 10:54.
Craxor is offline
Send a message via ICQ to Craxor
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 12-11-2016 , 13:41   Re: Counter-Strike Pick Up Manager
Reply With Quote #30

Ok problem solved, now just to add ML for 'to do' list ... And also i waiting new ideas from bugsy&Hamlet and also others!
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
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 16:05.


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