Raised This Month: $51 Target: $400
 12% 

Repeat function, through verification


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
unrealgame
New Member
Join Date: Dec 2016
Old 08-25-2019 , 09:04   Repeat function, through verification
Reply With Quote #1

Hi, not how can not understand how to do.
what I need


Thank you in advance
unrealgame is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 08-25-2019 , 10:26   Re: Repeat function, through verification
Reply With Quote #2

Hi

PHP Code:
#include <engine>


#define    FL_ONGROUND    (1<<9)


if(get_entity_flags(id) & FL_ONGROUND)
{
    
//client is ON ground
}
else
{
    
//client is NOT on ground


Last edited by LearninG; 08-25-2019 at 10:36.
LearninG is offline
unrealgame
New Member
Join Date: Dec 2016
Old 08-25-2019 , 13:26   Re: Repeat function, through verification
Reply With Quote #3

Quote:
Originally Posted by LearninG View Post
Hi

Spoiler
poorly explained, it is necessary to replace the account function, with whether the player was on the ground before touching the head, simply if you simply remove the timer, the function will loop.
unrealgame is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 08-25-2019 , 14:34   Re: Repeat function, through verification
Reply With Quote #4

Quote:
Originally Posted by unrealgame View Post
poorly explained, it is necessary to replace the account function, with whether the player was on the ground before touching the head, simply if you simply remove the timer, the function will loop.
I don't understand what you mean !
LearninG is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-25-2019 , 14:35   Re: Repeat function, through verification
Reply With Quote #5

PHP Code:

#include <amxmodx>
#include <engine>
#include <cstrike>

#define PLUGIN "-"
#define VERSION "1.0"
#define AUTHOR "-"

#pragma semicolon 1

new Floatg_flLastHeadTouch[33], g_pDelayg_pDamage;

new const 
g_pHeadTouch0[] = "misc/risamalo.wav";


public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
g_pDelay register_cvar("headtouch_delay""1.0");
    
g_pDamage register_cvar("headtouch_damage""0.0");
    
register_touch("player""*""PlayerTouches");
}

public 
PlayerTouches(iToucheriTouched)
{
        static 
pLastTouch[33] = {0, ...};
        
        if(!
is_user_alive(entity_get_edict(iToucherEV_ENT_groundentity))) { pLastTouch[iToucher] = iTouched; return; }

        if(
entity_get_edict(iToucherEV_ENT_groundentity) == iTouched ) {
                static 
FloatflGametime;
                
flGametime get_gametime();
        
                if( !(
<= pLastTouch[iToucher] <= 32)) {
                
// your code for touching player head when last stand was on ground(worldspawn,  brush entity, other non player entitys) 
                
}

                if(
flGametime g_flLastHeadTouch[iToucher] && cs_get_user_team(iToucher) == CS_TEAM_T && cs_get_user_team(iTouched) == CS_TEAM_CT) {
                   new 
szAttackerName[64],
                     
szTouchedName[64];
            
                   
get_user_name(iToucherszAttackerNamecharsmax(szAttackerName));
                   
get_user_name(iTouchedszTouchedNamecharsmax(szTouchedName));
                   
fakedamage(iTouchedszAttackerNameget_pcvar_float(g_pDamage), DMG_CRUSH);
            
                   
set_hudmessage(25585255, -1.00.2006.012.0);
                   
show_hudmessage(0"[TEST] %s hahaha %s !"szAttackerNameszTouchedName);
            
                   
g_flLastHeadTouch[iToucher] = flGametime get_pcvar_float(g_pDelay);
            
                   
emit_sound(0CHAN_STREAMg_pHeadTouch00.7ATTN_NORM0PITCH_NORM);
                   
client_cmd(0"spk %s"g_pHeadTouch0); 
            
                }
                
pLastTouch[iToucher] = iTouched
        }

PS : IF YOUR ENGLISH IS SO BAD WHY DON'T You ASK FOR SUPPORT ON RUSSIAN FORUMS.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 08-25-2019 at 14:50.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 11:54.


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