WeapPickup event crashes server
here's litte bit of code:
Code:
few seconds after freeze time expires, server crashes with ED:Alloc: no free edicts. i would be pleased if someone could help me :) |
On weapon collect you give a knife that action triggers WeapPickup event which hooked to the SetKnife function which strips weapons and give knife again. Your plugin is an infinite loop.
|
so, if i remove the "give_item(id,"weapon_knife")", the problems should stop? i'm confused, because if i do that, server still crashes. how exactly should i repair the code then?
|
This should work:
Code:
And set_task(0.1 ... means that we use 0.1 sec delay, because player still don't have a weapon (only event is triggered). |
thanks a lot!
|
| All times are GMT -4. The time now is 16:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.