29.06.2015, 18:36
I spent my whole day on trying to figure out whats going on and I am going to flip out I dont get whats wrong can anyone help. So what are the problems. 1st problem is when I connect on server and when I register it all saves fine in users folder I open it and I see its all there how it should be but when I go out of server and back on it shows me a login dialo I type my password it wont let me in i try slowly like 5 times and it says it is wrong password and then I went to my script and I had my old game mode with the same login system and I copy this part
and replace it with my problematic part this one
As u can see there is no difference between them except my second part have CancelSelectTextDraw(playerid); and thats it. And when I replace them it works fine but then here it goes second problem. It spawns me with no money but it should becouse I typed GivePlayerMoney(playerid, PlayerInfo[playerid][pNovac]); and in my .ini file I can see that it saved 1000$ becouse I saved it when the player register to give him the money and save the file. And 3rd problem is that I just cant figure out what the actual f**k this spawns mean I tried setplayerpos setplayerskin setspawninfo addplayerclass and no one will spawn me with the skin that I saved in PlayerInfo[playerid][pSkin]. It spawns my weapons but it wont spawn me in the skin. You can see ondialogrespons I have if statment on DIALOG_SPOL if(listitem == 0) PlayerInfo[playerid][pSkin] = 59; and I save it and it did save but I cannot spawn as that skin. So if u know how to fix this pls help me cuz I am going to kill my self I scripted 3 days in a row and I did a perfect login/register system and yesterday I scripted dynamic organization and I succeed but the spawn started to bother me and suddenly my login doesnt work. I tried to fix it but I was to tired to even try and I just dont get it.
[EDIT]
Yea and here is the Pastebin: http://pastebin.com/sYQ557hP
Код:
if(dialogid == DIALOG_LOGIN) { if(!response) return Kick(playerid); if(response) { new hashpass[129]; WP_Hash(hashpass,sizeof(hashpass),inputtext); if(!strcmp(hashpass, PlayerInfo[playerid][pPass], false)) { INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid); TogglePlayerSpectating(playerid, 0); GivePlayerMoney(playerid,PlayerInfo[playerid][pNovac]); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_BIJELA"Balkan Godfather-"COL_ZLATNA"Login",""COL_BIJELA"Unijeli ste "COL_CRVENA"pogresnu Lozinku!\n\n"COL_BIJELA"Pokusaj "COL_ZLATNA"Ponovo!","Uredu","Odustani"); } } return 1; }
Код:
if(dialogid == DIALOG_LOGIN) { if(!response) return Kick(playerid); if(response) { new hashpass[129]; WP_Hash(hashpass,sizeof(hashpass),inputtext); if(!strcmp(hashpass, PlayerInfo[playerid][pPass], false)) { INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid); TogglePlayerSpectating(playerid, 0); CancelSelectTextDraw(playerid); GivePlayerMoney(playerid,PlayerInfo[playerid][pNovac]); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_BIJELA"Balkan Godfather-"COL_ZLATNA"Login",""COL_BIJELA"Unijeli ste "COL_CRVENA"pogresnu Lozinku!\n\n"COL_BIJELA"Pokusaj "COL_ZLATNA"Ponovo!","Uredu","Odustani"); } } return 1; }
[EDIT]
Yea and here is the Pastebin: http://pastebin.com/sYQ557hP