FlacoBey

Untitled

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