20.02.2013, 13:59
Its not actually include, but very usefull defines.
Simplest way to use pvars.
1.
usage:
2.
usage:
3.
usage:
Simplest way to use pvars.
1.
PHP код:
#define set.%0[%1]=%2; SetPVarInt(%1,#0,%2);
#define fset.%0[%1]=%2; SetPVarFloat(%1,#%0,%2);
#define get.%0[%1] GetPVarInt(%1,#%0)
#define fget.%0[%1] GetPVarFloat(%1,#%0)
#define del.%0[%1] DeletePVar(%1,#%0)
Код:
set.money[playerid] = 500; fset.health[playerid] = 1.234; get.money[playerid]; fget.health[playerid]; del.money[playerid]; del.health[playerid];
PHP код:
#define set.%0.%1=%2; SetPVarInt(%0,#%1,%2);
#define fset.%0.%1=%2; SetPVarFloat(%0,#%1,%2);
#define get(%0.%1) GetPVarInt(%0,#%1)
#define fget(%0.%1) GetPVarFloat(%0,#%1)
#define del.%0.%1; DeletePVar(%0,#%1);
Код:
set.playerid.money = 500; fset.playerid.health= 1.234; get(playerid.money); fget(playerid.health); del.playerid.money; del.playerid.health;
PHP код:
#define set.%0.%1()=%2; SetPVarInt(%0,#%1,%2);
#define fset.%0.%1()=%2; SetPVarFloat(%0,#%1,%2);
#define get.%0.%1() GetPVarInt(%0,#%1)
#define fget.%0.%1() GetPVarFloat(%0,#%1)
#define del.%0.%1() DeletePVar(%0,#%1);
Код:
set.playerid.money() = 500; fset.playerid.health() = 1.234; get.playerid.money(); fget.playerid.health(); del.playerid.money(); del.playerid.health();