20.12.2010, 14:24
(
Последний раз редактировалось Larsey123IsMe; 20.12.2010 в 18:40.
Причина: Added Bolded Text xD
)
The Score and the Money wont save
pawn Код:
#include <a_samp>
#include <Dini>
#define PlayerInfo "Users/%s.ini"
enum Info
{
Score,
Money,
}
//-----------------------------------------------------------------------------
public OnPlayerConnect(playerid)
{
new File[68];
format(File,sizeof(File), PlayerInfo);
if(!dini_Exists(File))
{
dini_Create(File);
dini_IntSet(File, "Score" ,0);
dini_IntSet(File, "Money" ,0);
}
SetPlayerScore(playerid, dini_Int(File, "Score"));
GivePlayerMoney(playerid, dini_Int(File, "Money"));
return 1;
}
//------------------------------------------------------------------------------
public OnPlayerDisconnect(playerid, reason)
{
new File[68];
SetPlayerScore(playerid, dini_Int(File, "Score"));
GivePlayerMoney(playerid, dini_Int(File, "Money"));
return 1;
}