NS health and ammo drop
im trying to create a plugin that will drop health and ammo and take away the appropriate amount of res from the marine team. Im new at this, first plugin. Heres what i have so far:
Code:
it drops the meds but not the ammo. questions 1: why dosent the ammo work when its identical to the med? 2: how would i get the current res amount for the marine team, then change it to a new value? i tried ns_give_item in place of five item and in game nothing happens for either meds or ammo. there is no errors in either case. also if there is already one that does something like this let me know, may not need to build my own. Thanks |
1. No idea why the ammo doesn't work
2. Use ns_get_res and ns_set_res, check the funcwiki for more information 3. You can just use give_item(id,"item_*") instead of making a variable for it. |
new item[33]
Could it be the 33? maybe try 256? |
Maybe except array with 33 try
Code:
|
Code:
so i did Code:
Code:
tried Code:
I found another plugin called admin_weapons_ns and in the sma file he used give_item(id,"item_genericammo") too but his plugin dosent drop ammo either. also for the res i tried Code:
Just had a thought, does the fun.inc know what item_genericammo is, for cs each ammo has a different name, think this could be the ammo problem? |
A) Pinkfairie: WTF, that has nothing whatsoever in the most related @#$% to do with it, you probably don't even know what the number is for, do you?
B) LynX: You can't assign an integer a string value. C) Rorthic: The Fun module doesn't have to "know" about item_genericammo to give it to a player. Perhaps item_genericammo is an old an unsupported entity within NS? |
if you type give item_genericammo into the console it gives you ammo. Also with logging on when you drop ammo it says item_genericammo.
|
ok so i got the ammo to work now, it was a simple change, im guessing when i tried it originally i compiled the wrong file, anyways this works for the ammo,
Code:
now all i need to know if how to change the marine team res. I dont want them to be free. |
| All times are GMT -4. The time now is 16:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.