Raised This Month: $32 Target: $400
 8% 

cheak last activity ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 10-20-2017 , 03:02   cheak last activity ?
Reply With Quote #1

Hi
im trying to cheake last activity of player.
it is true that i used this method.

PHP Code:
new g_old_v_angles[33]

public 
spawn(player) {
    
    new  
newangle[3
    
pev(playerpev_v_anglenewangle);
    
    if(
newangle[0] == g_old_v_angles[player])
    {
        
        
client_print(0print_chat"+++++++++++")
    }

But when the player is under attack, it will not work
How do I check the activity of the player exactly and ignore if the attack?
__________________

Last edited by abdobiskra; 10-20-2017 at 03:15.
abdobiskra is offline
Send a message via Skype™ to abdobiskra
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 10-20-2017 , 05:07   Re: cheak last activity ?
Reply With Quote #2

check origin?
KiLLeR. is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 10-20-2017 , 06:13   Re: cheak last activity ?
Reply With Quote #3

Quote:
Originally Posted by KiLLeR. View Post
check origin?
Suppose it is, but if it is damaged (mean high dmg he will moved), it will not work
Also what I want is only when the mouse moves.
__________________

Last edited by abdobiskra; 10-20-2017 at 06:17.
abdobiskra is offline
Send a message via Skype™ to abdobiskra
Natsheh
Veteran Member
Join Date: Sep 2012
Old 10-20-2017 , 06:18   Re: cheak last activity ?
Reply With Quote #4

Quote:
Originally Posted by abdobiskra View Post
Suppose it is, but if it is damaged (mean high dmg he will moved), it will not work
Also what I want is only when the mouse moves.
You mean damage knockback?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 10-20-2017 , 06:22   Re: cheak last activity ?
Reply With Quote #5

Quote:
Originally Posted by Natsheh View Post
You mean damage knockback?
Perhaps as well as possibly other damage such as a bomb or similar
I did not try it, but what I want exactly is :
Quote:
Originally Posted by abdobiska
Also what I want is only when the mouse moves.
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
Natsheh
Veteran Member
Join Date: Sep 2012
Old 10-20-2017 , 07:05   Re: cheak last activity ?
Reply With Quote #6

>> Hook TraceAttack
PHP Code:
RegisterHam(Ham_TraceAttack"player""fw_traceattack_post"1
>> In Forward(fw_traceattack_post) Function Check if its a explosive dmg or bullet as you want, also check whether the damage higher than 0.0 or not
>> set victim's velocity in the same direction of the damage with the force of impact.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 10-20-2017 at 07:05.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 10-20-2017 , 07:40   Re: cheak last activity ?
Reply With Quote #7

Natsheh
Yes, I had a somewhat similar idea, so I left it as the last solution
I thought there was a better way to solve that
PHP Code:
new g_zm_take_dmg[33]

public 
plugin_init() {
    
    
RegisterHam(Ham_TraceAttack,"player","fw_TakeDamage"1)
    
RegisterHam(Ham_TakeDamage,"player","fw_TakeDamage"1)
}
public 
fw_TakeDamage(victim){
    
    
g_zm_take_dmg[victim] = true
}

public 
spawn(player) {
    
    new  
newangle[3
    
pev(playerpev_v_anglenewangle);
    
    if (
g_zm_take_dmg[player]) { 
        
        
newangle[0] = g_old_v_angles[player]
    }
    if(
newangle[0] == g_old_v_angles[player])
    {
        
        
client_print(0print_chat"+++++++++++")
    }

__________________

Last edited by abdobiskra; 10-20-2017 at 07:41.
abdobiskra is offline
Send a message via Skype™ to abdobiskra
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode