Advertisement
Guest User

MikeJS

a guest
Jun 6th, 2009
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. #pragma semicolon 1
  2. #include <sourcemod>
  3. #include <sdktools>
  4. #include <dukehacks>
  5. public ResultType:dhOnEntitySpawned(edict) {
  6.     new String:classname[32];
  7.     GetEdictClassname(edict, classname, sizeof(classname));
  8.     if(StrEqual(classname, "tf_projectile_rocket"))
  9.         CreateTimer(0.1, CheckSpeed, edict);
  10.     return;
  11. }
  12. public Action:CheckSpeed(Handle:timer, any:edict) {
  13.     if(IsValidEntity(edict)) {
  14.         decl Float:vecVelocity[3];
  15.         GetEntPropVector(edict, Prop_Data, "m_vecVelocity", vecVelocity);
  16.         new Float:speed = GetVectorLength(vecVelocity);
  17.         PrintToChatAll("\x04%.2f\x01ups", speed);
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement