Raised This Month: $2 Target: $400
 0% 

weapon_shield bug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jugule
Member
Join Date: Apr 2020
Old 06-07-2020 , 09:40   weapon_shield bug
Reply With Quote #1

If someone has a current round shield (shop / others), the other round still has the shield, if it does not die. If he dies, the shield is removed. How can I solve this?

Function: GivePlayerItem(client, "weapon_shield");

Last edited by jugule; 06-09-2020 at 09:04.
jugule is offline
jugule
Member
Join Date: Apr 2020
Old 06-09-2020 , 09:04   Re: weapon_shield bug
Reply With Quote #2

anyone?
jugule is offline
jugule
Member
Join Date: Apr 2020
Old 06-17-2020 , 08:30   Re: weapon_shield bug
Reply With Quote #3

anyone?
jugule is offline
PC Gamer
Senior Member
Join Date: Mar 2014
Old 06-17-2020 , 11:53   Re: weapon_shield bug
Reply With Quote #4

It would be helpful if you posted:

1. The name of the game you are referring to.
2. The sp file of your code.
3. An explanation of what your code is supposed to be doing.
4. An explanation of what your code is actually doing (the problem).
5. The errors you received from your code, if any.
6. The steps you took to recreate the problem.

If this isn't your code then you should be posting in the plugin thread where you received the code.
PC Gamer is offline
Kellan123
AlliedModders Donor
Join Date: Aug 2012
Old 06-17-2020 , 12:57   Re: weapon_shield bug
Reply With Quote #5

#backwards =>

PHP Code:
stock RemovePlayerShield(client)
{
    new 
iWeapon GetPlayerWeaponSlot(client11);
    
    if(
iWeapon != -1)
    {
        if(
IsValidEdict(iWeapon) && IsValidEntity(iWeapon))
        {
            new 
String:sClassname[128];
            
GetEntityClassname(iWeaponsClassnamesizeof(sClassname));
            
            if(
StrEqual("weapon_shield"sClassname))
            {
                
RemovePlayerItem(clientiWeapon);
                
AcceptEntityInput(iWeapon"kill");
            }
        }
    }

Kellan123 is offline
jugule
Member
Join Date: Apr 2020
Old 06-18-2020 , 10:53   Re: weapon_shield bug
Reply With Quote #6

Quote:
Originally Posted by Kellan123 View Post
#backwards =>

PHP Code:
stock RemovePlayerShield(client)
{
    new 
iWeapon GetPlayerWeaponSlot(client11);
    
    if(
iWeapon != -1)
    {
        if(
IsValidEdict(iWeapon) && IsValidEntity(iWeapon))
        {
            new 
String:sClassname[128];
            
GetEntityClassname(iWeaponsClassnamesizeof(sClassname));
            
            if(
StrEqual("weapon_shield"sClassname))
            {
                
RemovePlayerItem(clientiWeapon);
                
AcceptEntityInput(iWeapon"kill");
            }
        }
    }

Thanks!! <3
jugule is offline
Reply


Thread Tools
Display Modes

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


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