Raised This Month: $51 Target: $400
 12% 

Showing results 1 to 10 of 10
Search took 0.00 seconds.
Search: Posts Made By: Greyscale
Forum: Scripting 09-16-2009, 20:21
Replies: 24
Views: 6,540
Posted By Greyscale
Re: RemovePlayerItem for specific grenade?

Just curious, what does your code look like?
Forum: Scripting 09-14-2009, 22:25
Replies: 24
Views: 6,540
Posted By Greyscale
Re: RemovePlayerItem for specific grenade?

/**
* Removes a player's item.
*
* @param client Client index.
* @param item CBaseCombatWeapon entity index.
* @return True on success, false otherwise.
* @error Invalid client...
Forum: Scripting 08-30-2009, 03:29
Replies: 24
Views: 6,540
Posted By Greyscale
Re: RemovePlayerItem for specific grenade?

Ah ok I thought I saw someone say that GetPlayerWeaponSlot(client, slot); would loop through the grenades. Guess not.


I thought 0.0 and 0.1 would be basically the same thing. But maybe 0.0...
Forum: Scripting 08-29-2009, 01:57
Replies: 24
Views: 6,540
Posted By Greyscale
Re: RemovePlayerItem for specific grenade?

I would suggest using StrEqual (look in strings.inc) over strcmp, because StrEqual is simpler to use, but no idea if it's faster.

Besides that it is fit for a full server. If you get the weapon...
Forum: Scripting 08-28-2009, 16:46
Replies: 24
Views: 6,540
Posted By Greyscale
Re: RemovePlayerItem for specific grenade?

Try waiting 1 frame before running your code.

You can do that with a timer, 0.0 delay.
Forum: Scripting 08-28-2009, 15:53
Replies: 24
Views: 6,540
Posted By Greyscale
Re: RemovePlayerItem for specific grenade?

My grenade pack plugin still works fine, that's the same way it sets grenades..

http://forums.alliedmods.net/showthread.php?t=65368&highlight=grenade+pack


Maybe try:

SetEntData(client,...
Forum: Scripting 08-28-2009, 13:48
Replies: 24
Views: 6,540
Posted By Greyscale
Re: RemovePlayerItem for specific grenade?

Instead of using g_iToolsAmmo (I need to check my own code for this problem)

Try this:

new offsAmmo = FindDataMapOffs(client, "m_iAmmo") + (type * 4);

That will be your new g_iToolsAmmo, so...
Forum: Scripting 08-28-2009, 01:00
Replies: 24
Views: 6,540
Posted By Greyscale
Re: RemovePlayerItem for specific grenade?

Hm the offsets and usage look right to me. Are you sure it's calling WeaponAmmoSetGrenadeCount?
Forum: Scripting 08-28-2009, 00:04
Replies: 24
Views: 6,540
Posted By Greyscale
Re: RemovePlayerItem for specific grenade?

Ah, I see.

I actually forgot to include g_iToolsAmmo in the example:

Declare it somewhere at the top of your source code (refered to as the global scope) like so:

new g_iToolsAmmo;

Then...
Forum: Scripting 08-27-2009, 22:50
Replies: 24
Views: 6,540
Posted By Greyscale
Re: RemovePlayerItem for specific grenade?

From Zombie:Reloaded

/**
* Grenade slots.
*/
enum WeaponAmmoGrenadeType
{
GrenadeType_Invalid = -1, /** Invalid grenade slot. */
GrenadeType_HEGrenade = 11, /**...
Showing results 1 to 10 of 10

 
Forum Jump

All times are GMT -4. The time now is 08:48.


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