[Tutorial] Using PVars
#8

Sorry if you got me wrong, but here's something else I'd like to point out in that case...

pawn Код:
public OnPlayerDisconnect(playerid)
{
    DeletePVar(playerid,"PosX");
    return 1;
}
Deleting a per-player variable is not necessary under OnPlayerDisconnect.

And GetPVarType afaik does not return a string like you say. It returns the type, like this
pawn Код:
// PVar enumeration
#define PLAYER_VARTYPE_NONE         0
#define PLAYER_VARTYPE_INT          1
#define PLAYER_VARTYPE_STRING       2
#define PLAYER_VARTYPE_FLOAT        3
So
pawn Код:
GetPVarType(playerid, "PosX");
would actually return PLAYER_VARTYPE_FLOAT (3)

And your example of "MarriedTo" for string pvars isn't exactly the best, since the best method to assign someone married to another player would be using IDs and hence SetPVarInt and GetPVarInt.
Reply


Messages In This Thread
Using PVars - by Shadow™ - 26.07.2010, 11:27
Re: Using PVars - by ViruZZzZ_ChiLLL - 26.07.2010, 13:07
Re: Using PVars - by Shadow™ - 26.07.2010, 13:16
Re: Using PVars - by TransformerOwl - 26.07.2010, 14:39
Re: Using PVars - by ikey07 - 26.07.2010, 14:58
Re: Using PVars - by Last_Stand_Guardian - 26.07.2010, 15:00
Re: Using PVars - by Shadow™ - 26.07.2010, 15:16
Re: Using PVars - by TransformerOwl - 26.07.2010, 15:37
Re: Using PVars - by Hiddos - 27.07.2010, 16:08

Forum Jump:


Users browsing this thread: 1 Guest(s)