AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   new func? (https://forums.alliedmods.net/showthread.php?t=29971)

k007 06-19-2006 16:55

new func?
 
what is Ammox used for? and #define AMMOX_name
is it amxmod?

Hawk552 06-19-2006 17:20

What?

AmmoX is an event in most HL mods.

Unless you mean ArrayX? ArrayX is a module that allows you to use dynamic memory, hashtables, and keytables. It's much better and faster than vault, SQL, or anything like that.

k007 06-19-2006 17:21

could explain more about the event?
and if define AMMOX_name wut does that do?

Hawk552 06-19-2006 17:24

Quote:

Originally Posted by k007
could explain more about the event?
and if define AMMOX_name wut does that do?

I could do this:

Code:
#define k007_licks_Hawk552s_balls

and it would make no difference. No defines make a difference if they're not used in the script somewhere.

#pragma is a different story, it's a direct instruction to the compiler on how to do something.

k007 06-19-2006 17:28

lets i used #define AMMOX_HEGRENADE 12
and in my event i used this
Code:
    if ( iAmmoType == AMMOX_HEGRENADE
does that mean if the user has a nade or what?

Hawk552 06-19-2006 17:29

Quote:

Originally Posted by k007
lets i used #define AMMOX_HEGRENADE 12
and in my event i used this
Code:
    if ( iAmmoType == AMMOX_HEGRENADE
does that mean if the user has a nade or what?

Probably.

k007 06-19-2006 17:31

would it make a diffrent if i added == true?

Hawk552 06-19-2006 17:32

Quote:

Originally Posted by k007
would it make a diffrent if i added == true?

Yes, because if iAmmoType > 0, it'll execute the code within the conditional statement.

k007 06-19-2006 17:34

so lets say if i have a funcbuy blah blah and i have a ammox_hegrenade[id] = ture in my buyfunc
then i wuoldn't need the == true in the event right?
and i have
Code:
if(iAmmoCount == 0) {

Hawk552 06-19-2006 17:36

what


All times are GMT -4. The time now is 08:03.

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