04.11.2011, 23:52
Hello people. I'm working on a gamemode and I'm stuck at the moment. What's my problem? Let's say, for example I a player enum, in which I want to add a bool, for example Admin Duty:
Now, my question is how can I use / save / load that boolean? I'm using Y_INI.
On OnPlayerDisconnect
and of course, load function:
So, like I said, how can I convert the pADuty integer to boolean? Thank you.
pawn Код:
enum P_ENUM_DATA
{
pADuty // I want to change this to bool:pADuty
};
new pInfo[MAX_PLAYERS][P_ENUM_DATA];
On OnPlayerDisconnect
pawn Код:
INI_WriteInt(File,"AdminDuty", P_DATA[playerid][pADuty]);
pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("AdminDuty", P_DATA[playerid][pADuty]);