23.12.2013, 07:52
Hey guys i got still problem with the saving score and money heres the lines it should be Saving the Money/Score
If you can help me please im waiting to be helped Thanks!!
Код:
if (dialogid == DIALOGREG) { new name[MAX_PLAYER_NAME], file[256]; //string[128]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(!response) return Kick(playerid); if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "{00FFFF}Register/Login{FFFFFF}", "Welcome, your not registered mate, input your registration password below\nWere happy you choose us", "Register", "Leave"); dini_Create(file); //dini_IntSet(file, "Password", udb_hash(inputtext)); dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0); //dini_IntSet(file, "Money",PlayerInfo[playerid][pCash] = 0); //dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0); //SendClientMessage(playerid,COLOR_YELLOW,"[SYSTEM]: You have Registerd in World of Stunting Server! Welcome !"); gPlayerLogged[playerid] = 1; } if (dialogid == DIALOGLOG) { new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(!response) return Kick(playerid); if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "{00FFFF}Register/Login{FFFFFF}", "Welcome back to World of Stunting,Inpute your password below\nWere happy you choose us", "Login", "Leave"); new tmp; tmp = dini_Int(file, "Password"); if(udb_hash(inputtext) != tmp) { SendClientMessage(playerid, COLOR_RED, "Wrong Password sir."); ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "{00FFFF}Register/Login{FFFFFF}", "Welcome back to World of Stunting,Inpute your password below\nWere happy you choose us", "Login", "Leave"); } else { gPlayerLogged[playerid] = 1; PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel"); SetPlayerScore(playerid, PlayerInfo[playerid][pScore]); GivePlayerMoney(playerid, dini_Int(file, "Money")-GetPlayerMoney(playerid)); //SendClientMessage(playerid,COLOR_RED, "[SYSTEM]: Successfully logged in!"); } }