FlacoBey

Untitled

Dec 30th, 2018
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 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 ui =  GetClientOfUserId(event.GetInt("upgradeid"));
  12.     float origin[3];
  13.     GetClientAbsOrigin(i,origin);
  14.     origin[2] += 4;
  15.     new pack = CreateEntityByName("weapon_ammo_spawn")
  16.     DispatchSpawn(pack);
  17.     DispatchKeyValueVector(pack, "origin", origin);
  18.     AcceptEntityInput(ui, "kill")
  19. }
Advertisement
Add Comment
Please, Sign In to add comment