Raised This Month: $ Target: $400
 0% 

WindowMaker problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
daneleo
Senior Member
Join Date: May 2011
Old 02-09-2015 , 14:25   WindowMaker problem
Reply With Quote #1

Ok so my plugin allows you to change how much metal you can have thus setting the windowmakers ammo but I found an issue on my bug tracker that someone had found the this breaks the gun allowing infinite ammo in game and not depleting the ammo this causes a lot of issues from what I can think of and I'm not entirely sure its something that could be fixed unless not allowing them the extra metal if they have the weapon active


Taken from my premium plugin
PHP Code:
Premium(client)
{

if( 
IsValidEntity(client)  && IsClientInGame(client) && IsPlayerAlive(client) )
    {
    new 
health GetClientHealth(client);
    new 
TFClassType:pClass TF2_GetPlayerClass(client);

    if(
cHPBoost 1)
    
SetEntityHealth(clienthealth cHPBoost);
    if(
cGravity != 1)
    
SetEntityGravity(clientcGravity);
    if(
cJarates 1)
    
SetGrenadeAmmo(clientcJarates581);
    if(
cStunballs 1)
    
SetGrenadeAmmo(clientcStunballs442);
    if(
pClass == TFClass_Medic)
    
SetEntPropFloat(GetPlayerWeaponSlot(client1), Prop_Send"m_flChargeLevel"cUber 0.01);
    if(
pClass != TFClass_Heavy && pClass != TFClass_Medic && pClass != TFClass_Pyro && pClass != TFClass_Sniper)
    
SetEntProp(GetPlayerWeaponSlot(client0), Prop_Send"m_iClip1"GetEntProp(GetPlayerWeaponSlot(client0), Prop_Send"m_iClip1") + cClip);
    if(
pClass == TFClass_Engineer)
    
SetEntData(clientFindDataMapOffs(client"m_iAmmo") + (4), cMetal4true); // this part here
    
if(cColor 0)
    
SetClientColor(clientcColor);
    if(
pClass == TFClass_Spy)
    
SetEntityRenderColor(client2552552550);
    
pSpeed[client] = GetEntPropFloat(clientProp_Send"m_flMaxspeed");
    
    if(
pFov[client] == 0)
    
pFov[client] = cDefaultFov;
    
    
SetEntData(clientoffsFOVpFov[client], 1);
    }


Last edited by daneleo; 02-09-2015 at 14:26.
daneleo is offline
Reply



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 12:11.


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