FlacoBey

Untitled

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