Raised This Month: $32 Target: $400
 8% 

!fix plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LESTRO
Member
Join Date: Jul 2017
Old 09-02-2017 , 15:04   !fix plugin
Reply With Quote #1

Hello! I need a plugin, when you write !fix,the knife will appear again because I have a bug that the knife disappears from time to time. I want, when it disappears you can write it !fix and it will appear again. If you make this plugin, i will be very happy. Thank You!
LESTRO is offline
fiction
Member
Join Date: May 2017
Old 09-02-2017 , 16:39   Re: !fix plugin
Reply With Quote #2

Quote:
Originally Posted by LESTRO View Post
Hello! I need a plugin, when you write !fix,the knife will appear again because I have a bug that the knife disappears from time to time. I want, when it disappears you can write it !fix and it will appear again. If you make this plugin, i will be very happy. Thank You!
Does it happen when someone joins the spectator team? Is it that the viewmodel is disappearing or the weapon itself?
fiction is offline
OcC
Senior Member
Join Date: Mar 2012
Location: Romania
Old 09-02-2017 , 17:20   Re: !fix plugin
Reply With Quote #3

try this, maybe it helps
https://forums.alliedmods.net/showthread.php?p=2374792
__________________
OcC is offline
Send a message via Yahoo to OcC
LESTRO
Member
Join Date: Jul 2017
Old 09-02-2017 , 17:51   Re: !fix plugin
Reply With Quote #4

@fiction no, only the knife disappears, the other weapons can be seen. I want when you write !fix , you can see the knife again. It's not the spectator problem.
LESTRO is offline
fiction
Member
Join Date: May 2017
Old 09-02-2017 , 21:45   Re: !fix plugin
Reply With Quote #5

Quote:
Originally Posted by LESTRO View Post
@fiction no, only the knife disappears, the other weapons can be seen. I want when you write !fix , you can see the knife again. It's not the spectator problem.
Like this?
PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <sdktools>
#include <cstrike>

public void OnPluginStart()
{
    
RegConsoleCmd("sm_fix"SM_Fix);
}

public 
Action SM_Fix(int clientint args)
{
    if(!
client || !IsClientInGame(client) || !IsPlayerAlive(client))
        return 
Plugin_Handled;

    
int iWeapon GetPlayerWeaponSlot(clientCS_SLOT_KNIFE);
    if(
iWeapon != -1)
    {
        
RemovePlayerItem(clientiWeapon);
        
RemoveEdict(iWeapon);
    }

    
GivePlayerItem(client"weapon_knife");
    return 
Plugin_Handled;


Last edited by fiction; 09-02-2017 at 21:45.
fiction is offline
LESTRO
Member
Join Date: Jul 2017
Old 09-03-2017 , 04:59   Re: !fix plugin
Reply With Quote #6

@fiction is for CSGO, right?
btw, i can't compile it. If you can compile it, i will be very happy. I see this plugin (!fix), on Bhop or Surf Servers, when you drop your knife and write !fix the knife appear again. On my server, the knife disappears and i want, when i write !fix, the knife appear again. Thank You.

Last edited by LESTRO; 09-03-2017 at 05:22.
LESTRO is offline
OcC
Senior Member
Join Date: Mar 2012
Location: Romania
Old 09-03-2017 , 08:02   Re: !fix plugin
Reply With Quote #7

works
Attached Files
File Type: smx fix.smx (4.0 KB, 92 views)
__________________
OcC is offline
Send a message via Yahoo to OcC
LESTRO
Member
Join Date: Jul 2017
Old 09-03-2017 , 08:38   Re: !fix plugin
Reply With Quote #8

Is working, Thank You @Occ.
LESTRO is offline
nhnkl159
Senior Member
Join Date: Jul 2012
Location: Israel 3>
Old 09-03-2017 , 08:52   Re: !fix plugin
Reply With Quote #9

Quote:
Originally Posted by OcC View Post
works
You have to provide source code.
__________________
nhnkl159 is offline
Send a message via Skype™ to nhnkl159
OcC
Senior Member
Join Date: Mar 2012
Location: Romania
Old 09-03-2017 , 09:30   Re: !fix plugin
Reply With Quote #10

Just compiler
PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <sdktools>
#include <cstrike>

public void OnPluginStart()
{
    
RegConsoleCmd("sm_fix"SM_Fix);
}

public 
Action SM_Fix(int clientint args)
{
    if(!
client || !IsClientInGame(client) || !IsPlayerAlive(client))
        return 
Plugin_Handled;

    
int iWeapon GetPlayerWeaponSlot(clientCS_SLOT_KNIFE);
    if(
iWeapon != -1)
    {
        
RemovePlayerItem(clientiWeapon);
        
RemoveEdict(iWeapon);
    }

    
GivePlayerItem(client"weapon_knife");
    return 
Plugin_Handled;

__________________
OcC is offline
Send a message via Yahoo to OcC
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 23:55.


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