I have the following codes in plugin A:
PHP Code:
enum PlayerClass
{
SDU, // Human Type
Soldier,
Heavy,
Supporter,
Leader,
GVirusMonster, // Zombie Type
Nemesis,
TVirusMonster,
Assassin,
Venom,
Vampire,
Speeder,
Horde,
Hunter
};
...
new PlayerClass: PlayerType[ MAX_PLAYERS + 1 ];
...
public _GetPlayerType( plugin , params )
{
new id = get_param( 1 );
if( ! is_user_alive( id ) )
return;
set_param_byref( 2 , _:PlayerType[ id ] );
}
In plugin B, i try to retrieve the value of PlayerType[ id ]
PHP Code:
enum _:PlayerClass2
{
SDU, // Human Type
Soldier,
Heavy,
Supporter,
Leader,
GVirusMonster, // Zombie Type
Nemesis,
TVirusMonster,
Assassin,
Venom,
Vampire,
Speeder,
Horde,
Hunter
}
static player_type
GetPlayerType(id, player_type);
.inc file
PHP Code:
native GetPlayerType( id , type );
but player_type is always 0 and i cannot get the correct value. What are the recommended ways to exchange variables across plugins?