Skip to content

Cheaterman/module_hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

module_hooks

An example module hooking system, will be used in PySAMP.

Example:

python/__init__.py:

import pysamp.callbacks
from . import vehicles


def OnVehicleDeath(vehicleid: int) -> None:
    print(f'From module "{__name__}": Vehicle {vehicleid} died!')


pysamp.callbacks.hook()

python/vehicles.py:

def OnVehicleDeath(vehicleid: int) -> None:
    print(f'From module "{__name__}": Vehicle {vehicleid} died!')

About

Example module hooking system, will be used in PySAMP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages