Započeo Teodor
•20. Feb. 2020.Ne cuva sifru
3,820
pregleda
19
postova
Made Man
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
472
Postovi:
38
Teme:
Pridružio se:Apr. 2019
20. Feb. 2020.
Problem(error/warning): Nece da mi se sacuva igraceva Sifra
Dio skripte:
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
Slika/video ingame problema(obavezno ako je ingame problem): //
Dio skripte:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo);
forward SavePlayer(playerid);
public SavePlayer(playerid)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",PlayerInfo);
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
//
Slika/video ingame problema(obavezno ako je ingame problem): //
Made Man
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
472
Postovi:
38
Teme:
Pridružio se:Apr. 2019
20. Feb. 2020.
V01D wrote on February 20, 2020, 6:08 pm:
Daj register
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);
}
}
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
40 / 100 XP
Početnik(0)
117
Postovi:
2
Teme:
Pridružio se:Feb. 2020
20. Feb. 2020.
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.
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);
Made Man
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
472
Postovi:
38
Teme:
Pridružio se:Apr. 2019
20. Feb. 2020.
algorhitmically wrote on February 20, 2020, 8:00 pm:
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.
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);
Opet isto
Made Man
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
472
Postovi:
38
Teme:
Pridružio se:Apr. 2019
20. Feb. 2020.
V01D wrote on February 20, 2020, 9:44 pm:
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
Godfather
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosAktivan Član
17 / 250 XP
Početnik(1)
2,272
Postovi:
76
Teme:
Pridružio se:Maj 2014
20. Feb. 2020.
Teodor wrote on February 20, 2020, 10:42 pm:
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.
Made Man
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
472
Postovi:
38
Teme:
Pridružio se:Apr. 2019
20. Feb. 2020.
V01D wrote on February 20, 2020, 10:49 pm:
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.
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…..)
Made Man
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
472
Postovi:
38
Teme:
Pridružio se:Apr. 2019
Made Man
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
472
Postovi:
38
Teme:
Pridružio se:Apr. 2019
20. Feb. 2020.
V01D wrote on February 20, 2020, 11:00 pm:
Daj nam udb_hash
stock udb_hash(buf[]) {
new length=strlen(buf);
new s1 = 0;
new s2 = 1;
new n;
for (n=0; n {
s1 = (s1 + buf) % 65521;
s2 = (s2 + s1) % 65521;
}
return (s2 << 16) + s1;
}
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava
