Jump to content

GeOrGe.XD

Membru
  • Posts

    30
  • Joined

  • Last visited

Everything posted by GeOrGe.XD

  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
  14. GeOrGe.XD

    Problema

    cand pornesc orice gamemode in pc, la pluginuri imi da "Failed". Cum pot rezolva
  15. Am pus in urmatorul fel: Trailer[playerid] = CreateVehicle(450, pX+6, pY+6, pZ+6, vA, -1, -1, -1); SetTimerEx("AttachTrailer", 1000, 0, "i", playerid); DisableRemoteVehicleCollisions(playerid, Trailer[playerid]); Si nu merge, imi puteti spune cum fac sa mearga?
  16. ok, ms Si mai am o problema, la gm saints am dat wipe dupa ce l am modificat (total, aproape) am reusit sa ma inregistrez eu, dar cand cineva vrea sa se inregistreze, nu poate, sti ce are?
  17. [21:22:13] [debug] Run time error 4: "Array index out of bounds" [21:22:13] [debug] Accessing element at index 9 past array upper bound 8 [21:22:13] [debug] AMX backtrace: [21:22:13] [debug] #0 0007d000 in public LoadBizz () from ro-rpg.amx [21:22:13] [debug] #1 0008ac5c in public L_AFK_OnGM () from ro-rpg.amx [21:22:13] [debug] #2 native CallLocalFunction () from samp-server.exe [21:22:13] [debug] #3 00007ba4 in public zcmd_OnGameModeInit () from ro-rpg.amx [21:22:13] [debug] #4 native CallLocalFunction () from samp-server.exe [21:22:13] [debug] #5 000076ec in public SSCANF_OnGameModeInit () from ro-rpg.amx [21:22:13] [debug] #6 00001a54 in public Itter_OnGameModeInit () from ro-rpg.amx [21:22:13] [debug] #7 native CallLocalFunction () from samp-server.exe [21:22:13] [debug] #8 00001130 in public PZone_OnGameModeInit () from ro-rpg.amx [21:22:13] [debug] #9 native CallLocalFunction () from samp-server.exe [21:22:13] [debug] #10 00000be4 in public OnGameModeInit () from ro-rpg.amx
  18. Stiu ca sa se foloseste DisableRemoteVehicleCollisions(playerid, 0), dar daca o bag unde imi creeaza masina la jobul x, dezactivarea se aplica la toate masinile de pe server, cum pot rezolva, ca doar la masina respectiva sa se aplice.
  19. Salut, am facut jobul taietor de lemne si nush cum sa ii pun animatie si timmer la nimatie(adica animatia sa tina fix cat e timerul care sa astepti pana tai lemnul) Imi puteti explica, va rog frumos?
×
×
  • 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.