You did not provide the needed signature.
CheckMapConditions and
CheckWinConditions should be hooked from the g_pGameRules object(by providing an offset), not by making signatures.
After patching the memory no restart is needed.
PHP Code:
switch ( GoodRandomClass[id] )
{
case 1: ChangeClass( id, Goku )
case 2: ChangeClass( id, Vegeta )
case 3: ChangeClass( id, Trunks )
case 4: ChangeClass( id, Gohan )
}
Could be done as:
PHP Code:
ChangeClass( id, GoodRandomClass[id] - 1 )
Same for
VillanRandomClass.
In
Fw_PlayerSpawn is_user_alive check should be the first one. Also don't use fakemeta_util, use the module functions(give_item, strip_user_weapons, etc).
In
fw_TouchWeapon make sure the entity is valid.
You also lack sanity checks inside.
fw_TakeDamage.
I'm not going to check more. Unapproved, but if you decide to fix your plugin you can PM me and we will see.
__________________