06.03.2014, 17:59
Ok so i assume your using Ini files and Y_Ini, ok i am using the same system , so i use this for example:
GivePlayerCash(playerid,PlayerInfo[playerid][pCash]);
So it all depends on the way you did you Playerinfo Enum...The Most used is ..
enum pInfo
{
pLevel,
pCash,
pScore
}
new PlayerInfo[MAX_PLAYERS][pInfo];
//------- Load the User's data ------//
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Level",PlayerInfo[playerid][pLevel]);
INI_Int("Cash",PlayerInfo[playerid][pCash]);
INI_Int("Score",PlayerInfo[playerid][pScore]);
return 1;
}
Hope that helps a bit.
GivePlayerCash(playerid,PlayerInfo[playerid][pCash]);
So it all depends on the way you did you Playerinfo Enum...The Most used is ..
enum pInfo
{
pLevel,
pCash,
pScore
}
new PlayerInfo[MAX_PLAYERS][pInfo];
//------- Load the User's data ------//
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Level",PlayerInfo[playerid][pLevel]);
INI_Int("Cash",PlayerInfo[playerid][pCash]);
INI_Int("Score",PlayerInfo[playerid][pScore]);
return 1;
}
Hope that helps a bit.