GvaKO 0 Odesláno: 29. Říjen, 2012 Share Odesláno: 29. Říjen, 2012 Mám registráciu , normalne sa regnem vsetko v poho v code neni ani error ani warning , ale ked pride druhy hrac tak mu da moje veci admin lvl prukazy atd... Pls kde je chyba pls velmi to potrebujem opravit neviem si rady public OnPlayerConnect(playerid) { TextDrawShowForPlayer(playerid, TextDraw[PlayerConnect_text]); TextDrawShowForPlayer(playerid, TextDraw[PlayerConnect_text2]); TextDrawShowForPlayer(playerid, TextDraw[PlayerConnect_text3]); TextDrawShowForPlayer(playerid, TextDraw[PlayerConnect_text4]); if(playerid > Connects) Connects = playerid; //Showed[playerid] = false; Logged[playerid] = false; OnPlayerConnectCp(playerid); LoadPlayerVehicles(playerid); // Property PlayerCP[playerid] = -1; PlayerIN[playerid] = -1; new slot = GetPlayerPropertyID(playerid); if(slot > -1){ PropertyConnect[slot] = gettime(); } new str[100]; format(str,100,PLAYER_FILE,DeCode(Jmeno(playerid))); if(fexist(str)) //atd QDIALOG:register(){ if(response){ if(!inputtext[0]) return Dialog(playerid, 1, "{FF0000}Register", "{FFFFFF}Musíš sa zaregistrovať na server ..\n\nZadaj heslo, ktorým sa budeš prihlasovať. \n\n{FF0000}Heslo Nezabudni", "Dobre", "Odísť", "register"); new str[100]; format(str,100,PLAYER_FILE,DeCode(Jmeno(playerid))); new File:file = fopen(str,io_write); fclose(file); SetPVarInt(playerid,"Heslo",Hash(inputtext)); Logged[playerid] = true; }else Kick(playerid); return true; } QDIALOG:login(){ if(response){ new str[100]; format(str,100,PLAYER_FILE,DeCode(Jmeno(playerid))); new File:file = fopen(str,io_read); fread(file,str); if(Hash(inputtext) == strval(str)){ fread(file,str); GivePlayerMoney(playerid,strval(str)); //SetPlayerSkin(playerid,strval(str)); fread(file,str); den[playerid] = strval(str); //atd SCM(playerid,MODRA,"Úspešne prihlásený !"); SetPVarInt(playerid,"Heslo",Hash(inputtext)); Logged[playerid] = true; }else{ Dialog(playerid, 1, "{FF0000}Login", "Zlé heslo !\n{FFFFFF}Zadaj heslo ktoré si použil pri registrácii.", "Dobre", "Odísť", "login"); } fclose(file); }else Kick(playerid); return true; } [/pastebin] Link to comment Share on other sites More sharing options...
Kopi 2 Odesláno: 29. Říjen, 2012 Share Odesláno: 29. Říjen, 2012 ukaž onplayerconnect btw: cez čo maš registračku? Link to comment Share on other sites More sharing options...
_-Honza-_ 9 Odesláno: 29. Říjen, 2012 Share Odesláno: 29. Říjen, 2012 dej do disconnectu treba jak mas admin lvl lvl[playerid] = 0; misto lvl[playerid] si dej vlastni promenou pro admin level Link to comment Share on other sites More sharing options...
GvaKO 0 Odesláno: 29. Říjen, 2012 Author Share Odesláno: 29. Říjen, 2012 máš ho tam Link to comment Share on other sites More sharing options...
_-Honza-_ 9 Odesláno: 29. Říjen, 2012 Share Odesláno: 29. Říjen, 2012 co jako? A mimochodem ta registrace je pres fwrite to asi neznas a navic je to FACE RZE OD QWERA Link to comment Share on other sites More sharing options...
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