Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include sdktools
- public OnPluginStart()
- {
- HookEvent("upgrade_pack_used", EventP, EventHookMode_Pre);
- }
- public Action EventP(Event event, const char[] name, bool dontBroadcast)
- {
- int i = GetClientOfUserId(event.GetInt("userid"));
- int entity_id = GetEventInt(event, "upgradeid");
- float origin[3];
- GetClientAbsOrigin(i,origin);
- new pack = CreateEntityByName("weapon_ammo_spawn")
- DispatchSpawn(pack);
- DispatchKeyValueVector(pack, "origin", origin);
- AcceptEntityInput(entity_id, "kill")
- }
Advertisement
Add Comment
Please, Sign In to add comment