[glow=black,1,300][TUT][0.3]Cum faci Register cu ajutoru la Dialog[UP][/glow]
[glow=red,2,300]1[/glow].Cautam linia:
[pawn]
if(fexist(string))
{
gPlayerAccount[playerid] = 1;
SendClientMessage(playerid, COLOR_YELLOW, "SERVER: That nick is registered, please login");
SendClientMessage(playerid, COLOR_WHITE, "HINT: You can now login by typing /login <password>");
return 1;
}
else
{
gPlayerAccount[playerid] = 0;
SendClientMessage(playerid,COLOR_YELLOW,"You dont have an account. Please register by using /register [password]");
return 1;
}
[/pawn]
Si o inlocuim cu:
[pawn]
if(fexist(string))
{
gPlayerAccount[playerid] = 1;
new loginstring[2000];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"{FFFFFF}Salut, {FF0000}%s {FFFFFF}! Bine ai venit.\n{FFFFFF}Esti inregistrat in baza noastra de dare.\n{FFFFFF}\n\n\n\n\n{FFFF00}NumeSV {FFFFFF}te roaga sa te loghezi:",loginname);
ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"{FF0000}Login",loginstring,"Login","Exit");
return 1;
}
else
{
gPlayerAccount[playerid] = 0;
new regstring[1000];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"Bun venit, {1E90FF}%s\n{FFFFFF}Nu ai cont.\n\n\n\n\n\n{FFFF00}NumeSV te roaga sa te inregistrezi:",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"{FF0000}Register",regstring,"Register","Exit");
return 1;
}
[/pawn]
[glow=red,2,300]2[/glow].Cautam linile:
[pawn]
if(SafeTime == 1)
{
if(gPlayerAccount == 1 && gPlayerLogged == 0)
{
SendClientMessage(i, COLOR_WHITE, "HINT: You can now login by typing /login <password>");
}
}
[/pawn]
Si inlocuim cu:
[pawn]
if(SafeTime == 1)
{
if(gPlayerAccount == 1 && gPlayerLogged == 0)
{
new loginname[64];
new loginstring[128];
GetPlayerName(i,loginname,64);
format(loginstring,sizeof(loginstring),"Bun venit, %s\nTe rugam sa te loghezi:",loginname);
ShowPlayerDialog(i,12346,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
}
}
[/pawn]
[glow=red,2,300]3[/glow].Cautam linile:
[pawn]
fclose(hFile);
SendClientMessage(playerid, COLOR_YELLOW, "Account registered, you can login now (/login [password]).");
[/pawn]
Si inlocuim cu:
[pawn]
fclose(hFile);
new loginstring[3000];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"{FFFFFF}Salut, {FF0000}%s {FFFFFF}! Teai inregistrat un cont,.\n{FFFFFF}Acum e momentul sa te loghezi.\n{FFFF00}NumeSV {FFFFFF}te roaga sa te loghezi:",loginname);
ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"{FF0000}Login",loginstring,"Login","Exit");
[/pawn]
[glow=red,2,300]4[/glow].Cautam linile:
[pawn]
else
{
SendClientMessage(playerid, COLOR_WHITE, "SERVER: Password does not match your name.");
fclose(UserFile);
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
return 1;
}
[/pawn]
Si inlocuim cu
[pawn]
else
{
new loginstring[500];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"{FF0000}WRONG PASSWORD\n\n\n\n\n{FFFF00}IronRp{FFFFFF} te roaga sa scri parola corecta:",loginname);
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"{FF0000}Log-in",loginstring,"Log-in","Exit");
fclose(UserFile);
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 4) { Kick(playerid); }
return 1;
}
[/pawn]
[glow=red,2,300]5[/glow].Acum avem dialogurile create. Urmeaza sa adaugam dialogurile si la OnDialogResponse.
-Mai intai cautati OnDialogResponse.
-Sub { adaugam urmatoarele coduri:
[pawn]
new sendername[MAX_PLAYER_NAME];
if(dialogid == 12346 || dialogid == 12347)
{
if(response)
{
if(strlen(inputtext))
{
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
OnPlayerLogin(playerid,tmppass);
}
else
{
new loginstring[500];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"{FF0000}WRONG PASSWORD\n\n\n\n\n{FFFF00}NumeSV{FFFFFF} te roaga sa scri parola corecta:",loginname);
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"{FF0000}Log-in",loginstring,"Log-in","Exit");
}
}
}
if(dialogid == 12345)
{
if(response)
{
if(strlen(inputtext))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");
fclose(hFile);
return 1;
}
new passtring[128];
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
format(passtring,sizeof(passtring),"{FFFFFF}Your password is( {FF0000}%s {FFFFFF}).Please don't forget your password or you lost the account",tmppass);
SendClientMessage(playerid, COLOR_ROSUAPRINS, passtring);
OnPlayerRegister(playerid,tmppass);
}
else
{
new regstring[1000];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"Bun venit, {1E90FF}%s\n{FFFFFF}Nu ai cont.\n\n\n\n\n\n{FFFF00}NumeSV te roaga sa te inregistrezi:",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"{FF0000}Register",regstring,"Register","Exit");
}
}
}
[/pawn]
[glow=red,2,300]6[/glow].Acum trebuie sa dezactivam comenzile /register & /login.
-Cautam comanda /register si o "bagam" intre /* si */ .
--Aveti grija ca comanda sa "fie" verde.
-Cautam comanda /login si facem lafel cum e sus.
[glow=black,2,300]ATENTIE[/glow]
-Nu este chear un tutorial ci o mai mult iti arat cum sa inlocui.
-Cui nui place "munca" mea sa nu posteze.
-Nu vreau sa vad acest tutorial pe alte forumi fara acordu meu (il cereti prin PM).
[glow=black,2,300]CREDIT[/glow]
-Tutorial By:IcE(me)
-Functile de dialog gasite in postul original de la gm-u GF. (editat de mine)
Acesta nu este postu original, am facut un update la el deoarece vechea medoda nu e era chear buna.
[0.3]Cum faci Register cu ajutoru la Dialog[UP]
-
- Global Moderator
- Posts: 1380
- Joined: Sun Dec 26, 2010 9:31 pm
- Jucator SA:MP ?: Da
- Nick:: RoberTo
- Jucator CS ?: Da
- Location: Craiova
- Contact:
[0.3]Cum faci Register cu ajutoru la Dialog[UP]
Vrei un host de calitate si serios pentru serverul tau?
VEZI SERVERE HOSTATE LA NOI : http://www.zonek.ro/index.php?option=com_lgsl&Itemid=5
0763.55.9997 Comanda ACUMA OFERTA LIMITATA
Y: zonek_telecom | http://www.zonek.ro
- Nu te baga in pat nervos, stai treaz si "lupta". http://forum.zonek.ro inscrie-te si vezi cum se manifesta...
- Pentru schimb de Linkuri Intra AICi : linkex

