Raised This Month: $ Target: $400
 0% 

Solved How to pass tagged variable to other plugins


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
davidto1995
Member
Join Date: Jul 2010
Location: hong kong
Old 04-25-2021 , 05:41   How to pass tagged variable to other plugins
Reply With Quote #1

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 
PlayerClassPlayerTypeMAX_PLAYERS ];

...

public 
_GetPlayerTypeplugin params )
{
    new 
id get_param);

    if( ! 
is_user_aliveid ) )
        return;

    
set_param_byref_:PlayerTypeid ] );

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
(idplayer_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?

Last edited by davidto1995; 05-02-2021 at 03:56.
davidto1995 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:29.


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