Grenade Bonus
I tried to write a plugin, that gives 1 grenade to a player that makes a frag with a grenade.
Here is the code PHP Code:
Code:
//// groptimus.smanew const uid = get_user_index(killer); Any help would be appreciated, thank you. |
Re: Grenade Bonus
untested, but this should explain it a bit more..
PHP Code:
|
Re: Grenade Bonus
I added an is_user_connected() check to prevent an error if a player tosses a killing nade and he disconnects before the kill occurs. You will need to include cstrike module.
PHP Code:
|
Re: Grenade Bonus
Why you didn't use the original natives? If you use give_item then you must not check the backpack ammo.
PHP Code:
|
Re: Grenade Bonus
"killer" is not the userid, killer is the killer's name, read through event.
Thank you Leon. |
Re: Grenade Bonus
Quote:
Why not check all conditions with a single if()? PHP Code:
|
Re: Grenade Bonus
Thank you all, but what about the killer, hit's 2 targets, he will get 2 grenades ? Or HLDS limit's by default hegrenade to only 1 unit ?
|
Re: Grenade Bonus
Quote:
|
Re: Grenade Bonus
No, i just want to give them only 1 HE, no matter the number of kills. Thank you.
|
| All times are GMT -4. The time now is 03:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.