Quote:
Originally Posted by hustl4
Hello
Great plugin! Just having one issue. After using !takeknife command the knife does not seem to be saving for the next round. It does save when player stays alive, but if player dies...back to default knife. I am using the default cvars.
I have also tried setting the knifeswapper_spawndelay to 0.1, 0.3, 0.8, 1.0, 2.0, etc but having the same problem with knife not being saved. Any ideas?
I am running sm verison 1.7.3-dev+5275 and the latest version of the plugin.
edit: here is log file error:
L 02/15/2016 - 21:06:27: Info (map "de_dust2") (file "errors_20160215.log")
L 02/15/2016 - 21:06:27: [SM] Native "GetEventInt" reported: Invalid game event handle 0 (error 4)
L 02/15/2016 - 21:06:27: [SM] Displaying call stack trace for plugin "knifeswapper.smx":
L 02/15/2016 - 21:06:27: [SM] [0] Line 189, /home/forums/content/files/2/4/0/5/2/0/150326.attach::OnPostPlayerSpawn()
|
Just change
Code:
HookEvent("round_start", OnPostRoundStart, EventHookMode_PostNoCopy);
HookEvent("player_spawn", OnPostPlayerSpawn, EventHookMode_PostNoCopy);
to
Code:
HookEvent("round_start", OnPostRoundStart, EventHookMode_Post);
HookEvent("player_spawn", OnPostPlayerSpawn, EventHookMode_Post);