Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. bool IS_SPEED_HACK(LPCHARACTER ch, LPCHARACTER victim, DWORD current_time)
  2. {
  3. if (ch->m_kAttackLog.dwVID == victim->GetVID())
  4. {
  5. if (current_time - ch->m_kAttackLog.dwTime < GET_ATTACK_SPEED(ch))
  6. {
  7. INCREASE_SPEED_HACK_COUNT(ch);
  8. SET_ATTACK_TIME(ch, victim, current_time);
  9. SET_ATTACKED_TIME(ch, victim, current_time);
  10. return true;
  11. }
  12. }
  13.  
  14. SET_ATTACK_TIME(ch, victim, current_time);
  15.  
  16. if (victim->m_AttackedLog.dwPID == ch->GetPlayerID())
  17. {
  18. if (current_time - victim->m_AttackedLog.dwAttackedTime < GET_ATTACK_SPEED(ch))
  19. {
  20. INCREASE_SPEED_HACK_COUNT(ch);
  21. SET_ATTACKED_TIME(ch, victim, current_time);
  22. return true;
  23. }
  24. }
  25.  
  26. SET_ATTACKED_TIME(ch, victim, current_time);
  27. return false;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement