Raised This Month: $51 Target: $400
 12% 

[Suggestions] AMXX 1.8.3


Post New Thread Reply   
 
Thread Tools Display Modes
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 02-08-2017 , 05:39   Re: [Suggestions] AMXX 1.8.3
Reply With Quote #61

Quote:
Originally Posted by Depresie View Post
If we are still on the suggestion topic, adding the constants for all these values into the main amxmodx would be nice, but until then anyone has a list with all of them? i'd like to add them to an inc for my server

PHP Code:
const m_flNextPrimaryAttack
const m_flNextSecondaryAttack
etc 
https://github.com/alliedmodders/amx....games/cstrike
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-08-2017 , 13:27   Re: [Suggestions] AMXX 1.8.3
Reply With Quote #62

Thanks a lot !
__________________
Depresie is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-17-2017 , 09:02   Re: [Suggestions] AMXX 1.8.3
Reply With Quote #63

The best suggestion ever made:

PHP Code:
bool:boolclamp(value)
    return 
bool:clamp(valuefalsetrue
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 03-17-2017 , 09:58   Re: [Suggestions] AMXX 1.8.3
Reply With Quote #64

Why not just use '!= 0' or '!!'?
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-17-2017 , 18:39   Re: [Suggestions] AMXX 1.8.3
Reply With Quote #65

Quote:
Originally Posted by PRoSToTeM@ View Post
Why not just use '!= 0' or '!!'?
That is not equivalent to the code he posted since negative values will become false. The equivalent would be "> 0". Either way, it's a bad function and I'm hoping he was being sarcastic.
__________________
fysiks is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-01-2017 , 21:04   Re: [Suggestions] AMXX 1.8.3
Reply With Quote #66

Something like this would be pretty useful:

PHP Code:
native math(const szString[], any:...)

new 
iNumber math("2+5*4-6")
//Result: 16

new iEight 8iFive 5
new iNumber math("sqrt(%i * %i - 24)"iEightiFive)
//Result: 4 
__________________

Last edited by OciXCrom; 04-01-2017 at 21:07.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-01-2017 , 21:46   Re: [Suggestions] AMXX 1.8.3
Reply With Quote #67

Quote:
Originally Posted by OciXCrom View Post
Something like this would be pretty useful:

PHP Code:
native math(const szString[], any:...)

new 
iNumber math("2+5*4-6")
//Result: 16

new iEight 8iFive 5
new iNumber math("sqrt(%i * %i - 24)"iEightiFive)
//Result: 4 
Why? The examples you have given show that your math() function is completely redundant.
__________________

Last edited by fysiks; 04-01-2017 at 21:47.
fysiks is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 04-01-2017 , 22:05   Re: [Suggestions] AMXX 1.8.3
Reply With Quote #68

Quote:
Originally Posted by OciXCrom View Post
Something like this would be pretty useful:

PHP Code:
native math(const szString[], any:...)

new 
iNumber math("2+5*4-6")
//Result: 16

new iEight 8iFive 5
new iNumber math("sqrt(%i * %i - 24)"iEightiFive)
//Result: 4 
Same as 'new iNumber = 2+5*4-6;'

Also is static numbers lol.,


MY suggestion is do a forward like a CS_OnBuy, but for teams Like CS_OnTeamPick or something else. To prevent some players join in a team, or block a model pick
I hope that will help a lot of plugins here.
__________________
Projects:

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

Last edited by ^SmileY; 04-01-2017 at 22:08.
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-02-2017 , 02:25   Re: [Suggestions] AMXX 1.8.3
Reply With Quote #69

Quote:
MY suggestion is do a forward like a CS_OnBuy, but for teams Like CS_OnTeamPick or something else. To prevent some players join in a team, or block a model pick
We don't need lazy forwards for everything. We already have the tools to properly deal with this two cases.
__________________
HamletEagle is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-02-2017 , 10:54   Re: [Suggestions] AMXX 1.8.3
Reply With Quote #70

Quote:
Originally Posted by fysiks View Post
Why? The examples you have given show that your math() function is completely redundant.
The example was to show how it works, not where it's used. It's useful if you use bitsums inside .ini files or cvars, so instead of manually calculating the numbers, you can simply use '+'. There are probably more usages for this that I can't think of right now. Also adding/substracting X value or X% to/from a number, for example when you want to control the weapon damage from an .ini file.

PHP Code:
math.incnative math_num(const iNum, const szMath[], ...)
WeaponDamage.iniKNIFE_DAMAGE = *2

new iDamage 100
new iNewDamage math_num(iDamageKNIFE_DAMAGE)

// Result: 200 (double damage)

WeaponDamage.iniKNIFE_DAMAGE = -20

// Result: 80

WeaponDamage.iniKNIFE_DAMAGE = +15%

// Result: 115 (15% more damage) 
__________________

Last edited by OciXCrom; 04-02-2017 at 10:54.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 13:40.


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