#Teddy
Membru-
Posts
70 -
Joined
-
Last visited
-
Days Won
2
#Teddy last won the day on March 14 2015
#Teddy had the most liked content!
Recent Profile Visitors
841 profile views
#Teddy's Achievements
-
Problema "cache_get_field_content_int" [MySQL R39]
#Teddy replied to #Teddy's question in Arhivă probleme
Degeaba. -
Problema "cache_get_field_content_int" [MySQL R39]
#Teddy replied to #Teddy's question in Arhivă probleme
Am pus in comentariu tot ce a fost legat de ini, pentru a vedea daca intr-adevar de la asta provin acele erori, insa raspunsul este tot negativ...tot apar acele erori. -
Problema "cache_get_field_content_int" [MySQL R39]
#Teddy replied to #Teddy's question in Arhivă probleme
Pe INI am doar logurile si inca ceva care salveaza o functie dintr-o anumita factiune (mai exact salveaza banii). -
Problema "cache_get_field_content_int" [MySQL R39]
#Teddy replied to #Teddy's question in Arhivă probleme
Dupa cum am precizat, inainte asa era, in forma in care mi-ai dat-o tu, insa...degeaba. Aceste erori tot apareau. Am constatat oricum, ca mai am o problema legata de cache_get_field_content , mai exact nu incarca datele din baza de date, aceasta fiind de forma: cache_get_field_content(i, "carPlate", CarData[carPlate], M_Connect); -
Problema intalnita (descriere): M-am hotarat sa trec serverul de pe o versiune mai mica de mysql, la ultima (R39). Am rescris scriptul, l-am testat..merge, desi..unele date salvate in baza de date a serverului, au disparut. Ero(area / rile) / warning-(ul / urile): La deschiderea serverului, apare asta in mysql_log (tin sa precizez, ca aceeasi eroare o intalnesc si la cache_get_field_content_float): [18:56:28] [ERROR] cache_get_field_content_int - invalid datatype [18:56:28] [ERROR] cache_get_field_content_int - invalid datatype [18:56:28] [ERROR] cache_get_field_content_int - invalid datatype [18:56:28] [ERROR] cache_get_field_content_int - invalid datatype [18:56:28] [ERROR] cache_get_field_content_int - invalid datatype [18:56:28] [ERROR] cache_get_field_content_int - invalid datatype [18:56:28] [ERROR] cache_get_field_content_int - invalid datatype [18:56:28] [ERROR] cache_get_field_content_int - invalid datatype [18:56:28] [ERROR] cache_get_field_content_int - invalid datatype [18:56:28] [ERROR] cache_get_field_content_int - invalid datatype [18:56:28] [ERROR] cache_get_field_content_int - invalid datatype Liniile de cod / sursa / script-ul(obligatoriu): PlayerData[extraid][pPos][2] = cache_get_field_content_float(0, "PosZ", M_Connect); PlayerData[extraid][pSkin] = cache_get_field_content_int(0, "Skin", M_Connect); Imagini / Video (optional): Nu este nevoie Ati incercat sa rezolvati singur?: Da, am cautat problema asta pe internet, insa fara rezultat. Am intrat in a_mysql.inc sa vad daca parametrii sunt corecti. Desi inainte era: PlayerData[extraid][pSkin] = cache_get_field_content_int(0, "Skin"); tot aceste erori dadea. OFF: Bug super naspa la code
-
Incearca asa: if(dialogid == DIALOG_SET_EMAIL) { new lsMail[128]; if (sscanf(inputtext, "s[256]", lsMail)) { if(PlayerInfo[playerid][Language]==0) { ShowPlayerDialog( playerid, DIALOG_SET_EMAIL, DIALOG_STYLE_INPUT, "E-Mail Set", "{FFFFFF}Hi !nThis server request to each user have set his e-mail, for differite reasonsn{FF0000}Please type your e-mail below:", "Set", "" ); } if(PlayerInfo[playerid][Language]==1) { ShowPlayerDialog( playerid, DIALOG_SET_EMAIL, DIALOG_STYLE_INPUT, "E-Mail Set", "{FFFFFF}Buna !nAcest server are nevoie sa iti setezi e-mailul contului tau, pentru diferite motiive.n{FF0000}Te rugam, scrie-ti e-mailul:", "Set", "" ); } } if (strlen(lsMail) < 8 || strlen(lsMail) > 60) return ShowPlayerDialog( playerid, DIALOG_SET_EMAIL, DIALOG_STYLE_INPUT, "E-Mail Set", "{FFFFFF}Buna !nAcest server are nevoie sa iti setezi e-mailul contului tau, pentru diferite motiive.n{FF0000}Te rugam, scrie-ti e-mailul:", "Set", "" ); if (strfind(lsMail, "@", false) == -1 || strfind(lsMail, ".", false) == -1) return ShowPlayerDialog( playerid, DIALOG_SET_EMAIL, DIALOG_STYLE_INPUT, "E-Mail Set", "{FFFFFF}Buna !nAcest server are nevoie sa iti setezi e-mailul contului tau, pentru diferite motiive.n{FF0000}Te rugam, scrie-ti e-mailul:", "Set", "" ); mysql_real_escape_string(lsMail, lsMail); format(gsQuery, 256, "UPDATE `Accounts` SET `E-Mail` = '%s' WHERE `Key` = %d", lsMail, PlayerInfo[playerid][AccID]); mysql_function_query(g_Handle, gsQuery, false, "", ""); format(PlayerInfo[playerid], 128, "%s", lsMail); return (1); }
-
mysql log spune ceva?
-
Completeaza asta: if(PlayerInfo[target][pFMember] == 0) FactionName = "Civilian"; else if(PlayerInfo[target][pFMember] == 1) FactionName = "Police"; else if(PlayerInfo[target][pFMember] == 2) FactionName = "F.B.I"; cu toate factiunile active pe server. Exemplu: if(PlayerInfo[target][pFMember] == 0) FactionName = "Civilian"; else if(PlayerInfo[target][pFMember] == 1) FactionName = "Police"; else if(PlayerInfo[target][pFMember] == 2) FactionName = "F.B.I"; else if(PlayerInfo[target][pFMember] == 3) FactionName = "Mecanica"; else if(PlayerInfo[target][pFMember] == 4) FactionName = "Primar"; Daca tu ai lasat comanda exact cum ti-am dat-o eu, si tu te aflii intr-o factiune ce are ID-ul mai mare decat 2 (factiunea la care m-am oprit), nu va aparea nimic.
-
Nu prea inteleg, tu ai mai multe DMV-uri si presupun ca unul dintre ele se afla deja in gamemode si se foloseste de functia TakingLesson[playerid], care, daca este setata pe 1 (variabila fiind "activa", adica ai inceput testul de conducere), te lasa sa intri in masina, in caz contrar te scoate din masina daca serverul depisteaza ca functia TakingLesson[playerid], este setata pe 0. Daca vrei sa folosesti un sistem nou de DMV, scoate-l pe cel din gamemode si inlocuieste-l.
-
Din ce script mi-ai dat tu, nu prea gasesc faza cu licenta de condus. Cauta mesajul "You can't drive this vehicle because you don't have a driver license".
-
Incearca asa: if(strcmp(cmd, "/id", true) == 0) { if(IsPlayerConnected(playerid)) { new FactionName[150]; //Ti-am pus un string mai mare in cazul in care o factiune are un nume mai lung tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "{B8DBFF}Syntax: /id [playerid/PartOfName]"); return 1; } new target; target = ReturnUser(tmp); new sstring[128];//era 256 if(IsPlayerConnected(target)) { if(target != INVALID_PLAYER_ID) { //------------------------------------------------------------------------------ if(PlayerInfo[target][pFMember] == 0) FactionName = "Civilian"; else if(PlayerInfo[target][pFMember] == 1) FactionName = "Police"; else if(PlayerInfo[target][pFMember] == 2) FactionName = "F.B.I"; //------------------------------------------------------------------------------ GetPlayerName(target, giveplayer, sizeof(giveplayer)); format(sstring, sizeof(sstring), "{FFFFCC}ID: (%d) %s | Level %d | Factiune: %s (Rank %d)",target,giveplayer,PlayerInfo[target][pLevel],FactionName,PlayerInfo[target][pRank]); SendClientMessage(playerid, COLOR_YELLOW, sstring); } } } return 1; }
-
Cauta in gamemode (nu filterscript-ul DMV) la callback-ul OnPlayerEnterVehicle sau OnPlayerStateChange functia RemovePlayerFromVehicle, respectiv acel mesaj (You can't drive this vehicle ....). Daca gasesti acea functie in unul dintre cele doua callback-uri, lasa-ne aici bucata de script.
-
http://www.sa-mp.ro/samp-map/
-
Incearca asa: SQL_Function CheckAccountPassword(playerid, password[]) { if (!IsPlayerConnected(playerid)) return (1); new Login_Field[ 256 ], xxstring[512]; cache_get_field_content( 0, "Password", Login_Field, g_Handle ); if (strmatch(password, Login_Field)) { new LastOnline[ 256 ], RegisterDate[ 256 ]; PlayerPlaySound(playerid,1057,0.0,0.0,0.0); format( gsQuery, 128, "UPDATE `Accounts` SET `LoggedIn` = 1,`IP` = '%s',`Lang` = '%d' WHERE `Name` = '%s'", GetPlayerIPEx( playerid ), Lang[ playerid ], PlayerName( playerid ) ); mysql_function_query( g_Handle, gsQuery, false, "", "" ); //----------------------------- Loggin' Into Account -----------------// PlayerInfo[ playerid ][ LoggedIn ] = 1; PlayerInfo[ playerid ][ AccID ] = cache_get_field_content_int( 0, "Key", g_Handle ); PlayerInfo[ playerid ][ pVip ] = cache_get_field_content_int( 0, "Vip", g_Handle ); PlayerInfo[ playerid ][ Level ] = cache_get_field_content_int( 0, "Level", g_Handle ); PlayerInfo[ playerid ][ rVip ] = cache_get_field_content_int( 0, "rVip", g_Handle ); PlayerInfo[ playerid ][ bKillingSpree ] = cache_get_field_content_int( 0, "BestKillings", g_Handle ); PlayerInfo[ playerid ][ KillingSpree ] = cache_get_field_content_int( 0, "KillingSpree", g_Handle ); PlayerInfo[ playerid ][ Drugs ] = cache_get_field_content_int( 0, "Drugs", g_Handle ); PlayerInfo[ playerid ][ Coins ] = cache_get_field_content_int( 0, "Coins", g_Handle ); PlayerInfo[ playerid ][ PosRespect ] = cache_get_field_content_int( 0, "Positive", g_Handle ); PlayerInfo[ playerid ][ NegRespect ] = cache_get_field_content_int( 0, "Negative", g_Handle ); PlayerInfo[ playerid ][ SAdmin ] = cache_get_field_content_int( 0, "SAdmin", g_Handle ); PlayerInfo[ playerid ][ FavSkin ] = cache_get_field_content_int( 0, "FavSkin", g_Handle ); PlayerInfo[ playerid ][ rank ] = cache_get_field_content_int( 0, "ClanRank", g_Handle ); PlayerInfo[ playerid ][ c_points ] = cache_get_field_content_int( 0, "ClanPoints", g_Handle ); PlayerInfo[ playerid ][ c_deaths ] = cache_get_field_content_int( 0, "ClanDeaths", g_Handle ); PlayerInfo[ playerid ][ PKicks ] = cache_get_field_content_int( 0, "Kicks", g_Handle ); PlayerInfo[ playerid ][ PBans ] = cache_get_field_content_int( 0, "Bans", g_Handle ); PlayerInfo[ playerid ][ PJails ] = cache_get_field_content_int( 0, "Jails", g_Handle ); PlayerInfo[ playerid ][ PWarns ] = cache_get_field_content_int( 0, "Warns", g_Handle ); PlayerInfo[ playerid ][ PClearCH ] = cache_get_field_content_int( 0, "ClearChats", g_Handle ); PlayerInfo[ playerid ][ PReactions ] = cache_get_field_content_int( 0, "ReactionTest", g_Handle ); PlayerInfo[ playerid ][ PMaths ] = cache_get_field_content_int( 0, "MathTest", g_Handle ); PlayerInfo[ playerid ][ PMutes ] = cache_get_field_content_int( 0, "Mutes", g_Handle ); PlayerInfo[ playerid ][ Property ] = cache_get_field_content_int( 0, "Property", g_Handle ); PlayerInfo[ playerid ][ Jailed ] = cache_get_field_content_int( 0, "Jailed", g_Handle ); PlayerInfo[ playerid ][ Frozen ] = cache_get_field_content_int( 0, "Frozen", g_Handle ); PlayerInfo[ playerid ][ Kills ] = cache_get_field_content_int( 0, "Kills", g_Handle ); PlayerInfo[ playerid ][ Deaths ] = cache_get_field_content_int( 0, "Deaths", g_Handle ); PlayerInfo[ playerid ][ rAdmin ] = cache_get_field_content_int( 0, "RAdmin", g_Handle ); PlayerInfo[ playerid ][ D_Score ] = cache_get_field_content_int( 0, "DuelScore", g_Handle ); PlayerInfo[ playerid ][ Race_Score ] = cache_get_field_content_int( 0, "RaceScore", g_Handle ); PlayerInfo[ playerid ][ Stunt_Score ] = cache_get_field_content_int( 0, "StuntScore", g_Handle ); PlayerInfo[ playerid ][ Drift_Score ] = cache_get_field_content_int( 0, "DriftScore", g_Handle ); PlayerInfo[ playerid ][ CarID ] = cache_get_field_content_int( 0, "OwnedCarID", g_Handle ); PlayerInfo[ playerid ][ szOwnedHouseID ] = cache_get_field_content_int( 0, "HouseID", g_Handle ); PlayerInfo[ playerid ][ P_BANK_MONEY ] = cache_get_field_content_int( 0, "BankMoney", g_Handle ); Lang[ playerid ] = cache_get_field_content_int( 0, "Lang", g_Handle ); Users[ playerid ][ gang ] = cache_get_field_content_int( 0, "GangID", g_Handle ); Users[ playerid ][ g_Kills ] = cache_get_field_content_int( 0, "GangKills", g_Handle ); Users[ playerid ][ g_Deaths ] = cache_get_field_content_int( 0, "GangDeaths", g_Handle ); Users[ playerid ][ isLeader ] = cache_get_field_content_int( 0, "GangRank", g_Handle ); Users[ playerid ][ g_Warns ] = cache_get_field_content_int( 0, "GangWarns", g_Handle ); Users[ playerid ][ g_Captures ] = cache_get_field_content_int( 0, "GangCaptures", g_Handle ); Users[ playerid ][ g_Points ] = cache_get_field_content_int( 0, "GangPoints", g_Handle ); PlayerInfo[ playerid ][ NoPM ] = cache_get_field_content_int( 0, "NoPM", g_Handle ); PlayerInfo[ playerid ][ GotoIgnored ] = cache_get_field_content_int( 0, "NoGoto", g_Handle ); PlayerInfo[ playerid ][ Ignore_Spec ] = cache_get_field_content_int( 0, "NoSpec", g_Handle ); cache_get_field_content( 0, "E-Mail", Login_Field, g_Handle ); format( PlayerInfo[ playerid ][ EMail ], 128, "%s", Login_Field ); SetPVarFloat( playerid, "vSpawn_X", cache_get_field_content_float( 0, "vSpawn_X", g_Handle ) ); SetPVarFloat( playerid, "vSpawn_Y", cache_get_field_content_float( 0, "vSpawn_Y", g_Handle ) ); SetPVarFloat( playerid, "vSpawn_Z", cache_get_field_content_float( 0, "vSpawn_Z", g_Handle ) ); SetPVarFloat( playerid, "vSpawn_A", cache_get_field_content_float( 0, "vSpawn_A", g_Handle ) ); ResetPlayerMoney( playerid ); GivePlayerMoney( playerid, cache_get_field_content_int( 0, "Cash", g_Handle ) ); SetPVarInt( playerid, "sMoney", cache_get_field_content_int( 0, "Cash", g_Handle ) ); SetPlayerScore( playerid, cache_get_field_content_int( 0, "Score", g_Handle ) ); cache_get_field_content( 0, "Online", Login_Field, g_Handle ); sscanf( Login_Field, "p<:>iii", PlayerInfo[ playerid ][ hours ], PlayerInfo[ playerid ][ mins ], PlayerInfo[ playerid ][ secs ] ); cache_get_field_content( 0, "LastOn", LastOnline, g_Handle ); cache_get_field_content( 0, "RegisterDate", RegisterDate, g_Handle ); cache_get_field_content( 0, "Rank", Login_Field, g_Handle ); format( PlayerInfo[ playerid ][ RankName ], 25, Login_Field ); cache_get_field_content( 0, "Description1", Login_Field, g_Handle ); format( PlayerInfo[ playerid ][ Description1 ], 128, "%s", Login_Field ); cache_get_field_content( 0, "Description2", Login_Field, g_Handle ); format( PlayerInfo[ playerid ][ Description2 ], 128, "%s", Login_Field ); cache_get_field_content( 0, "Description3", Login_Field, g_Handle ); format( PlayerInfo[ playerid ][ Description3 ], 128, "%s", Login_Field ); cache_get_field_content( 0, "ClanJoined", Login_Field, g_Handle ); format( PlayerInfo[ playerid ][ JoinedInClan ], 50, Login_Field ); cache_get_field_content( 0, "Clan", Login_Field, g_Handle ); format( PlayerInfo[ playerid ][ Clan ], 25, "%s", Login_Field ); cache_get_field_content( 0, "ClanOnline", Login_Field ); sscanf( Login_Field, "p<:>iii", PlayerInfo[ playerid ][ clan_H ], PlayerInfo[ playerid ][ clan_M ], PlayerInfo[ playerid ][ clan_S ] ); cache_get_field_content( 0, "SavingSts", Login_Field, g_Handle ); sscanf( Login_Field, "p<,>ii", PlayerInfo[ playerid ][ p_HoldSaving ], PlayerInfo[ playerid ][ p_VehicleHoldSaving ] ); if ( PlayerInfo[ playerid ][ Jailed ] >= 1 ) { cache_get_field_content( 0, "JailTime", Login_Field, g_Handle ); sscanf( Login_Field, "p<:>ii", gTime[ playerid ][ 0 ], gTime[ playerid ][ 1 ] ); } if ( PlayerInfo[ playerid ][ Frozen ] == 1 ) { cache_get_field_content( 0, "FreezeTime", Login_Field, g_Handle ); sscanf( Login_Field, "p<:>ii", gTime[ playerid ][ 0 ], gTime[ playerid ][ 1 ] ); } if ( PlayerInfo[ playerid ][ CarID ] != 0 ) { format( gsQuery, 128, "SELECT * FROM `PersonalVehicles` WHERE `Owner` = '%s'", PlayerName( playerid ) ); mysql_function_query( g_Handle, gsQuery, true, "LoadPersonalVehicleInfo", "i", playerid ); } if ( !strmatch( PlayerInfo[ playerid ][ Clan ], "None" ) ) { format( gsQuery, 256, "SELECT * FROM `Clans` WHERE `name` = '%s'", PlayerInfo[ playerid ][ Clan ] ); mysql_function_query( g_Handle, gsQuery, true, "LoadClanDetails", "i", playerid ); } { switch( Lang[ playerid ] ) { case 0: { format(xxstring, 512, "{fcfcfc}Hi [ {c2fc00}%s{fcfcfc} ]n {fcfcfc}You have been LoggedIn:nn {FF0000}• {fcfcfc}Admin Level: [ {c2fc00}%d{fcfcfc} ]n {FF0000}• {fcfcfc}VIP Level: [ {c2fc00}%d{fcfcfc} ]n {FF0000}• {fcfcfc}Stats Note: [ {c2fc00}%d{fcfcfc}/{c2fc00}10{fcfcfc} ]nn {FF0000}• {fcfcfc}Use {c2fc00}/Stats{fcfcfc} for more details!", PlayerName(playerid), PlayerInfo[playerid][Level], PlayerInfo[playerid][pVip], GiveNote(playerid)); return ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "{0066CC}X{FFFF00}S{FF0000}G{AFAFAF} - {fcfcfc}Account {c2fc00}Info", xxstring, "Ok",""); } case 1: { format(xxstring, 512, "{fcfcfc}Salut [ {c2fc00}%s{fcfcfc} ]n {fcfcfc}Ai fost logat cu succes:nn {FF0000}• {fcfcfc}Admin Level: [ {c2fc00}%d{fcfcfc} ]n {FF0000}• {fcfcfc}VIP Level: [ {c2fc00}%d{fcfcfc} ]n {FF0000}• {fcfcfc}Stats Note: [ {c2fc00}%d{fcfcfc}/{c2fc00}10{fcfcfc} ]nn {FF0000}• {fcfcfc}Foloseste {c2fc00}/Stats{fcfcfc} pentru mai multe detalii!", PlayerName(playerid), PlayerInfo[playerid][Level], PlayerInfo[playerid][pVip], GiveNote(playerid)); return ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "{0066CC}X{FFFF00}S{FF0000}G{AFAFAF} - {fcfcfc}Account {c2fc00}Info", xxstring, "Ok",""); } } } } else { PlayerInfo[ playerid ][ FailLogin ]++; if ( PlayerInfo[ playerid ][ FailLogin ] == MAX_FAIL_LOGINS ) { format( gsString, 144, "*** {00FF00}%s(%d) {FFF1AF}has been kicked. Reason: {FF0000}Failed Logins{FFF1AF}!", PlayerName( playerid ), playerid ); SendClientMessageToAll( COLOR_GREY, gsString ); Kick( playerid ); } switch( Lang[ playerid ] ) { case 0: format( gsString, 256, "ttt{FF0000}ACCOUNT:nn{ACACAC}Login failed! Incorrect Password.nATTEMPTS: {FF0000}%d/%dnn{00FF00}PONT: {ACACAC}Change your '{FF0000}Name{ACACAC}' if this isn't your account name.", PlayerInfo[ playerid ][ FailLogin ], MAX_FAIL_LOGINS ); case 1: format( gsString, 256, "tttt{FF0000}CONT:nn{ACACAC}Logarea nu a reusit! Parola Incorecta.nINCERCARI: {FF0000}%d/%dnn{00FF00}PONT: {ACACAC}Schimbati '{FF0000}Numele{ACACAC}' daca acesta nu este numele accountului tau.", PlayerInfo[ playerid ][ FailLogin ], MAX_FAIL_LOGINS ); } ShowPlayerDialog( playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FFFFFF}Login your account", gsString, "Login", "New Name" ); } return ( 1 ); }