26.06.2009, 10:48
All GF Edits: For switch your GM's old Mysql plugin to this plugin, watch.
I working about this, for 4 days. I solved this problem.
Step 1: Find samp_mysql_ in your script. Change this to mysql_
Step 2: Change a_sampmysql to a_mysql
Step 3: Add G_Stylezz plugin to your plugins folder.
Step 4: Edit your server.cfg (add: plugins mysql)
Step 5: Find OnPlayerLogin in your script.
Step 6: Find MySQLCheckConnection change to MYSQLBaglantiKontrol
Change function to:
NOT: Adapt this new function to your script
Add:
http://cyberguerilla.pastebin.com/f7f0a01da
NOT: Adapt this new function to your script too!
Sorry for my English
I working about this, for 4 days. I solved this problem.
Step 1: Find samp_mysql_ in your script. Change this to mysql_
Step 2: Change a_sampmysql to a_mysql
Step 3: Add G_Stylezz plugin to your plugins folder.
Step 4: Edit your server.cfg (add: plugins mysql)
Step 5: Find OnPlayerLogin in your script.
Step 6: Find MySQLCheckConnection change to MYSQLBaglantiKontrol
Change function to:
Код:
public OnPlayerLogin(playerid,password[]) { MYSQLBaglantiKontrol(); new tmp2[256]; new string2[64]; new Isim[MAX_PLAYER_NAME]; GetPlayerName(playerid, Isim, sizeof(Isim)); new query[MAX_STRING]; new query2[MAX_STRING]; format(query,sizeof(query),"SELECT * FROM `oyuncular` WHERE Name = '%s' AND Password = '%s'",Isim,password); mysql_query(query); mysql_store_result(); if(mysql_num_rows() == 1) { mysql_free_result(); MYSQLOyuncuGiris(playerid, PlayerInfo[playerid][pSQLID]); } else { mysql_free_result(); SendClientMessage(playerid, COLOR_WHITE, "SUNUCU: Sifrenizi yanlis girdiniz."); gPlayerLogTries[playerid] += 1; if(gPlayerLogTries[playerid] == 4) { Ban(playerid); } return 1; } PlayerInfo[playerid][pAdjustable] = 0; NormalParaSil(playerid); ConsumingMoney[playerid] = 1; NormalParaVer(playerid,PlayerInfo[playerid][pCash]); CurrentMoney[playerid] = PlayerInfo[playerid][pCash]; if(PlayerInfo[playerid][pReg] == 0) { new tckimlik = 10000000000 + random(24000000000); format(query2, sizeof(query2), "SELECT * FROM oyuncular WHERE LOWER(TC) = LOWER('%s')", tckimlik); mysql_query(query2); mysql_store_result(); if(mysql_num_rows() == 0) { PlayerInfo[playerid][pTC] = tckimlik; PlayerInfo[playerid][pReg] = 1; } mysql_free_result(); } if(PlayerInfo[playerid][pHesapKilit] == 1) { Ban(playerid); } if (PlayerInfo[playerid][pHikayeKabul] == 0) { SendClientMessage(playerid, COLOR_LIGHTRED, "..:BILGI: Hikayeniz henuz kontrol edilmemis."); SendClientMessage(playerid, COLOR_LIGHTRED, "..:BILGI: Hikayeniz kontrol edilince size E-Posta ile bildirilecektir."); Kick(playerid); } if(PlayerInfo[playerid][pKO] == 1) { format(string2, sizeof(string2), "..:BILGI: Hayatinizi kaybettiniz. Yeni bir hesap aliniz."); SendClientMessage(playerid, COLOR_WHITE, string2); Kick(playerid); } if(PlayerInfo[playerid][pVaaz] > 0) { SendClientMessage(playerid, COLOR_WHITE,"..:BILGI: Vaaziniz sonra erdi."); VaazBitir(playerid); PlayerInfo[playerid][pVaaz] = 0; } if (PlayerInfo[playerid][pDonateRank] > 0) { SendClientMessage(playerid, COLOR_WHITE,"..:BILGI: Siz ust seviye bir kullanicisiniz."); } new isim[MAX_PLAYER_NAME], soyisim[MAX_PLAYER_NAME]; RPName(PlayerName(playerid),isim,soyisim) format(string2, sizeof(string2), "..:BILGI: Sayin %s, hosgeldiniz.",soyisim); SendClientMessage(playerid, COLOR_WHITE,string2); printf("%s giris yapti.",Isim); new nxtlevel = PlayerInfo[playerid][pLevel]+1; new expamount = nxtlevel*levelexp; PlayerInfo[playerid][pSeviyeTavan] = expamount; SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1); gPlayerLogged[playerid] = 1; SpawnPlayer(playerid); format(tmp2, sizeof(tmp2), "~w~Hosgeldiniz ~n~~y~ %s", Isim); DateProp(playerid); GameTextForPlayer(playerid, tmp2, 5000, 1); SendClientMessage(playerid, COLOR_YELLOW, motd); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pMaskeKullanim] == 1) { ShowPlayerNameTagForPlayer(playerid, i, 0); } } } PlayerInfo[playerid][pMuted] = 0; OnPlayerUpdate(playerid); return 1; }
Add:
http://cyberguerilla.pastebin.com/f7f0a01da
NOT: Adapt this new function to your script too!
Sorry for my English
