IcE. Posted June 22, 2010 Posted June 22, 2010 [glow=black,1,300][TUT][0.3]Cum faci Register cu ajutoru la Dialog[uP][/glow][glow=red,2,300]1[/glow].Cautam linia: 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; } Si o inlocuim cu: 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; } [glow=red,2,300]2[/glow].Cautam linile: if(SafeTime[i] == 1) { if(gPlayerAccount[i] == 1 && gPlayerLogged[i] == 0) { SendClientMessage(i, COLOR_WHITE, "HINT: You can now login by typing /login <password>"); } } Si inlocuim cu: if(SafeTime[i] == 1) { if(gPlayerAccount[i] == 1 && gPlayerLogged[i] == 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"); } } [glow=red,2,300]3[/glow].Cautam linile: fclose(hFile); SendClientMessage(playerid, COLOR_YELLOW, "Account registered, you can login now (/login [password])."); Si inlocuim cu: 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"); [glow=red,2,300]4[/glow].Cautam linile: 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; } Si inlocuim cu 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; } [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: 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"); } } } [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. Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!
mihaibr Posted June 22, 2010 Posted June 22, 2010 ce tutorial e asta ca tu in loc sa explici acele functii tu ne-ai explicat cum sa le copiem in pawno > :(
dUtZ Posted June 22, 2010 Posted June 22, 2010 + tu pune ce trebuie nu pune lucrurile tale de la onplayerconnect register login fiecare playeri poate mai are ceva in plus sau in minus :|
IcE. Posted June 23, 2010 Author Posted June 23, 2010 ok am sal refac :( Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!
Razvann Posted June 23, 2010 Posted June 23, 2010 Bine ca l-ai editat, ai ajutat multi 'scripteri' cu asta.
Ch1NeZu Posted July 29, 2010 Posted July 29, 2010 E un tutorial excelent pentru incepatori degeaba explica daca ceilalti nu inteleg poate uni da uni nu ... si dupaia vezi numa reply Da ce inseamna ca.... adik.... ? ... deci eu zic ca e bun fiecare intelege dupa experienta gg ! Samp.OnlyPro.ro - RolePlay - Join Us !
angel Posted August 17, 2010 Posted August 17, 2010 Bun +1 de la mine,dar cum modifici boxul sa fie mai lung sau inalt..? Daca ti-am fost de ajutor +1 Respect!Multumesc
Guest ToTo Posted August 30, 2010 Posted August 30, 2010 Bun +1 de la mine,dar cum modifici boxul sa fie mai lung sau inalt..?lungimea si inaltimea depind de marimea textuluidaca vrei sa fie mai inalt lasa spatiu intre propozitiiex: "Welcome, %s\n \nThat nick is registered.\n \nYou can now login:"
Guest ToTo Posted August 30, 2010 Posted August 30, 2010 nu imi ia parola in considerare. nu isi face legaturile. daca scriu parola gresita ma conecteaza, nu spune ca nu ai cont etc.
IcE. Posted September 2, 2010 Author Posted September 2, 2010 nu imi ia parola in considerare. nu isi face legaturile. daca scriu parola gresita ma conecteaza, nu spune ca nu ai cont etc.fals merge perfectnu e bun pentru modul gf?ma numa pentru modu GF Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!
IcE. Posted September 5, 2010 Author Posted September 5, 2010 Lucrez la asta 1.Fac sa intrebe sex-u Masculin Sau Femenin2.Fac sa intrebe varsa cu o lista de la 14 la 25 ani Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!
Drifterul9 Posted September 7, 2010 Posted September 7, 2010 SalAm si eu o problemaDe ieri am inceput sa fac un sv de la 0 si nu am chestii dinalea de inlocuit iar camd le pun direct nu merge.
Administrator -=[Vyorel]=- Posted September 11, 2010 Administrator Posted September 11, 2010 Compileaza cu Pawno din 0.3b ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.
vladys Posted October 10, 2010 Posted October 10, 2010 La mine nu mai apare casuta cu login apare cea cu register . :|P.S serverul ii pe linux :) [FS] Anti-Weapons Cheat
Silvian Posted October 12, 2010 Posted October 12, 2010 la public OnDialogResponse, pentru cei care nu il au si l-au luat din acel link, sa caute forward si sa mai adauge forward OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
IcE. Posted October 12, 2010 Author Posted October 12, 2010 nu se pune nici un forward. Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!
Silvian Posted October 12, 2010 Posted October 12, 2010 greseala mea, acum am observat ca era deja definita din sa-mp
mcqueen Posted November 21, 2010 Posted November 21, 2010 pff mia dat error X(/*C:\DOCUME~1\GetGo\Desktop\FRESHM~1\pawno\include\utils.inc(1) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(1396) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(1440) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(1469) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(1538) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(1638) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(1661) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(2001) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(2181) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(2216) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(2229) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(2239) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(2268) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(2290) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(2385) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(2400) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(2447) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(2462) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(2515) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(2608) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(2738) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(2935) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(3377) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(3387) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(3397) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(3407) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(3419) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(3757) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4146) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4344) : error 029: invalid expression, assumed zeroC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4345) : error 029: invalid expression, assumed zeroC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4346) : error 029: invalid expression, assumed zeroC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4347) : error 029: invalid expression, assumed zeroC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4347 -- 4348) : warning 215: expression has no effectC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4348) : error 001: expected token: ";", but found "return"C:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4350) : error 055: start of function body without function headerC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4352) : error 021: symbol already defined: "PlayerPlaySound"C:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4354) : error 010: invalid function or declarationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4359) : error 010: invalid function or declarationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4364) : error 010: invalid function or declarationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4369) : error 010: invalid function or declarationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4374) : error 010: invalid function or declarationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4379) : error 010: invalid function or declarationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4384) : error 010: invalid function or declarationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4389) : error 010: invalid function or declarationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4394) : error 010: invalid function or declarationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4399) : error 010: invalid function or declarationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4404) : error 010: invalid function or declarationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4409) : error 010: invalid function or declarationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4416) : error 010: invalid function or declarationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4629) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(4825) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(5549) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(5586) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(5975) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(6674) : warning 217: loose indentationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(6674) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(6992) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7073) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7137) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7171) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7295) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7713) : warning 219: local variable "string" shadows a variable at a preceding levelC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7714) : warning 217: loose indentationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7714) : error 017: undefined symbol "response"C:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7716) : error 017: undefined symbol "dialogid"C:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7718) : error 017: undefined symbol "inputtext"C:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7721) : warning 217: loose indentationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7721) : error 017: undefined symbol "inputtext"C:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7723) : warning 217: loose indentationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7725) : warning 217: loose indentationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7736) : warning 217: loose indentationC:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7736) : error 017: undefined symbol "dialogid"C:\Documents and Settings\GetGo\Desktop\FreshMania\gamemodes\gf.pwn(7738) : error 017: undefined symbol "inputtext"Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase26 Errors. GOO 77.36.64.43:7777 Fakes-Zone
MyhayMan Posted November 22, 2010 Posted November 22, 2010 cum mut un text draw pe ecran dintr un loc in altul?
Jo!nt Posted November 22, 2010 Posted November 22, 2010 Foloseste asta si data viitoare cauta http://forum.sa-mp.com/showthread.php?t=117851&highlight=zamaroht
MrBlack Posted December 28, 2010 Posted December 28, 2010 Am facut exact cum este aici dar cand dau login apare de 2 ori , register la fel ! nu stiu din ce cauza! Creation's:[Map]Chiliad Stunt for Fun[Map] Plaja LS ( first map)[Tut]Cum sa vezi playerii pe navigator[Tut] Cum sa faci un textdraw cu cati playeri sunt online pe server.[FS] Admin Gun's
bL3s Posted January 8, 2011 Posted January 8, 2011 Si eu am exact aceasi problema.. apare login de 2 ori cand intru.Aveti idee de ce?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now