You need to replace "headtouch_delay" with a check to see if "iToucher stood on the ground before touching iTouched", in which case the function is executed
Sorry for bad english
The same text only in Russian
Нужно заменить "headtouch_delay", на проверку, "стоял ли iToucher на земле прежде чем трогать iTouched", в таком случае функция выполняется
if(get_entity_flags(id) & FL_ONGROUND) { //client is ON ground } else { //client is NOT on ground }
unrealgame
08-25-2019 13:26
Re: Repeat function, through verification
Quote:
Originally Posted by LearninG
(Post 2664667)
Hi
Spoiler
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
}
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.
LearninG
08-25-2019 14:34
Re: Repeat function, through verification
Quote:
Originally Posted by unrealgame
(Post 2664694)
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.
if( !(1 <= pLastTouch[iToucher] <= 32)) { // your code for touching player head when last stand was on ground(worldspawn, brush entity, other non player entitys) }