View Single Post
Porcellian
Member
Join Date: Oct 2017
Old 09-04-2018 , 17:19   Re: Make weapons not dropable
Reply With Quote #4

I got it working, but two problems.

First, I want the weapon to be dropped on death. But not if pressing to drop it, with e.g "g".

Also, it's strange but the gun started acting weird after I tried my script.

Quote:
#include <sdkhooks>
#include <sourcemod>

public OnPluginStart()
{
for (new i= 1; i<= MaxClients; i++)
{
if (IsClientInGame(i))
{
SDKHook(i, SDKHook_WeaponDrop, OnWeaponDrop);
}
}
}

public OnClientPutInServer(client)
{
SDKHook(client, SDKHook_WeaponDrop, OnWeaponDrop);
}

public Action OnWeaponDrop(int client, int weapon)
{
return Plugin_Stop;
}

Last edited by Porcellian; 09-04-2018 at 17:40.
Porcellian is offline