new player[64]; new PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid,PlayerName,sizeof(PlayerName)); format(player,sizeof(player), ACCOUNTS ,PlayerName); dini_Create(player); dini_Set(player,"Password",key); dini_IntSet(player,"Money",3000); dini_IntSet(player,"Points",0); dini_IntSet(player,"ActualCar",503); dini_IntSet(player,"ClassC-HAVE",1); dini_IntSet(player,"ClassC-COLOR1",23); dini_IntSet(player,"ClassC-COLOR2",23); dini_FloatSet(player,"ClassC-HEALTH",1000.0); dini_IntSet(player,"ClassC-TIRES",60); dini_IntSet(player,"ClassB-HAVE",0); dini_IntSet(player,"ClassB-COLOR1",23); dini_IntSet(player,"ClassB-COLOR2",23); dini_FloatSet(player,"ClassB-HEALTH",1000.0); dini_IntSet(player,"ClassB-TIRES",60); dini_IntSet(player,"ClassA-HAVE",0); dini_IntSet(player,"ClassA-COLOR1",23); dini_IntSet(player,"ClassA-COLOR2",23); dini_FloatSet(player,"ClassA-HEALTH",1000.0); dini_IntSet(player,"ClassA-TIRES",60);
still nothing but catch the rep+.
where is the problem, maybe in another part of code? loading works, save too. |
#include <a_samp>
#include <dini>
public OnFilterScriptInit()
{
new player[] = "dini/account.ini";
dini_Create(player);
dini_Set(player,"Password","123");
dini_IntSet(player,"Money",3000);
dini_IntSet(player,"Points",0);
dini_IntSet(player,"ActualCar",503);
dini_IntSet(player,"ClassC-HAVE",1);
dini_IntSet(player,"ClassC-COLOR1",23);
dini_IntSet(player,"ClassC-COLOR2",23);
dini_FloatSet(player,"ClassC-HEALTH",1000.0);
dini_IntSet(player,"ClassC-TIRES",60);
dini_IntSet(player,"ClassB-HAVE",0);
dini_IntSet(player,"ClassB-COLOR1",23);
dini_IntSet(player,"ClassB-COLOR2",23);
dini_FloatSet(player,"ClassB-HEALTH",1000.0);
dini_IntSet(player,"ClassB-TIRES",60);
dini_IntSet(player,"ClassA-HAVE",0);
dini_IntSet(player,"ClassA-COLOR1",23);
dini_IntSet(player,"ClassA-COLOR2",23);
dini_FloatSet(player,"ClassA-HEALTH",1000.0);
dini_IntSet(player,"ClassA-TIRES",60);
return 1;
}
Password=123 Money=3000 Points=0 ActualCar=503 ClassC-HAVE=1 ClassC-COLOR1=23 ClassC-COLOR2=23 ClassC-HEALTH=1000.000000 ClassC-TIRES=60 ClassB-HAVE=0 ClassB-COLOR1=23 ClassB-COLOR2=23 ClassB-HEALTH=1000.000000 ClassB-TIRES=60 ClassA-HAVE=0 ClassA-COLOR1=23 ClassA-COLOR2=23 ClassA-HEALTH=1000.000000 ClassA-TIRES=60
#define ACCOUNTS "/Accounts/%s.ini"
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
format(player,sizeof(player),"ACCOUNTS/%s.ini" ,PlayerName);
Код:
#define ACCOUNTS "/Accounts/%s.ini" |
new classchave[MAX_PLAYERS]; new classccolor1[MAX_PLAYERS]; new classccolor2[MAX_PLAYERS]; new classchealth[MAX_PLAYERS]; new classctires[MAX_PLAYERS]; new classbhave[MAX_PLAYERS]; new classbcolor1[MAX_PLAYERS]; new classbcolor2[MAX_PLAYERS]; new classbhealth[MAX_PLAYERS]; new classbtires[MAX_PLAYERS]; new classahave[MAX_PLAYERS]; new classacolor1[MAX_PLAYERS]; new classacolor2[MAX_PLAYERS]; new classahealth[MAX_PLAYERS]; new classatires[MAX_PLAYERS];
solved! reputation for everybody
Код:
new classchave[MAX_PLAYERS]; new classccolor1[MAX_PLAYERS]; new classccolor2[MAX_PLAYERS]; new classchealth[MAX_PLAYERS]; new classctires[MAX_PLAYERS]; new classbhave[MAX_PLAYERS]; new classbcolor1[MAX_PLAYERS]; new classbcolor2[MAX_PLAYERS]; new classbhealth[MAX_PLAYERS]; new classbtires[MAX_PLAYERS]; new classahave[MAX_PLAYERS]; new classacolor1[MAX_PLAYERS]; new classacolor2[MAX_PLAYERS]; new classahealth[MAX_PLAYERS]; new classatires[MAX_PLAYERS]; Tables wasn't be setted after register! by the way, my money is not refreshing automallity. i must use SetMoney(playerid, GetMoney(playerid)); (natives from my anty-moneycheat, it's not the reason - i tested without too). Where could be problem? |
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid,cash);