11.09.2010, 10:57
Код:
public OnPlayerConnect(playerid) { new playerfile[256]; new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME); format(playerfile,sizeof(playerfile),"/Casino/%s",PlayerName); if(!dini_Exists(playerfile)) { dini_Create(playerfile); dini_IntSet(playerfile, "VIP", 0); dini_IntSet(playerfile, "Caddy", 0); dini_IntSet(playerfile, "FreeDrinks", 0); dini_IntSet(playerfile, "Staff", 0); } //SetPVarInt(playerid, "VIP", dini_Int(playerfile, "VIP")); pInfo[playerid][VIP] = dini_Int(playerfile, "VIP"); //SetPVarInt(playerid, "Caddy", dini_Int(playerfile, "Caddy")); pInfo[playerid][Caddy] = dini_Int(playerfile, "Caddy"); //SetPVarInt(playerid, "FreeDrinks", dini_Int(playerfile, "FreeDrinks")); pInfo[playerid][FreeDrinks] = dini_Int(playerfile, "FreeDrinks"); //SetPVarInt(playerid, "Staff", dini_Int(playerfile, "Staff")); pInfo[playerid][Staff] = dini_Int(playerfile, "Staff"); //SetPVarInt(playerid, "LotteryNumber", 0); pInfo[playerid][LotteryNumber] = dini_Int(playerfile, "LotteryNumber"); return 1; }