Raised This Month: $ Target: $400
 0% 

Weaponbox touch [NOT SOLVED]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hectorz0r
Senior Member
Join Date: Oct 2008
Old 05-30-2010 , 12:55   Weaponbox touch [NOT SOLVED]
Reply With Quote #1

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.
__________________


Last edited by hectorz0r; 05-30-2010 at 13:32.
hectorz0r is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 06-14-2010 , 12:17   Re: Weaponbox touch [NOT SOLVED]
Reply With Quote #2

bump
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-14-2010 , 12:34   Re: Weaponbox touch [NOT SOLVED]
Reply With Quote #3

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);

__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...

Last edited by Alucard^; 06-14-2010 at 12:37.
Alucard^ is offline
Send a message via Skype™ to Alucard^
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 05:26.


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