FlacoBey

Untitled

Jan 6th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. #include sdktools
  2.  
  3. #define m_g "models/props_junk/gascan001a.mdl"
  4.  
  5. public OnPluginStart()
  6. {
  7.     RegConsoleCmd("sm_g", gascan);
  8. }
  9.  
  10. public Action:gascan(i, args)
  11. {
  12.     CreateGascan(i);
  13. }
  14.  
  15. public CreateGascan(client)
  16. {
  17.     new entity = CreateEntityByName("prop_physics");
  18.     decl Float:f_or[3], Float:f_ang[3];
  19.     GetClientAbsOrigin(client, f_or);
  20.     GetClientAbsAngles(client, f_ang);
  21.     f_or[2] += 63;
  22.     f_or[0] -= 15;
  23.     TeleportEntity(entity, f_or, f_ang, NULL_VECTOR);
  24.     ActivateEntity(entity);
  25.     SetEntityModel(entity, m_g)
  26.     SetVariantString("!activator");
  27.     AcceptEntityInput(entity, "SetParent", client);
  28.  
  29.     SetVariantString("medkit");
  30.     AcceptEntityInput(entity, "SetParentAttachment", entity);
  31.     AcceptEntityInput(entity, "TurnOn");   
  32. }
Advertisement
Add Comment
Please, Sign In to add comment