AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   Natural Selection Stock Functions (https://forums.alliedmods.net/showthread.php?t=853)

AssKicR 04-03-2004 22:16

Natural Selection Stock Functions
 
1 Attachment(s)
Code:

/********************************************************************************************************************************************\
** AssKicR's NShelpers - Created by AssKicR (Based on info from ns2amx by Mahnsawce)                                                        **
**                                                                                                                                          **
** Revision v1.0:                                                                                                                          **
** ---------------------------------------------------------------------------------------------------------------------------------------- **
**  Initial Release                                                                                                                        **
**                                                                                                                                          **
** Added commands:                                                                                                                          **
** ---------------------------------------------------------------------------------------------------------------------------------------- **
**    ns_getammo(id,Weapon)                                          Get the ammo of a weapon (Marines Only)                                **
**    ns_setammo(id,Weapon,Value)                                    Set the ammo of a weapon (Marines Only)                                **
**    ns_getres(id)                                                  Get resources of a player (Alien Only)                                **
**    ns_setres(id,value)                                            Set resources of a player (Alien Only)                                **
**    ns_getjpfuel(id)                                              Get the jetpack fuel of a player  (Marines Only)                      **
**    ns_setjpfuel(id,value)                                        Set the jetpack fuel of a player  (Marines Only)                      **
**    ns_getenergy                                                  Get energy of a player (Alien Only)                                    **
**    ns_setenergy                                                  Set energy of a player (Alien Only)                                    **
**    ns_getteam(id)                                                Get the team of a player                                              **
**    ns_getclass(id)                                                Get the Class of a player                                              **
**    ns_getmask(id,mask)                                            Get special mask.                                                      **
**    ns_setmask(id,mask,onoff)                                      Set special mask. (1=ON / 0=OFF)                                      **
**    ns_getbuild(svClassname[],iBuiltOnly,iNumber)                  Get number of structures.. (set iBuiltOnly greater than 0 to find just **
**                                                                  completed and set iNumber to find specific one)                        **
**    ns_popup(id,svMessage[])                                      Show a message to a person (Max 189 letters)                          **
**    ns_hasweapon(id,weapon,setweapon=-1)                          Check if a person has a specified weapon..                            **
**    ns_getxp(id)                                                  Get a players experience                                              **
**    ns_setxp(id,xp)                                                Set a players experience                                              **
**    ns_getlevel                                                    Returns a players level in combat 1-10                                **
**    ns_get_levels_spent(id)                                        Returns the number of levels spent in Combat 1-10                      **
**    ns_set_levels_spent(id)                                        Sets the number of levels spent in Combat 1-10                        **
**    is_combat()                                                    Returns 1 if the map is combat, 0 if it's not.                        **
**                                                                                                                                          **
** Commands for less typing :P (Basicly combos of above commands)                                                                          **
**    ns_gethives()                                                  ns_getbuild("team_hive",1,0) for the lazy guy :P                      **
**    ns_getcommander()                                              Returns the ID of the commander. If there is no commander it returns 0 **
**    is_digesting(id)                                              Returns 1 if player is digesting. 0 if not                            **
\********************************************************************************************************************************************/


BAILOPAN 04-03-2004 22:19

this is excellent... would you mind these being imported into the final NS module?

AssKicR 04-03-2004 22:20

Quote:

Originally Posted by BAILOPAN
this is excellent... would you mind these being imported into the final NS module?

That is the reason i posted them.. i want them to :D

QwertyAccess 04-04-2004 21:24

nice..

KoTeX 04-11-2004 14:02

where do i get natural selection and esf?

QwertyAccess 04-11-2004 14:41

www.natural-selection.org
esf? if you mean Earth's Special Forces i wouldnt know.

KoTeX 04-11-2004 14:57

umm which 1 do i download?

karlos 07-23-2004 15:42

ns_getres and ns_getres are not working
with ns_setres i get error 10 on line 204, with ns_getres i get error 10 on line 214
although my script only has 13 lines
Code:
#include <amxmodx> #include <engine> #include <nshelpers> public plugin_init(){       register_clcmd("giveres","give_res")     return PLUGIN_CONTINUE } public give_res(id){     client_print(0,print_chat,"%i",ns_getres(id))  // or ns_setres(id,70)     return PLUGIN_HANDLED }
the ns2amx modules own functions r working

AssKicR 07-31-2004 10:37

yes... ignore this thread.. use nsAMXX... ktnxbai

SnowSlasher 12-01-2004 14:35

gj man! is this included in the AMXX NS 0.20?


All times are GMT -4. The time now is 15:13.

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