Raised This Month: $ Target: $400
 0% 

cstrike.inc - new CSI_ Items


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-11-2014 , 14:51   cstrike.inc - new CSI_ Items
Reply With Quote #1

Hey, we can remove this definitions?

PHP Code:
#define CSI_P228 CSW_P228
#define CSI_SCOUT CSW_SCOUT
#define CSI_HEGRENADE CSW_HEGRENADE
#define CSI_XM1014 CSW_XM1014
#define CSI_C4 CSW_C4
#define CSI_MAC10 CSW_MAC10
#define CSI_AUG CSW_AUG
#define CSI_SMOKEGRENADE CSW_SMOKEGRENADE
#define CSI_ELITE CSW_ELITE
#define CSI_FIVESEVEN CSW_FIVESEVEN
#define CSI_UMP45 CSW_UMP45
#define CSI_SG550 CSW_SG550
#define CSI_GALIL CSW_GALIL
#define CSI_FAMAS CSW_FAMAS
#define CSI_USP CSW_USP
#define CSI_GLOCK18 CSW_GLOCK18
#define CSI_AWP CSW_AWP
#define CSI_MP5NAVY CSW_MP5NAVY
#define CSI_M249 CSW_M249
#define CSI_M3 CSW_M3
#define CSI_M4A1 CSW_M4A1
#define CSI_TMP CSW_TMP
#define CSI_G3SG1 CSW_G3SG1
#define CSI_FLASHBANG CSW_FLASHBANG
#define CSI_DEAGLE CSW_DEAGLE
#define CSI_SG552 CSW_SG552
#define CSI_AK47 CSW_AK47
#define CSI_P90 CSW_P90
#define CSI_SHIELDGUN CSW_SHIELDGUN 
and only add theese to amxmodx core?

PHP Code:
#define CSI_VEST CSW_VEST // Custom
#define CSI_VESTHELM CSW_VESTHELM // Custom
#define CSI_DEFUSER 33 // Custom
#define CSI_NVGS 34 // Custom
#define CSI_PRIAMMO 36 // Custom
#define CSI_SECAMMO 37 // Custom 
Soo we can use CS_OnBuy(id,iItem); with directly a couple of CSW_ definitions

??
</div></div>
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 06-11-2014 at 14:54.
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-11-2014 , 15:00   Re: cstrike.inc - new CSI_ Items
Reply With Quote #2

Mixing constants doesn't make sense and is not consistent. It's confusing and doesn't look proper. Better to make a whole set and making alias.
__________________

Last edited by Arkshine; 06-11-2014 at 15:00.
Arkshine is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-11-2014 , 15:10   Re: cstrike.inc - new CSI_ Items
Reply With Quote #3

I think i explained wrong, because is not only add lacking constants to amxconst and remove oter csi_* items?
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-11-2014 , 15:14   Re: cstrike.inc - new CSI_ Items
Reply With Quote #4

Don't understand. Explain better or read again what I said.
__________________
Arkshine is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-11-2014 , 15:17   Re: cstrike.inc - new CSI_ Items
Reply With Quote #5

What const is not in amxconst from cl_buy from connor?
we not need only to add the constants that are missing in amxconst, after do this, using directly in the CS_OnBuy ?
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-11-2014 , 15:46   Re: cstrike.inc - new CSI_ Items
Reply With Quote #6

Look, I have no idea what you're saying. Try to ask someone who can speak english better.
I feel like i've already answered. Meaning there is a point to make things as it is. Mixing CSW and CSI doesn't make sense. CSW_ is supposed to be weapon id only (It was bad idea the one who include vest/vesthelm). For consistency, considering forward is for all items and it needs to add new constants, it makes more sense a whole CSI_ constants list which is meant to be used only with the forward.
__________________
Arkshine is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-11-2014 , 16:54   Re: cstrike.inc - new CSI_ Items
Reply With Quote #7

Quote:
Originally Posted by Arkshine View Post
Look, I have no idea what you're saying. Try to ask someone who can speak english better.
I feel like i've already answered. Meaning there is a point to make things as it is. Mixing CSW and CSI doesn't make sense. CSW_ is supposed to be weapon id only (It was bad idea the one who include vest/vesthelm). For consistency, considering forward is for all items and it needs to add new constants, it makes more sense a whole CSI_ constants list which is meant to be used only with the forward.
Is not mix CSI with CSW constatns, but simple use directly CSW in forward, and add a CSW constants, i not looked to amx core
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-11-2014 , 17:01   Re: cstrike.inc - new CSI_ Items
Reply With Quote #8

My answer is still the same:

Quote:
CSW_ is supposed to be weapon id only (It was bad idea the one who include vest/vesthelm as custom value but too late to change). For consistency, considering forward is for all items and it needs to add new constants, it makes more sense to create CSI_ constants list which is meant to be used only with the forward.
Readability, consistency.
__________________

Last edited by Arkshine; 06-11-2014 at 17:03.
Arkshine is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 06-11-2014 , 17:41   Re: cstrike.inc - new CSI_ Items
Reply With Quote #9

Quote:
Originally Posted by ^SmileY View Post
Is not mix CSI with CSW constatns, but simple use directly CSW in forward, and add a CSW constants, i not looked to amx core
I don't really get where your issue is.

CSW_ constants are the real constants that the engine uses internally. The new CSI_ constants are our own AMXX invention specifically for CS_OnBuy and they don't inherently correspond to the CSW_ constants. Defuse kit, nightvision goggles, primary ammo and secondary ammo are no real weapons in the engine and therefore should not have CSW_ constants. All other natives clearly state that the CSW_ constants should be used and we can't define CSW_DEFUSER and the like if they don't exist.

Yes you can use CSW_ and CSI_ interchangably for the basic weapons but there is still a reason why we have both. You should use CSI_ within CS_OnBuy to keep your code consistent and readable.
__________________
In Flames we trust!
Nextra is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-11-2014 , 21:56   Re: cstrike.inc - new CSI_ Items
Reply With Quote #10

Thanks for explaining, i thought they were the same
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
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:01.


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