Skip to content

Commit

Permalink
Improvments
Browse files Browse the repository at this point in the history
  • Loading branch information
orangevichHeh committed Jul 15, 2024
1 parent e99586b commit f7897f8
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 44 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Requirements
- [SourceMod (1.12)](https://www.sourcemod.net/)
- [MM:Source (2.0)](https://www.sourcemm.net/)

# Prepare
- Install all [SDKs, Sourcemod and Metamod:Source](https://wiki.alliedmods.net/Building_SourceMod#Downloading_Source_and_Dependencies)
- Add SDKs, Sourcemod and Metamod:Source to **Enviroments**:
Expand All @@ -15,6 +19,7 @@
- Create build folder
- Goto build folder and run a command prompt
- Run `python3 ../configure.py`
- On linux run `CC=clang CXX=clang++ python3 ../configure.py`
- Then `ambuild`

# Afterwords
Expand Down
6 changes: 5 additions & 1 deletion extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@ Sample g_Sample; /**< Global singleton for extension's main interface */
SMEXT_LINK(&g_Sample);

bool Sample::SDK_OnLoad(char* error, size_t maxlen, bool late) {
sharesys->AddNatives(myself, g_ExtensionNatives);
smutils->LogMessage(myself, "Sample extension has been loaded.");
return true;
}

void Sample::SDK_OnAllLoaded() {
sharesys->AddNatives(myself, g_ExtensionNatives);
}

void Sample::SDK_OnUnload()
{
smutils->LogMessage(myself, "Sample extension has been unloaded.");
Expand Down
2 changes: 1 addition & 1 deletion extension.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Sample : public SDKExtension
* @brief This is called once all known extensions have been loaded.
* Note: It is is a good idea to add natives here, if any are provided.
*/
//virtual void SDK_OnAllLoaded();
virtual void SDK_OnAllLoaded();

/**
* @brief Called when the pause state is changed.
Expand Down
Loading

0 comments on commit f7897f8

Please sign in to comment.