Jump to content
  • 0

pomoc Registračka


Pingvin

Dotaz

15 odpovědí na tuto otázku

Recommended Posts

  • 0

Me staci registracka aby se tam ddalo udelat registrivani hrac novacek atd a aby kdyz dam k novackovi giveplayermoney(playerid,100000); aby mu to pripsalo ty prachy a ne aby mu je to dalo a hned vzalo :)

Edited by Pingvin
Link to comment
Share on other sites

  • 0

Ehm ja som ti neporadil niečo zabugované ak na toto narážaš?
Ehm ale ak hľadaš iba zápis a čítanie a máš free server prípadne ti ide o rýchlosť a menšie zaťaženie + ľahká manipulácia. 
Ukladaj pomocou include File.inc. 
Cez neho idú všetky systémy Dini, Dof2, Y_INI... . 
Len sa to musíš naučiť. 
http://pawno.cz/topic/49283-pr%C3%A1ca-so-s%C3%BAbormi/

Edited by Matus.Cernava
Link to comment
Share on other sites

  • 0


enum
player_info {
bool:logged
};

new
player[MAX_PLAYERS][player_info];


stock Register_and_login(playerid){
new
c[30+MAX_PLAYER_NAME];

format(c, sizeof(c), "cwtg/accounts/%s.txt", PlayerName(playerid));

if(player[playerid][logged] == true) return Notification(playerid, "Už si se přihlásil.");
if(DOF2_FileExists(c)){
ShowPlayerDialog(playerid, dialog+5, DIALOG_STYLE_PASSWORD, "Login", "Pro přihlášení zadej heslo uvedené při registraci.", "Login", "Close");
} else ShowPlayerDialog(playerid, dialog+6, DIALOG_STYLE_INPUT, "Register", "Pro registraci zadej heslo které si budeš pamatovat.", "Register", "Close");
return true;
}


case dialog+5:{
new
c[30+MAX_PLAYER_NAME];

format(c, sizeof(c), "cwtg/accounts/%s.txt", PlayerName(playerid));

if(response == 1){
if(DOF2_FileExists(c)){
if(DOF2_CheckLogin(c, inputtext)){
player[playerid][permissions] = DOF2_GetInt(c, "Permissions");
player[playerid][logged] = true;
return true;
} else {
ShowPlayerDialog(playerid, dialog+5, DIALOG_STYLE_PASSWORD, "Login", "Špatně zadané heslo!\nPro přihlášení zadej heslo uvedené při registraci.", "Login", "Close");
return true;
}
}

}
}
case dialog+6:{
new
c[30+MAX_PLAYER_NAME];

format(c, sizeof(c), "cwtg/accounts/%s.txt", PlayerName(playerid));

if(!strlen(inputtext)){
ShowPlayerDialog(playerid, dialog+6, DIALOG_STYLE_INPUT, "Register", "Pro registraci zadej heslo které si budeš pamatovat.", "Register", "Close");
return false;
}
if(response == 1){
DOF2_CreateFile(c, inputtext);
DOF2_SetInt(c, "Permissions", 0);
DOF2_SaveFile();
}
}
}
Edited by rEf
Link to comment
Share on other sites

  • 0

Tohle je přes DOF2 je vytažená z cwtg módu a to ti musí stačit... Dudb už snad nikdo ani dnes nepoužívá se mi zdá.

Něco si z ní vytáhni není dokonalá ale tobě to postačí.

Link to comment
Share on other sites

  • 0

Vyser se na dudb tvl... A jestli po něm tak toužíš stáhni si na netu třeba Maikeroo Town to je přístupné v .pwn a je tam myslím dudb.

Link to comment
Share on other sites

  • 0

Tak to máš blbé :-D Tímhle tzv. agresivním chováním nic nezískáš nahoře si dostal nějaký tzv. příklad tak se nauč.

Není to nic těžkého je tu dost tutoriálu stačí použít vyhledávač jak na dudb, jak na dini nebo jak na dof2.

Link to comment
Share on other sites

  • 0
  • Administrátor

Jak ti psal rEf dudb je zastaralý. Osobně ti doporučuju DOF2 nebo y_ini

 

 

DOF2 http://pawno.cz/topic/53489-pr%C3%A1ce-s-dof2-dini-u%C5%BE-nikdy-v%C3%ADc/

na y_ini jsem nenasel topic tak nahonem

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...