-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathNMSL.sp
48 lines (36 loc) · 924 Bytes
/
NMSL.sp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include <sdkhooks>
#include <warmod>
public Plugin myinfo =
{
name = "NMSL",
author = "neko",
description = "caonima"
};
public void OnPluginStart()
{
}
public OnClientPutInServer(client)
{
SDKHook(client, SDKHook_WeaponDropPost, Event_WeaponDrop);
}
public Event_WeaponDrop(client, weapon)
{
if(InWarmup())
CreateTimer(0.1, removeWeapon, EntIndexToEntRef(weapon), TIMER_FLAG_NO_MAPCHANGE);
}
public Action:removeWeapon(Handle:hTimer, any:iWeaponRef)
{
static weapon;
weapon = EntRefToEntIndex(iWeaponRef);
if(iWeaponRef == INVALID_ENT_REFERENCE || !IsValidEntity(weapon))
return ;
AcceptEntityInput(weapon, "kill");
}
public Action:CS_OnBuyCommand(int client, const char[] weapon)
{
if(InWarmup())
SetEntProp(client, Prop_Send, "m_iAccount", 16000);
}