11.02.2012, 05:41
Guys i need help using enums
not for players but for server
my problem is it will not save
and help me create file
i am using Y_INI please anyone can help me
and the command
This one is for the package for them to create the data
and my file location
It will compile successfully but when i test it In game it will not write and save
not for players but for server
my problem is it will not save
and help me create file
i am using Y_INI please anyone can help me
Код:
enum sData
{
sRich, // This will be for the Rich list command
}
new sFile[sData];
Код:
public Loadserver_data(name[],value[])
{
INI_Int("RichMoney",sFile[sRich]);
return 1;
}
Код:
CMD:setrichmoney(playerid,params[])
{
if(pFile[playerid][pAdmin] >= OWNER || IsPlayerAdmin(playerid))
{
new ammount;
if(sscanf(params,"d",ammount)) return SendClientMessage(playerid,usage,"[ Usage ]: /setrichmoney [ "cmoney"$ ammount"cusage" ]");
sFile[sRich] = ammount;
return 1;
}
return 1;
}
Код:
CMD:package(playerid)
{
if(IsPlayerAdmin(playerid))
{
new INI:File = INI_Open(SPATH);
INI_WriteInt(File,"RichMoney",0);
INI_Close(File);
return 1;
}
return 1;
}
Код:
#define SPATH "/RicaNiel/ServerData/ServerSettings.ini"


