Jump to content

GeOrGe.XD

Membru
  • Posts

    30
  • Joined

  • Last visited

Profile Information

  • Level of knowledge
    Mediu

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

GeOrGe.XD's Achievements

Contributor

Contributor (5/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. @Maurice, mersii oricum de ajutor, dar am rezolvat singur. Trebuia sa fac asa: PlayerData[playerid][pPin] = cache_get_value_name(0, "Pin", gString); format(PlayerData[playerid][pPin], 5, gString); Oricum iti multumesc.
  2. Acelasi text in game apare... Eu zic ca de la asta este devine if(!strcmp(pin, PlayerData[playerid][pPin], true)) { dar daca pun if(strcmp, pin, bla bla) imi ia orice pin
  3. arata pinul ca in baza de date In baza de date coloana este facuta astfel: `Pin` varchar(4) NOT NULL, Imi arata pinul ca in baza de date, am facut o chiestie: mi am setat pin 0 si am dat pe svr addpin dupa am dat pin, imi zice ca codul este bun si dupa relog codul zice ca este gresit
  4. CMD:pin(playerid, params[]) { new pin[128]; if(PlayerData[playerid][pUnlocked] != 0) return SCM(playerid, COLOR_YELLOW, "Contul tau este deja deblocat."); if(sscanf(params, "s[128]", pin)) return SCM(playerid, COLOR_SERVER, "Sintaxa: /addpin <4-numere>"); if(strlen(pin) != 4) return SCM(playerid, COLOR_SERVER, "Sintaxa: /pin <4-numere>"); if(!IsNumeric(pin)) return SCM(playerid, COLOR_SERVER, "Sintaxa: /pin <4-numere>"); if(!strcmp(pin, PlayerData[playerid][pPin], true)) { PlayerData[playerid][pUnlocked] = 1; SCM(playerid, COLOR_YELLOW, "Contul tau a fost deblocat cu succes!"); } else { SCM(playerid, COLOR_YELLOW, "Ai introdus un PIN gresit!"); } return 1; }
  5. In consola nmk, nu warning, nu erori dar in joc la fel, daca vrei iti arat comanda pin sa vezi
  6. public PlayerLoginDone(playerid) { print(PlayerData[playerid][pPin]); cache_get_value_name_int(0, "ID", PlayerData[playerid][pID]); cache_get_value_name(0, "Name", PlayerData[playerid][pName]); cache_get_value_name(0, "Password", PlayerData[playerid][pPassword]); cache_get_value_name_int(0, "IP", PlayerData[playerid][pIP]); cache_get_value_name(0, "Email", PlayerData[playerid][pEmail]); cache_get_value_name_int(0, "Gender", PlayerData[playerid][pGender]); cache_get_value_name_int(0, "Age", PlayerData[playerid][pAge]); cache_get_value_name_int(0, "RegisterStep", PlayerData[playerid][pRegisterStep]); cache_get_value_name_int(0, "Admin", PlayerData[playerid][pAdmin]); cache_get_value_name_int(0, "Helper", PlayerData[playerid][pHelper]); cache_get_value_name_int(0, "Winner", PlayerData[playerid][pWinner]); cache_get_value_name_int(0, "Skin", PlayerData[playerid][pSkin]); cache_get_value_name_int(0, "DriversLic", PlayerData[playerid][pDriversLic]); cache_get_value_name_int(0, "Money", PlayerData[playerid][pMoney]); cache_get_value_name_int(0, "Level", PlayerData[playerid][pLevel]); cache_get_value_name_int(0, "Pin", PlayerData[playerid][pPin]); cache_get_value_name_int(0, "PinSet", PlayerData[playerid][pPinSet]); if(PlayerData[playerid][pRegisterStep] < 3) { SetPlayerPos(playerid, 1744.4095, -1809.4142, 54.5687); SetPlayerCameraPos(playerid, 1775.1698, -1847.5277, 43.9137); SetPlayerCameraLookAt(playerid, 1800.4873, -1867.0626, 13.5706); switch(PlayerData[playerid][pRegisterStep]) { case 0: return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "{FFFFFF}E-mail:", "{FFFFFF}Introdu adresa de mail mai jos.\n\nExemplu:[email protected]:", "Ok", ""); case 1: return ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_MSGBOX, "{FFFFFF}Sexul:", "{FFFFFF}Selecteaza-ti ce sex sa aiba caracterul tau:", "Barbat", "Femeie"); case 2: return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "{FFFFFF}Varsta:", "{FFFFFF}Introdu varsta ta:", "Ok", ""); } return 1; } SetSpawnInfo(playerid, 0, PlayerData[playerid][pSkin], 1800.1581, -1865.7731, 13.5722, 0, 0, 0, 0, 0, 0, 0), SpawnPlayer(playerid); if(PlayerData[playerid][pAdmin] > 0) { format(gString, sizeof(gString), "SERVER:{FFFFFF} Te-ai logat cu admin nivel %d.",PlayerData[playerid][pAdmin]); SendClientMessage(playerid, COLOR_SERVER,gString); } if(PlayerData[playerid][pHelper] > 0) { format(gString, sizeof(gString), "SERVER:{FFFFFF} Te-ai logat cu helper nivel %d.",PlayerData[playerid][pHelper]); SendClientMessage(playerid, COLOR_SERVER,gString); } if(PlayerData[playerid][pWinner] == 1) SendClientMessage(playerid, COLOR_WHITE, "Your account is upgraded to Winner. ;)"); SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Anticheat-ul s-a activat cu succes pe contul tau."); SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Forumul nostru este: http://www.forum.localhost.ro"); SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Panelul nostru este: http://www.panel.localhost.ro"); SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Shopul nostru este: http://www.shop.localhost.ro"); if(PlayerData[playerid][pPinSet] == 1) SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Pentru a beneficia de bunurile de pe contul tau foloseste comanda {FFFF4A}[/pin]"); if(PlayerData[playerid][pPinSet] == 0) SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Nu ai un pin setat. Pentru a-ti seta pinul foloseste comanda {FFFF4A}[/addpin]"); GetPlayerMoney(playerid); GivePlayerMoney(playerid, PlayerData[playerid][pMoney]); SetPlayerScore(playerid, PlayerData[playerid][pLevel]); return 1; } La fel "Pin gresit" si in consola nmk
  7. Precizez ca am MySQL R40
  8. in consola arata (NULL) face spam cu (NULL)
  9. if(!strcmp(pin, PlayerData[playerid][pPin], true)) { PlayerData[playerid][pUnlocked] = 1; SCM(playerid, COLOR_YELLOW, "Contul tau a fost deblocat cu succes!"); } else { SCM(playerid, COLOR_YELLOW, "Ai introdus un PIN gresit!"); } Se pare ca este de la acel !strcmp, daca il las fara semnul exclamarii ia orice pin.
  10. [18:37:09] [WARNING] mysql_connect: no password specified [18:37:26] [ERROR] cache_get_value_name: invalid row index '1' (number of rows: '1')
  11. public PlayerLoginDone(playerid) { cache_get_value_name_int(0, "ID", PlayerData[playerid][pID]); cache_get_value_name(0, "Name", PlayerData[playerid][pName]); cache_get_value_name(0, "Password", PlayerData[playerid][pPassword]); cache_get_value_name_int(0, "IP", PlayerData[playerid][pIP]); cache_get_value_name(0, "Email", PlayerData[playerid][pEmail]); cache_get_value_name_int(0, "Gender", PlayerData[playerid][pGender]); cache_get_value_name_int(0, "Age", PlayerData[playerid][pAge]); cache_get_value_name_int(0, "RegisterStep", PlayerData[playerid][pRegisterStep]); cache_get_value_name_int(0, "Admin", PlayerData[playerid][pAdmin]); cache_get_value_name_int(0, "Helper", PlayerData[playerid][pHelper]); cache_get_value_name_int(0, "Winner", PlayerData[playerid][pWinner]); cache_get_value_name_int(0, "Skin", PlayerData[playerid][pSkin]); cache_get_value_name_int(0, "DriversLic", PlayerData[playerid][pDriversLic]); cache_get_value_name_int(0, "Money", PlayerData[playerid][pMoney]); cache_get_value_name_int(0, "Level", PlayerData[playerid][pLevel]); cache_get_value_name(1, "Pin", PlayerData[playerid][pPin]); cache_get_value_name_int(0, "PinSet", PlayerData[playerid][pPinSet]); /* new result; cache_get_row_count(result,"Pin"); format(PlayerData[playerid][pPin], 5, "%s", result);*/ if(PlayerData[playerid][pRegisterStep] < 3) { SetPlayerPos(playerid, 1744.4095, -1809.4142, 54.5687); SetPlayerCameraPos(playerid, 1775.1698, -1847.5277, 43.9137); SetPlayerCameraLookAt(playerid, 1800.4873, -1867.0626, 13.5706); switch(PlayerData[playerid][pRegisterStep]) { case 0: return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "{FFFFFF}E-mail:", "{FFFFFF}Introdu adresa de mail mai jos.\n\nExemplu:[email protected]:", "Ok", ""); case 1: return ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_MSGBOX, "{FFFFFF}Sexul:", "{FFFFFF}Selecteaza-ti ce sex sa aiba caracterul tau:", "Barbat", "Femeie"); case 2: return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "{FFFFFF}Varsta:", "{FFFFFF}Introdu varsta ta:", "Ok", ""); } return 1; } SetSpawnInfo(playerid, 0, PlayerData[playerid][pSkin], 1800.1581, -1865.7731, 13.5722, 0, 0, 0, 0, 0, 0, 0), SpawnPlayer(playerid); if(PlayerData[playerid][pAdmin] > 0) { format(gString, sizeof(gString), "SERVER:{FFFFFF} Te-ai logat cu admin nivel %d.",PlayerData[playerid][pAdmin]); SendClientMessage(playerid, COLOR_SERVER,gString); } if(PlayerData[playerid][pHelper] > 0) { format(gString, sizeof(gString), "SERVER:{FFFFFF} Te-ai logat cu helper nivel %d.",PlayerData[playerid][pHelper]); SendClientMessage(playerid, COLOR_SERVER,gString); } if(PlayerData[playerid][pWinner] == 1) SendClientMessage(playerid, COLOR_WHITE, "Your account is upgraded to Winner. ;)"); SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Anticheat-ul s-a activat cu succes pe contul tau."); SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Forumul nostru este: http://www.forum.localhost.ro"); SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Panelul nostru este: http://www.panel.localhost.ro"); SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Shopul nostru este: http://www.shop.localhost.ro"); if(PlayerData[playerid][pPinSet] == 1) SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Pentru a beneficia de bunurile de pe contul tau foloseste comanda {FFFF4A}[/pin]"); if(PlayerData[playerid][pPinSet] == 0) SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Nu ai un pin setat. Pentru a-ti seta pinul foloseste comanda {FFFF4A}[/addpin]"); GetPlayerMoney(playerid); GivePlayerMoney(playerid, PlayerData[playerid][pMoney]); SetPlayerScore(playerid, PlayerData[playerid][pLevel]); return 1; } Iti mai arat si restul?
  12. Am facut sistem de pin pe versiunea de MySQL r40 (ultima) si am probleme: Cand intru in joc zice pin gresit, daca am linia de forma asta cache_get_value_name(0, "Pin", PlayerData[playerid][pPin]); Daca o am de forma: cache_get_value_name_int(1, "Pin", PlayerData[playerid][pPin]); imi ia orice pin, imi poti explica ce trebuie sa fac, in acest caz?
  13. Am facut un sistem de pin, la server foloses R41(ultima versiune pt mysql) Si ma bate o chiestie, cand dau pin <codul> imi zice pin incorect, am incercat sa folosesc (mysql_fetch_field_row(result,"Pin"); format(PlayerInfo[playerid][pPin], 5, "%s", result);) dar da eroare la compilare, ce pot face ca sa mearga Nu mi dau seama ce ar trebuii sa schimb la result si format,ca mysql_fetch_Field_row il modific in cache_get_value_name_int
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.