FlacoBey

Untitled

Jan 3rd, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include sdktools
  2. public OnPluginStart()
  3. {
  4. HookEvent("upgrade_pack_used", EventP, EventHookMode_Pre);
  5. }
  6.  
  7. public Action EventP(Event event, const char[] name, bool dontBroadcast)
  8. {
  9. int i = GetClientOfUserId(event.GetInt("userid"));
  10. int entity_id = GetEventInt(event, "upgradeid");
  11. float origin[3];
  12. GetClientAbsOrigin(i,origin);
  13. new pack = CreateEntityByName("weapon_ammo_spawn")
  14. DispatchSpawn(pack);
  15. DispatchKeyValueVector(pack, "origin", origin);
  16. AcceptEntityInput(entity_id, "kill")
  17. }
Advertisement
Add Comment
Please, Sign In to add comment