AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Make RegisterHam plugins had a zbot support (https://forums.alliedmods.net/showthread.php?t=339944)

Somie1998 10-10-2022 23:41

Make RegisterHam plugins had a zbot support
 
2 Attachment(s)
i had a 2 plugins i want to make them had a zbot support what should i choose. client_connect(id) & client_putinserver(id)

https://forums.alliedmods.net/showpo...07&postcount=4

https://forums.alliedmods.net/showpo...0&postcount=10

Celena Luna 10-11-2022 03:27

Re: Make RegisterHam plugins had a zbot support
 
I think client_connect should be enough
Use RegisterHamFromEntity with that id of player that both joined

Not sure if you need to DisableHamForward when the bot left though

Somie1998 10-12-2022 01:50

Re: Make RegisterHam plugins had a zbot support
 
Quote:

Originally Posted by Celena Luna (Post 2790776)
I think client_connect should be enough
Use RegisterHamFromEntity with that id of player that both joined

Not sure if you need to DisableHamForward when the bot left though

Okay and talk about "DisableHamForward" should do i needed of not ???

Celena Luna 10-12-2022 03:21

Re: Make RegisterHam plugins had a zbot support
 
Quote:

Originally Posted by Somie1998 (Post 2790826)
Okay and talk about "DisableHamForward" should do i needed of not ???

nah, I just check, you don't actually need to disable it

PHP Code:

    if (!is_user_zbot(id) || get_pcvar_num(bot_quota) <= 0
        return
    
    
// Reg Ham Zbot
    
RegisterHamFromEntity(Ham_Spawnid"HamF_Spawn_Player")
    
RegisterHamFromEntity(Ham_Spawnid"HamF_Spawn_Player_Post"1)
    
RegisterHamFromEntity(Ham_TraceAttackid"HamF_TraceAttack")
    
RegisterHamFromEntity(Ham_TakeDamageid"HamF_TakeDamage")
    
RegisterHamFromEntity(Ham_TakeDamageid"HamF_TakeDamage_Post"1)
    
RegisterHamFromEntity(Ham_Killedid"HamF_Killed")
    
RegisterHamFromEntity(Ham_Killedid"HamF_Killed_Post"1)
    
//if (is_user_alive(id)) fw_PlayerSpawn_Post(id) 



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

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