AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Weaponbox touch [NOT SOLVED] (https://forums.alliedmods.net/showthread.php?t=128262)

hectorz0r 05-30-2010 12:55

Weaponbox touch [NOT SOLVED]
 
I dont know if any1 else experienced this but on condition zero, if you set bots to play with knives only with bot_knives_only var (which do nothing but turn all other weapon vars like bot_allow_weaponname to 0) if you pick their glock when they die the server crash.

I've tried to remove the weaponbox entities cuz i'm not sure if it happens only with their glock, but takes a few mileseconds to remove it from the world and if you stand next to him and kill him you'll get his glock anyway...

Method:

PHP Code:

RegisterHam(Ham_Touch"weaponbox""touch_weaponbox"1

PHP Code:

public touch_weaponbox(ent)
    
dllfunc(DLLFunc_Thinkent

I've tried to forbid players to pickup the weapons too, and it's the same, if you stand next to them you'll get their weapon.

Method:

PHP Code:

RegisterHam(Ham_Touch"weaponbox""hook_player_touch"0

PHP Code:

public hook_player_touch(entplayer)
{
    if(
is_user_alive2[player] && is_user_zombie[player])
        return 
HAM_SUPERCEDE

    
return HAM_IGNORED


Dont pay attention on the player storages, it doesnt matter cause only bots have is_user_zombie set to true. Also, doesnt matter (in both exemples) if i set it to pre or post, it would just be the same if you stand next to him when he gets killed. I wonder if is there any solution to fix this issue besides remove all their weapons (since i want them to use knife only), but doing that they act stupid and camp alot cuz they dont recognize knife in WeaponPreference.

DruGzOG 06-14-2010 12:17

Re: Weaponbox touch [NOT SOLVED]
 
bump

Alucard^ 06-14-2010 12:34

Re: Weaponbox touch [NOT SOLVED]
 
In first method are something wrong:

Ham_Touch -> Ham_Spawn

Also, test with:

PHP Code:

public RemoveWeaponbox(ent)
{
    
entity_set_int(entEV_INT_flagsFL_KILLME);
    
call_think(ent);




All times are GMT -4. The time now is 05:26.

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