Monthly Target: $400 Donations: $282
 70% 

Start Weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   Johnny got his gun (102)
Sanji
Member
Join Date: Mar 2004
Old 04-07-2004 , 22:19   Start Weapon
Reply With Quote #1

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
Attached Files
File Type: sma Get Plugin or Get Source (sweapon.sma - 8224 views - 2.4 KB)
Sanji is offline
DoubleTap
Veteran Member
Join Date: Mar 2004
Location: Harker Heights, TX
Old 04-07-2004 , 22:50  
Reply With Quote #2

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 ?
__________________
DoubleTap is offline
Send a message via ICQ to DoubleTap
Sanji
Member
Join Date: Mar 2004
Old 04-08-2004 , 05:26  
Reply With Quote #3

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)
Sanji is offline
rex
Senior Member
Join Date: Mar 2004
Location: Australia
Old 04-10-2004 , 00:56  
Reply With Quote #4

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.

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.
rex is offline
Send a message via MSN to rex
Sanji
Member
Join Date: Mar 2004
Old 04-10-2004 , 04:41  
Reply With Quote #5

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)
Sanji is offline
rex
Senior Member
Join Date: Mar 2004
Location: Australia
Old 04-10-2004 , 05:50  
Reply With Quote #6

Sorry mate ment to put this in, yes i am running a listen server.
cs 1.5 amx x 0.16
on windows XP
rex is offline
Send a message via MSN to rex
Sanji
Member
Join Date: Mar 2004
Old 04-10-2004 , 07:36  
Reply With Quote #7

i dont tested it with cs 1.5, only with 1.6. i dont have 1.5
Sanji is offline
rex
Senior Member
Join Date: Mar 2004
Location: Australia
Old 04-10-2004 , 17:44  
Reply With Quote #8

okay mate, looks like it might be a problem with 1.5 then, no worries.
thanks for your help.
rex is offline
Send a message via MSN to rex
Russell-
New Member
Join Date: Apr 2004
Old 05-13-2004 , 08:09  
Reply With Quote #9

How do i do this for hegrenades?

what are the numbers?

Thanks
Russell- is offline
rex
Senior Member
Join Date: Mar 2004
Location: Australia
Old 05-13-2004 , 09:08  
Reply With Quote #10

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.
rex is offline
Send a message via MSN to rex
Reply


Thread Tools
Display Modes

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 16:58.


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