is_user_bot check problem
I made plugin that gives possibility to heal and armor by executing a command. I wanted to import this function to bot, but don't get any respond and health/armor doesn't change. The goal - heal if health lower then maxhealth variable (maxhealth = 100) and armor if it equals 0. How it can be solved?
Code:
|
Re: is_user_bot check problem
try: do a check if player is bot or not. if it is use engine and
PHP Code:
|
Re: is_user_bot check problem
Quote:
Code:
Code:
entity_set_int( iEnt, EV_FL_health, value ) |
Re: is_user_bot check problem
Quote:
PHP Code:
|
Re: is_user_bot check problem
Quote:
How it might look, yesterday I tried to create a check, if player is bot and then I called function, but it didn't work. How I can realise a trigger? Also I tried to use set_task on client_putinserver(), it didn't work too. |
Re: is_user_bot check problem
The worst way I can suggest is to use preThink.
Make something like random command execution. Code below will check if player is a bot. If it is a bot then generate random number from 1 to 100 and if number is in range of USAGE_CHANCE then execute your function PHP Code:
|
Re: is_user_bot check problem
Quote:
Not tested. PHP Code:
|
Re: is_user_bot check problem
Think can be rough especially when multiple plugins are using it. A task with CVAR to adjust the timing.
|
Re: is_user_bot check problem
Quote:
|
All times are GMT -4. The time now is 06:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.