| Ykr0p[CM] |
Дата: Четверг, 13.08.2015, 22:47 | Сообщение # 3
|
Новичок
Сообщений: 16
Статус: Offline
|
Цитата Амасинк (  ) Функцию сохранения аккаунта вставь в выдачу. я нашел ну там нету чтобы лицензи сохронались а вот паспорт стоит на сохронени или это не тот код вот смотри этот код Код stock OnPlayerUpdateRL(playerid) { if(gPlayerLogged[playerid] == 1 && IsPlayerConnected(playerid)) { new query[500], string[128]; query = "UPDATE `Accounts` SET "; format(PlayerInfo[playerid][pBogerRobs],30,"%d,%d,%d,%d",PlayerInfo[playerid][pBogerRob][0],PlayerInfo[playerid][pBogerRob][1],PlayerInfo[playerid][pBogerRob][2],PlayerInfo[playerid][pBogerRob][3]); acc_float_strcat(query, sizeof(query), "pFuelcar",PlayerInfo[playerid][pFuelcar]); acc_int_strcat(query, sizeof(query), "pLevel",PlayerInfo[playerid][pLevel]); acc_int_strcat(query, sizeof(query), "pExp",PlayerInfo[playerid][pExp]); acc_int_strcat(query, sizeof(query), "pCash",PlayerInfo[playerid][pCash]); acc_int_strcat(query, sizeof(query), "pJailTime",PlayerInfo[playerid][pJailTime]); acc_int_strcat(query, sizeof(query), "pMarried",PlayerInfo[playerid][pMarried]); acc_int_strcat(query, sizeof(query), "pMuteTime",PlayerInfo[playerid][pMuteTime]); acc_int_strcat(query, sizeof(query), "pMuted",PlayerInfo[playerid][pMuted]); acc_int_strcat(query, sizeof(query), "pMobile",PlayerInfo[playerid][pMobile]); acc_int_strcat(query, sizeof(query), "pBank",PlayerInfo[playerid][pBank]); acc_int_strcat(query, sizeof(query), "pZakonp",PlayerInfo[playerid][pZakonp]); acc_int_strcat(query, sizeof(query), "pProz",PlayerInfo[playerid][pProz]); acc_int_strcat(query, sizeof(query), "NZ",PlayerInfo[playerid][pNarcoZavisimost]); acc_int_strcat(query, sizeof(query), "pWanted",PlayerInfo[playerid][pWanted]); acc_int_strcat(query, sizeof(query), "pChas",PlayerInfo[playerid][pChas]); acc_int_strcat(query, sizeof(query), "pOnline",0); acc_int_strcat(query, sizeof(query), "pMin",PlayerInfo[playerid][pMin]); acc_int_strcat(query, sizeof(query), "pSec",PlayerInfo[playerid][pSec]); acc_str_strcat(query, sizeof(query), "pBogerRob",PlayerInfo[playerid][pBogerRobs]); acc_int_strcat(query, sizeof(query), "pPasport",PlayerInfo[playerid][pPasport]); acc_int_strcat(query, sizeof(query), "pDonatemoney2",PlayerInfo[playerid][pDonatemoney2]); strdel(query, strlen(query)-1, strlen(query));//Óäàëÿåì çàïÿòóþ format(string,sizeof(string)," WHERE `ID` = '%d' LIMIT 1",PlayerInfo[playerid][MysqlpID]); strcat(query, string); mysql_function_query(database, query, true, "", "d", playerid); printf("ID: %d - String: %d",PlayerInfo[playerid][MysqlpID],strlen(query)); if(strlen(query) > 600) printf("[ВНИМАНИЕ]: Аккаунт %s - %d [НЕ БЫЛ САХРАНЁН]",Name(playerid),strlen(query)); } return true; }
========================== Помогаю новичкам) ==========================
Сообщение отредактировал Ykr0p[CM] - Четверг, 13.08.2015, 22:55 |
|
|
|
|
| Ykr0p[CM] |
Дата: Пятница, 14.08.2015, 00:11 | Сообщение # 9
|
Новичок
Сообщений: 16
Статус: Offline
|
Цитата Ykr0p[CM] (  ) Ykr0p[CM], проверь с нового аккаунта. Зайди на сервер и через донат не получай права, сядь в кар (не в фагио, а в кар) и посмотри запросит ли тебе права.
Сами лицы то выдаються и паспорт тоже они не сохроняються в бд! дай скайп обговорим и у меня на серве на респе квадрики при заходе нету прав
Да ты прав всё выдаёться при авторизации... я нашел код Код publics: LoginCallback(playerid) { new rows, fields; cache_get_data(rows, fields); if(!rows) { if(GetPVarInt(playerid, "wrongPass") == 2) return DKICK(playerid, "Âû ââåëè 3 ðàçà íåâåðíûé ïàðîëü!"); SetPVarInt(playerid, "wrongPass", GetPVarInt(playerid, "wrongPass")+1); return LoginDialog(playerid); } Block(playerid); SetPlayerTime(playerid, timeserv, 0); gPlayerLogged[playerid] = 1; if(GetPVarInt(playerid,"pREgisrty") == 1) PlayerInfo[playerid][MysqlpID] = cache_get_field_content_int(0, "ID", database), SpawnPlayer(playerid); else format(CommandMas,100,"Âû óñïåøíî àâòîðèçîâàëèñü! ID âàøåãî àêêàóíòà: %d.",PlayerInfo[playerid][MysqlpID]), SendClientMessage(playerid,COLOR_GREY,CommandMas), TogglePlayerSpectating(playerid, 0), SetPVarInt(playerid,"PlayerSpec",1); PlayerInfo[playerid][pTut] = cache_get_field_content_int(0, "pTut", database); cache_get_field_content(0, "pKey", PlayerInfo[playerid][pKey], database, 30); cache_get_field_content(0,"pEmail",PlayerInfo[playerid][pEmail], database, 40); PlayerInfo[playerid][pLevel] = cache_get_field_content_int(0, "pLevel", database); PlayerInfo[playerid][pBoger] = cache_get_field_content_int(0, "pBoger", database); PlayerInfo[playerid][pFuelcar] = cache_get_field_content_float(0, "pFuelcar", database); PlayerInfo[playerid][pHeadValue] = cache_get_field_content_int(0, "pHeadValue", database); PlayerInfo[playerid][pContract] = cache_get_field_content_int(0, "pContract", database); PlayerInfo[playerid][pCar][0] = cache_get_field_content_int(0, "pCar", database); PlayerInfo[playerid][pCar][1] = cache_get_field_content_int(0, "pCar2", database); PlayerInfo[playerid][pHelper] = cache_get_field_content_int(0, "pHelper", database); PlayerInfo[playerid][pDonateRank] = cache_get_field_content_int(0, "pDonateRank", database); PlayerInfo[playerid][pSex] = cache_get_field_content_int(0, "pSex", database); PlayerInfo[playerid][pMuted] = cache_get_field_content_int(0, "pMuted", database); PlayerInfo[playerid][pCash] = cache_get_field_content_int(0, "pCash", database); PlayerInfo[playerid][pDonatemoney2] = cache_get_field_content_int(0, "pDonatemoney2", database); PlayerInfo[playerid][pExp] = cache_get_field_content_int(0, "pExp", database); PlayerInfo[playerid][pKills] = cache_get_field_content_int(0, "pKills", database); PlayerInfo[playerid][pJailed] = cache_get_field_content_int(0, "pJailed", database); PlayerInfo[playerid][pJailTime] = cache_get_field_content_int(0, "pJailTime", database); PlayerInfo[playerid][pLeader] = cache_get_field_content_int(0, "pLeader", database); PlayerInfo[playerid][pMember] = cache_get_field_content_int(0, "pMember", database); PlayerInfo[playerid][pRank] = cache_get_field_content_int(0, "pRank", database); PlayerInfo[playerid][pJob] = cache_get_field_content_int(0, "pJob", database); PlayerInfo[playerid][pChar] = cache_get_field_content_int(0, "pChar", database); PlayerInfo[playerid][pModel] = cache_get_field_content_int(0, "pModel", database); PlayerInfo[playerid][pPnumber] = cache_get_field_content_int(0, "pPnumber", database); PlayerInfo[playerid][pPayDayHad] = cache_get_field_content_int(0, "pPayDayHad", database); PlayerInfo[playerid][pWarns] = cache_get_field_content_int(0, "pWarns", database); PlayerInfo[playerid][punWarns] = cache_get_field_content_int(0, "punWarns", database); PlayerInfo[playerid][punWarnstime] = cache_get_field_content_int(0, "punWarnstime", database); PlayerInfo[playerid][pFuel] = cache_get_field_content_int(0, "pFuel", database); PlayerInfo[playerid][pMarried] = cache_get_field_content_int(0, "pMarried", database); PlayerInfo[playerid][pMuteTime] = cache_get_field_content_int(0, "pMuteTime", database); PlayerInfo[playerid][pMobile] = cache_get_field_content_int(0, "pMobile", database); PlayerInfo[playerid][pBank] = cache_get_field_content_int(0, "pBank", database); player_family [ playerid ] = cache_get_field_content_int(0, "family", database); cache_get_field_content(0,"pDostup",PlayerInfo[playerid][pDostup], database, 34); cache_get_field_content(0,"pIpReg",PlayerInfo[playerid][pIpReg], database, 16); PlayerInfo[playerid][pZakonp] = cache_get_field_content_int(0, "pZakonp", database); PlayerInfo[playerid][pProz] = cache_get_field_content_int(0, "pProz", database); PlayerInfo[playerid][pWanted] = cache_get_field_content_int(0, "pWanted", database); PlayerInfo[playerid][pNarcoZavisimost] = cache_get_field_content_int(0, "NZ", database); PlayerInfo[playerid][pChas] = cache_get_field_content_int(0, "pChas", database); PlayerInfo[playerid][pMin] = cache_get_field_content_int(0, "pMin", database); PlayerInfo[playerid][pSec] = cache_get_field_content_int(0, "pSec", database); PlayerInfo[playerid][pReprimands] = cache_get_field_content_int(0, "pReprimands", database); PlayerInfo[playerid][pAvtovzlom] = cache_get_field_content_int(0, "pAvtovzlom", database); PlayerInfo[playerid][pAtmvzlom] = cache_get_field_content_int(0, "pAtmvzlom", database); PlayerInfo[playerid][pModelid] = cache_get_field_content_int(0, "pModelid", database); PlayerInfo[playerid][pKeymeh] = cache_get_field_content_int(0, "pKeymeh", database); PlayerInfo[playerid][boomBox] = cache_get_field_content_int(0, "boomBox", database); PlayerInfo[playerid][pHouse] = cache_get_field_content_int(0, "pHouse", database); PlayerInfo[playerid][pSiga] = cache_get_field_content_int(0, "pSiga", database); PlayerInfo[playerid][pSpal] = cache_get_field_content_int(0, "pSpal", database); PlayerInfo[playerid][pSgf] = cache_get_field_content_int(0, "pSgf", database); cache_get_field_content(0,"pBogerRob",PlayerInfo[playerid][pBogerRobs], database, 30); cache_get_field_content(0,"pLics",PlayerInfo[playerid][pLics], database, 16); cache_get_field_content(0,"cVehcom",cVehcom[playerid][0], database, 74); cache_get_field_content(0,"cVehcom2",cVehcom[playerid][1], database, 74); cache_get_field_content(0,"pGunSkills",PlayerInfo[playerid][pGunSkills], database, 26); cache_get_field_content(0,"pBandLoad",PlayerInfo[playerid][pBandLoad], database, 26); sscanf(PlayerInfo[playerid][pBogerRobs], "p<,>a<i>[4]",PlayerInfo[playerid][pBogerRob]); sscanf(PlayerInfo[playerid][pLics], "p<,>a<i>[5]",PlayerInfo[playerid][pLic]); sscanf(cVehcom[playerid][0], "p<,>a<i>[14]",cVehcoms[playerid][0]); sscanf(cVehcom[playerid][1], "p<,>a<i>[14]",cVehcoms[playerid][1]); sscanf(PlayerInfo[playerid][pGunSkills], "p<,>a<i>[6]",PlayerInfo[playerid][pGunSKill]); sscanf(PlayerInfo[playerid][pBandLoad], "p<,>a<i>[3]",PlayerInfo[playerid][pBand]); ResetPlayerMoney(playerid); ApplyAnimation(playerid,"BD_FIRE","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"BEACH","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"benchpress","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"BOMBER","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"CAR","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"COP_AMBIENT","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"CRACK","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"CARRY","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"DANCING","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"DEALER","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"FAT","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"GANGS","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"GHANDS","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"GRAFFITI","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"GRAVEYARD","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"MISC","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"SNM","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"VENDING","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"OTB","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"SMOKING","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"SHOP","null",0.0,0,0,0,0,0); ApplyAnimation(playerid,"RIOT","null",0.0,0,0,0,0,0); SetHealth(playerid, 75); if(GetPlayerHouse(playerid) || GetPlayerArendHouse(playerid)) LoadCarPlayerId(playerid,1), LoadCarPlayerId(playerid,2); GangZoneShowForPlayer(playerid, Army, COLOR_YELLOW2); PEfir[playerid] = INVALID_PLAYER_ID; if(player_family [ playerid ])family_info [ player_family [ playerid ] - 1 ] [ f_online ]++; new playersip[16], MySQL[156], year, month, day; getdate(year, month, day); GetPlayerIp(playerid,playersip,sizeof(playersip)); format(MySQL, sizeof(MySQL), "UPDATE `Accounts` SET `pOnline` = '1', `pGetonDate` = '%d/%d/%d', `pGetonIP` = '%s' WHERE `ID` = '%d' LIMIT 1",day,month,year,playersip,PlayerInfo[playerid][MysqlpID]); mysql_function_query(database, MySQL, true, "", "d", playerid); SetPlayerSkills(playerid); return SetSpawnInfo(playerid, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); }
========================== Помогаю новичкам) ==========================
|
|
|
|
|