Problem(error/warning): Nece da mi se sacuva igraceva Sifra
Dio skripte:
[pawn]
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo[playerid][pPass]);
[/pawn]
[pawn]
forward SavePlayer(playerid);
public SavePlayer(playerid)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",PlayerInfo[playerid][pPass]);
[/pawn]
[pawn]
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
//
Slika/video ingame problema(obavezno ako je ingame problem): //
Daj register
Citat: V01D poslato Februar 20, 2020, 19:08:16 POSLE PODNE
Daj register
[pawn]
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registracija",""COL_RED"Ukucajte vasu sifru kako bi registrovali vas account.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Kills",0);
INI_WriteInt(File,"Deaths",0);
INI_WriteInt(File,"Name",0);
INI_WriteInt(File,"Banned",0);
INI_WriteInt(File,"Score",0);
INI_WriteInt(File,"Skin",0);
INI_WriteInt(File,"RconDozvola",0);
INI_Close(File);
SetSpawnInfo(playerid, 0, 0, 1332.3175,-984.9104,33.8966,269.8959,0,0,0,0,0,0);
SpawnPlayer(playerid);
}
}
[/pawn]
??
Obrisi sve ovo iz tog dijaloga i umesto toga stavi SavePlayer(playerid) jer ne mozes bez funkcije za to otvarati file handle za ini barem ne ovako.
[pawn]
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Kills",0);
INI_WriteInt(File,"Deaths",0);
INI_WriteInt(File,"Name",0);
INI_WriteInt(File,"Banned",0);
INI_WriteInt(File,"Score",0);
INI_WriteInt(File,"Skin",0);
INI_WriteInt(File,"RconDozvola",0);
INI_Close(File);
[/pawn]
Citat: algorhitmically poslato Februar 20, 2020, 21:00:09 POSLE PODNE
Obrisi sve ovo iz tog dijaloga i umesto toga stavi SavePlayer(playerid) jer ne mozes bez funkcije za to otvarati file handle za ini barem ne ovako.
[pawn]
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Kills",0);
INI_WriteInt(File,"Deaths",0);
INI_WriteInt(File,"Name",0);
INI_WriteInt(File,"Banned",0);
INI_WriteInt(File,"Score",0);
INI_WriteInt(File,"Skin",0);
INI_WriteInt(File,"RconDozvola",0);
INI_Close(File);
[/pawn]
Opet isto
Hmmm, po ovome bi trebalo da sacuva lepo, sta imas u scriptfiles ?? Daj nam kada se igrac registruje i nakon sto se diskonektuje..
Citat: V01D poslato Februar 20, 2020, 22:44:47 POSLE PODNE
Hmmm, po ovome bi trebalo da sacuva lepo, sta imas u scriptfiles ?? Daj nam kada se igrac registruje i nakon sto se diskonektuje..
https://vimeo.com/user108836109/review/392827024/ca2b110f55
Citat: Teodor poslato Februar 20, 2020, 23:42:58 POSLE PODNE
https://vimeo.com/user108836109/review/392827024/ca2b110f55
Sorry, we couldn't find that page
Make sure you've typed the URL correctly, or try searching Vimeo. You could also watch one of the videos below instead.
Citat: V01D poslato Februar 20, 2020, 23:49:17 POSLE PODNE
Sorry, we couldn't find that page
Make sure you've typed the URL correctly, or try searching Vimeo. You could also watch one of the videos below instead.
wtf, meni radi probaj da ga otvoris preko neke druge stranice(Chrome,Opeta,Edge.....)
Samo ga upload negde drugde..
Citat: V01D poslato Februar 20, 2020, 23:53:25 POSLE PODNE
Samo ga upload negde drugde..
Reci neki sajt
Probaj sad
https://vimeo.com/user108836109/review/392829690/566038bf02
https://vimeo.com/392829690
Daj nam udb_hash
Citat: V01D poslato Februar 21, 2020, 00:00:28 PRE PODNE
Daj nam udb_hash
stock udb_hash(buf[]) {
new length=strlen(buf);
new s1 = 0;
new s2 = 1;
new n;
for (n=0; n<length; n++)
{
s1 = (s1 + buf[n]) % 65521;
s2 = (s2 + s1) % 65521;
}
return (s2 << 16) + s1;
}
Druze , reci mi molim te koju drogu koristis da se i ja pucam malo :D
@Galardo
u SavePlayer funkciji ti ne treba INI_WriteInt(File, "Password", ...); obrisi to
@Teodor prestani da spamujes,procitaj pravila malo,nece skodit.
Sljedeci put kad budes se tako ponasao samo cu lock temu.