AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   [TUT] Modules and efficient scripting (https://forums.alliedmods.net/showthread.php?t=88792)

alaki1667 12-17-2020 11:29

Re: [TUT] Modules and efficient scripting
 
its good:)
نورپردازی شهری

TheVaskov 03-16-2023 02:22

Re: [TUT] Modules and efficient scripting
 
Then natural questions arise:
1. Fakemeta High: Would it make sense to replace
PHP Code:

Fakemeta
set_pev(weaponbox,pev_movetype,MOVETYPE_TOSS)    
set_pev(weaponbox,pev_solid,SOLID_TRIGGER)
set_pev(weaponbox,pev_velocityvlc

To another way (example)
PHP Code:

set_pdata_int(idm_offset_myvetypeMOVETYPE_TOSSplayer_offset5)
set_pdata_int(idm_offset_solidSOLID_TRIGGERplayer_offset5)
set_pdata_^^VECTOR?? ( bla bla bla bla  

1.1 Will this add to the speed of function execution, memory access and rewriting?
1.2 Does it make sense inside the plugin to redefine functions like this:
PHP Code:

#define pev(%1, pev_classname, %2, %3) entity_get_string(%1 ,EV_SZ_classname,%2, %3)
#define set_pev(%1, pev_classname, %2) entity_set_string(%1 ,EV_SZ_classname,%2)
#define set_pev(%1,pev_movetype,%2) entity_set_int(%1,EV_INT_movetype, %2) 

2. Module codding:
2.1 Then why not create a new module that is the fastest and most direct , or add functionality to the old ones ?
2.2 I couldn't find a normal tutorial on creating my own module. If anyone has it, give me a link. Even according to the mighty Orpheus, I didn't fucking succeed with a big fit of anger.


3. PS
3.1 Unfortunately, it was enough for me to read only 1 time: Try to use Fakemeta, and I built the plugin based on this. Such comments should be deleted or marked as "bad" advice.
3.2 I did find the Amxx 1.9.0 Pre-release notes And AMX Mod X 1.10.0 5461 This would be very intresting to use. Cause I still use official 1.8.2


All times are GMT -4. The time now is 17:41.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.