Stop players from buying but not from picking.
I want to know what to do that this code would be only that players who don't have ADMIN_LEVEL_H coudn't buy awp, sg550, g3sg1. But they could pick it up if someone drop it.
PHP Code:
|
Re: Stop players from buying but not from picking.
I have a better/cleaner idea in mind, I'll redo it when I get a chance. The annoying thing with my current method is the player drops his current weapon when he attempts to buy a restricted weapon and the restricted weapon gets dropped/deleted and the player gets his money back. It would be cleaner if these things were not visible to they player.
PHP Code:
|
Re: Stop players from buying but not from picking.
When you remove a weaponbox at spawn it's too early so weapons are not removed as well.
I think this way is cleaner : http://forums.alliedmods.net/showthread.php?t=149380 And anyway, i think such plugins already exist. Edit : Best way is "info_map_parameters" way !!! Simple and efficient : PHP Code:
|
Re: Stop players from buying but not from picking.
Ok. I don't understand your codes at all. Can you explaine me this?
PHP Code:
|
Re: Stop players from buying but not from picking.
Bacause client_buy is a forward.
It's used like this: PHP Code:
|
Re: Stop players from buying but not from picking.
Connor, this is the second time I forgot about your client_buy() forward and wasted time doing something another less desirable way. This is not the other method I had in mind, I was thinking what you did here which also worked cleanly but the method below is obviously much easier\appropriate.
The below plugin requires that you install ConnorMcLeods client_buy forward: 1. Download cl_buy.inc, put in include folder 2. Download and compile client_buy.sma. Place in plugins folder. 3. Add to plugins.ini client_buy.amxx If you want it to display the weapon name when a buy attempt is made just let me know or you may be able to figure it out. PHP Code:
|
Re: Stop players from buying but not from picking.
Why this doesn't work? Still normal player can buy sg550. I want it to stop them from buying.
PHP Code:
|
Re: Stop players from buying but not from picking.
I wrote two plugins for you, why are you still trying to use your code which is wrong and doesn't work? Use the plugin in my above post.
|
Re: Stop players from buying but not from picking.
I'll test it.
EDIT: Doesn't work. Why do you need this? const ADMIN_FLAG = ADMIN_LEVEL_H; |
Re: Stop players from buying but not from picking.
If a player has that flag he can buy those rifles...like you asked for.
|
| All times are GMT -4. The time now is 14:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.