View Single Post
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 07-15-2020 , 14:49   Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced
Reply With Quote #37

Some updates I prepared long time ago:

Code:
AddAmbientSoundHook(AmbientHoo));
=>
AddAmbientSoundHook(AmbientHook);
+
Code:
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>

bool g_bBlockSound;
in header, since tutorial is intended for novice as well.

Updates for descriptions of some errors:

Addition for: "Native XXX is not bound"
- to prevent calling a native of unloaded plugin, implement OnLibraryAdded() and OnLibraryRemoved() natives.
Do not use LibraryExists() constantly because it's a very CPU demanding operation.

Unable to load plugin (bad header) - error similar to "Illegal disk size". (maybe just append it in same sentence)

Warning "Array-based enum structs will be removed in 1.11" - examples of fixing that:
1) by adding MAX_ITEM to enum is here: https://forums.alliedmods.net/showpo...32&postcount=8
2) by converting to enum struct is here: https://forums.alliedmods.net/showpo...0&postcount=45
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline