AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Start Weapon (https://forums.alliedmods.net/showthread.php?t=952)

Sanji 04-07-2004 22:19

Start Weapon
 
1 Attachment(s)
well this is a simple but funny plugin. it allows you to give every player on spawn (round start) weapons.

install:
make a file named ammo.ini in addons/amxx/ with this content:

Code:

;weapon number            amount
"9"                        "200" ;gives players 200 smokegrenades
"26"                      "200" ;gives players a deagle with 200 bpammo

thats it :)
for more weapon numbers and its ammo look in amxconst.inc

update:
changed strtonum to str_to_num

DoubleTap 04-07-2004 22:50

Doesn't arena already do this ?

http://www.tcwonline.org/~amxmodx/fo...opic.php?t=456

Not dissing you but they don't want repetitive plugins to make it easier for folks to find what they need...

Vic/DT

This gives them a weapon first round, then nothing else ? It is different but can't you also just give them enough money to buy what they want ?

Sanji 04-08-2004 05:26

no, its no the same. well weapon arena gives only weapons with maximum amount of baclpack ammo what cs allows.

with my plugin you can give it with unlimied ammo (example: 200 hegrenades)

rex 04-10-2004 00:56

nice pugin Sanji.
how ever you need to change
Code:
ammo_type[num] = strtonum(szType) ammo_amount[num] = strtonum(szAmount)
to
Code:
ammo_type[num] = str_to_num(szType) ammo_amount[num] = str_to_num(szAmount)
or it will not compile on amx mod x
and as this is a amx x forum, shouldn't you take out all the amx code, if you want it to be approved. 8)

also when the first round starts, cs crashes to the desktop with this error.
Code:
Ed_alloc: no free edicts
making the plugin unuseable :(
It would also be nice if you could make the player drop he's default weapon and then give he the new one. :)
looking forward to an update.

Sanji 04-10-2004 04:41

hmm it works fine on my dedicated servers (czero,cstrike)

do you using it with a listen server?

i need more informations like os (win,linux) and so on

ok, strtonum chnaged to str_to_num :) (my misstake, i dont using amxx at the moment. the only one server with amxx is offline)

rex 04-10-2004 05:50

Sorry mate ment to put this in, yes i am running a listen server.
cs 1.5 amx x 0.16
on windows XP

Sanji 04-10-2004 07:36

i dont tested it with cs 1.5, only with 1.6. i dont have 1.5 :?

rex 04-10-2004 17:44

okay mate, looks like it might be a problem with 1.5 then, no worries.
thanks for your help.

Russell- 05-13-2004 08:09

How do i do this for hegrenades?

what are the numbers?

Thanks

rex 05-13-2004 09:08

did you read how to set this up????
look in amxconst.inc (addons\amxx\scripting\include)
and you will see this
Code:
/* Id of weapons in CS */ #define CSW_P228        1 #define CSW_SCOUT      3 #define CSW_HEGRENADE      4 #define CSW_XM1014    5 #define CSW_C4      6 #define CSW_MAC10      7 #define CSW_AUG   8 #define CSW_SMOKEGRENADE    9 #define CSW_ELITE      10 #define CSW_FIVESEVEN      11 #define CSW_UMP45      12 #define CSW_SG550      13 #define CSW_GALI        14 #define CSW_GALIL      14 #define CSW_FAMAS      15 #define CSW_USP   16 #define CSW_GLOCK18  17 #define CSW_AWP   18 #define CSW_MP5NAVY  19 #define CSW_M249        20 #define CSW_M3      21 #define CSW_M4A1        22 #define CSW_TMP   23 #define CSW_G3SG1      24 #define CSW_FLASHBANG      25 #define CSW_DEAGLE    26 #define CSW_SG552      27 #define CSW_AK47        28 #define CSW_KNIFE      29 #define CSW_P90   30
so hegrenades are number 4.
so your ammo.ini would have this line
Code:
"4"                        "x"
where x is the number of hegrenades you want to start with.


All times are GMT -4. The time now is 19:00.

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