Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma semicolon 1
- #include <sourcemod>
- #include <sdktools>
- #include <dukehacks>
- public ResultType:dhOnEntitySpawned(edict) {
- new String:classname[32];
- GetEdictClassname(edict, classname, sizeof(classname));
- if(StrEqual(classname, "tf_projectile_rocket"))
- CreateTimer(0.1, CheckSpeed, edict);
- return;
- }
- public Action:CheckSpeed(Handle:timer, any:edict) {
- if(IsValidEntity(edict)) {
- decl Float:vecVelocity[3];
- GetEntPropVector(edict, Prop_Data, "m_vecVelocity", vecVelocity);
- new Float:speed = GetVectorLength(vecVelocity);
- PrintToChatAll("\x04%.2f\x01ups", speed);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement