SA-MP Forums Archive
Print all PVars - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Print all PVars (/showthread.php?tid=204695)



Print all PVars - BloodyEric - 30.12.2010

Hey,

I need help with a little problem. For debugging, I try to print all PVars a player has. I guess I need the functions

Код:
native GetPVarsUpperIndex(playerid);
native GetPVarNameAtIndex(playerid, index, ret_varname[], ret_len);
native GetPVarType(playerid, varname[]);
but I dont find any documentation about them. Any help?


Re: Print all PVars - MadeMan - 30.12.2010

pawn Код:
new varname[64];
for(new i=0; i < GetPVarsUpperIndex(playerid); i++)
{
    GetPVarNameAtIndex(playerid, i, varname, sizeof(varname));
    printf("PVar   index: %d   varname: %s", i, varname);
}



Re: Print all PVars - BloodyEric - 30.12.2010

Thank you