- Pentru cereri de Parteneriate prin Bannere Intra AICI


VEZI SERVERE HOSTATE LA NOI : http://www.zonek.ro/index.php?option=com_lgsl&Itemid=5
0763.55.9997 Comanda ACUMA OFERTA LIMITATA
Y: zonek_telecom | http://www.zonek.ro
- Nu te baga in pat nervos, stai treaz si "lupta". http://forum.zonek.ro inscrie-te si vezi cum se manifesta...
- Pentru schimb de Linkuri Intra AICi : linkex

- Pentru cereri de Parteneriate prin Bannere Intra AICI


Jump to
- Inregistreaza-te pe Zonek Telecom ca sa vezi toate Subiectele
- -->>Regulile Forumului & Descriere<<--
- ↳ Regulament Forum
- ↳ Prezentare
- ↳ Cereri Parteneriate
- ↳ Intri si tu in reteaua zonek??
- ↳ Sugestiile voastre
- ↳ Raportare bug-uri/probleme forum
- -->>Mica Publicitate & Reclama<<--
- ↳ Reclama diverse siteuri & servere de Counter-Strike
- ↳ Vand
- ↳ Cumpar
- -->>Servere Comunitare NON-STOP<<--
- ↳ Discord Server Zonek Telecom
- ↳ GO.ZONEK.RO
- ↳ ARENA.ZONEK.RO
- ↳ AWP.ZONEK.RO
- ↳ Bucuresti Create Server
- ↳ Evidenta redirect
- ↳ Clan TAG
- zonek.ro - Counter Strike Global Offensive
- ↳ SourceMod Plugins
- ↳ Admin Commands
- ↳ Fun Stuff
- ↳ Gameplay
- ↳ General Purpose
- ↳ Server Management
- ↳ Statistical
- ↳ Technical/Development
- ↳ Tutoriale
- ↳ Probleme la servere si Jocul Counter-Strike: Global Offensive
- -->>Jocuri & Resurse Counter Strike<<--
- ↳ Tutoriale cs 1.6- Server
- ↳ Tutoriale Moduri Counter - Strike [NOU]
- ↳ Tutoriale cs - Install Counter-Strike & HLDS
- ↳ Scripting
- ↳ Mapping / Harti
- ↳ Cereri Tutoriale
- ↳ Download pluginuri
- ↳ Discutii legate de plugin-uri - Cereri Plugin-uri
- ↳ Download zone
- ↳ AdminMod
- ↳ AmxModX
- ↳ Admin Commands
- ↳ General Purpose
- ↳ Statistical
- ↳ Gameplay
- ↳ Event Related
- ↳ Server Management
- ↳ Fun Stuff
- ↳ Technical/Development
- ↳ AmxMod
- ↳ Addons-uri Counter Strike
- ↳ Addonsuri AmxModX
- ↳ Addonsuri AdminMod
- ↳ Addonsuri AmxMod
- ↳ Cereri addonsuri
- ↳ Probleme tehnice
- ↳ HLDS
- ↳ Client 1.6
- ↳ Alte jocuri
- -->>Diverse<<--
- ↳ Discutii diverse
- ↳ Realitatea Baptista Castellon
- ↳ Arta
- ↳ Studentie
- ↳ Auto / Moto
- ↳ Fashion
- ↳ Sanatate
- -->> San Andreas Multi Player <<--
- ↳ Discutii Scripting
- ↳ Probleme GodFather
- ↳ Tutoriale
- ↳ Cerere Tutoriale
- ↳ Salonul Scripturilor
- ↳ Plugins
- ↳ Maps
- ↳ Gamemode
- ↳ FilterScript
- ↳ News Development
- ↳ Ajutor Servere
- -->> Photoshop <<--
- ↳ Photoshop
- ↳ Creatii
- ↳ Gifts
- ↳ Graphic Battle
- ↳ Tutoriale
- ↳ Competitii: - SOTW
- ↳ Resurse
- ↳ Ripperi
- ↳ Cereri Photoshop
- ↳ Da LIKE pe FaceBook si castigi 10 euro saptamanal!!
- -->>Filme & Muzica<<--
- ↳ Filme
- ↳ Muzica
- -->>Minunile Lumii Antince<<--
- ↳ Cele 7 Minuni ale Lumii
- ↳ Minuni uitate ale Lumii Antice
- -->>LOVE & SEX<<--
- ↳ Love & Sex
- ↳ Contraceptia
- ↳ Dragostea
- -->>Hubul dc.zonek.ro al serverelor de Counter-Strike<<--
- ↳ Totul despre hubul dc.zonek.ro
- -->>Culturi si Mistere<<--
- ↳ Culturi ascunse, mistere si fapte inexplicabile
- ↳ Magie
- ↳ Lumea Viselor
- -->>|Messenger| & Curiozitatii<<--
- ↳ <|Mesaje tampite care se dau pe mess|>
- ↳ Intrebari fara raspuns
- ↳ Stiati ca ?
- ↳ Pentru cei nemultumiti
- Manage Holidays/Sarbatori si Zile Onomastice
- ↳ Manage Holidays / Sarbatori si Zile Onomastice
- Recycle Bin
- ↳ Recycle Bin
- ↳ HaoS.ZoneK.Ro [ Public Server ]
- ↳ Regulament
- ↳ Anunturi
- ↳ Cafenea Admini
- ↳ Staff
- ↳ Cerere Admin
- ↳ Cerere Slot
- ↳ Cerere UnBan
- ↳ Reclamatie Admini
- ↳ Lista Banuri
- ↳ Redirecte
- ↳ djs.zonek.ro
- ↳ Regulament
- ↳ Cereri admin / slot pe djs.zonek.ro
- ↳ Cerere UnBan
- ↳ Reclamatii admini / playeri
- ↳ Campionat 2 vs 2
- ↳ Discutii Libere
- ↳ Clanu Dj's
- ↳ Ballas
- ↳ Nortenos
- ↳ Surenos
- ↳ Taxele serverului
- ↳ Vanzari - Cumparari
- ↳ Afaceri
- ↳ Servicii
- ↳ Case
- ↳ Politia Romana
- ↳ Discutii generale despre factiuni
- ↳ Pompieri si Medici
- ↳ Serviciul Roman de informatii
- ↳ Armata Romana
- ↳ Clanul Frusin
- ↳ Clanul Racean
- ↳ Guvernator San Andreas
- ↳ Asasini Platiti
- ↳ Reporteri ProTV
- ↳ Transport Company
- ↳ Instructori
- ↳ Clanul Camataru
- ↳ Job-uri secundare
- ↳ Tow Car Company
- ↳ Tutoriale GTA SA:MP
- ↳ freerunners.zonek.ro
- ↳ Admins only
- ↳ Regulament
- ↳ Anunturi
- ↳ Donatii
- ↳ Echipa nord
- ↳ Cereri admin/slot
- ↳ Cereri unban
- ↳ De ce am dat ban
- ↳ Cine face abuz de admin
- ↳ Discutii libere
- ↳ Evidenta redirecte
- ↳ Ghenaaaaaa.....!!!
- ↳ Grove Street
- ↳ Ballas Family
- ↳ Mayor
- ↳ The Triads
- ↳ The Mafia
- ↳ Varios Los Aztecas
- ↳ License Faction
- ↳ Los Santos Vagos
- ↳ News Reporter
- ↳ Taxi Company
- ↳ National Guard
- ↳ Police Departament
- ↳ Federal Bureau of Investigaton
- ↳ Medics
- ↳ Hitman Agency
- ↳ furien.zonek.ro
- ↳ Regulament Server
- ↳ Anunturi
- ↳ Cerere Admin / Slot
- ↳ Cerere UnBan
- ↳ Cerere Ban
- ↳ Reclamatii
- ↳ Echipa furien.zonek.ro
- ↳ Mariri / degradari
- ↳ Redirecte
- ↳ Discutii Generale
- ↳ Download Redirecte
- ↳ FAN.ZONEK.RO # Fan Curier Server
- ↳ intrudersWOW - www.zonek.ro
- ↳ Announcements / Server info
- ↳ International Zone
- ↳ Romanian
- ↳ German
- ↳ English
- ↳ Requests
- ↳ Ban \ Mute Request
- ↳ Unban / Unmute requests
- ↳ Bug Report
- ↳ Items
- ↳ Other
- ↳ Fixed bugs
- ↳ General Discussion
- ↳ Ze.Zonek.Ro # Intruders Zombie
- ↳ Stream name: ...::: CooLFM :::... - Cel mai tare Radio
- ↳ I'm in love!
- ↳ Request
- ↳ Events - Radio CooLFM
- ↳ Cautam Dj`eitze si DJ-eii
- ↳ Personal Top Ten (?)
- ↳ Zonek SA:MP Official Server
- ↳ Informatii
- ↳ Sugestii
- ↳ Update's
- ↳ Factiuni
- ↳ Police Depatament
- ↳ Federal Bureau of Investigations
- ↳ National Guard
- ↳ Fireman/Paramedics
- ↳ The Mafia
- ↳ The Triads
- ↳ The Mayor
- ↳ Hitman Agency
- ↳ News Reporter
- ↳ Taxi Company
- ↳ License Faction
- ↳ Los Santos Vagos
- ↳ Varios Los Aztecas
- ↳ Ballas
- ↳ Grove Street
- ↳ NFS Club
- ↳ NRG Club
- ↳ Plangeri
- ↳ Admin's Zone
- ↳ Diverse
- ↳ Buguri
- ↳ Statistici WEB
- ↳ LIGHT.ZONEK.RO | Anti-Cheat | Skins |
- ↳ DM.ZONEK.RO
- ↳ WAR3.ZONEK.RO
- ↳ ELITE.ZONEK.RO