Jump to content

Punct.

Membru
  • Posts

    488
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Punct.

  1. Punct.

    2 CASE IN LV

    Frumos.. felicitarile mele. 10/10
  2. Punct.

    [Map]O casa in LV

    Vezi ca e intre LS si LV.. E legata de LS casa..
  3. HouseInfo bidimensional.. HouseInfo[houseid][variabila]. Daca sterg [houseid] primesc erori..
  4. Asigura-te ca datele din gamemode pentru baza de date corespund cu cele de la baza de date...
  5. Bun..si la partea care am pus-o mai jos ce pun in loc de houseid? Ca trebuie sa pun ceva.. [pawn] //... HouseInfo[houseid][hEnterX] = x; HouseInfo[houseid][hEnterY] = y; HouseInfo[houseid][hEnterZ] = z; HouseInfo[houseid][hPrice] = pret; HouseInfo[houseid][hLevel] = level; HouseInfo[houseid][hVir] = houseid; format(query, sizeof(query), "INSERT INTO `houses` (`ID`, `EnterX`, `EnterY`, `EnterZ`) VALUES ('%d', '%f', '%f', '%f')", houseid, x, y, z); mysql_query(mysql, query); format(query, sizeof(query), "UPDATE `houses` SET `Pret`='%d' WHERE `ID`='%d'", HouseInfo[houseid][hPrice], houseid); //... [/pawn]
  6. Am bifat A_I in baza de date.. dar comanda pentru facut case e /chouse [level] [pret] [interior] [id]. • Daca merg pe server si fac o casa gen /chouse 2 10000 5 5 si in gamemode am DOAR o casa(id 1), in baza de date se adauga casa numarul 5. Casele 2,3,4 lipsesc.. Si eu as vrea sa nu mai pun id-ul casei.. sa se puna automat id 2... • Daca in baza de date am casa cu id 1 si pe server fac alta casa, tot cu id 1, se modifica cea din baza de date cu datele celei care o fac pe server..
  7. Bun. Si daca modific in baza de date, la script sterg aia cu id-ul casei..? si ce pun in loc.. sa stie ce id se creaza casa..
  8. Nick: Punct. Problema: Am facut o comanda de creat case inspirandu-ma din alta comanda.. dar as vrea, ca atunci cand folosesc comanda sa nu mai introduc id-ul casei.. ca se puna automat urmatorul id.. Erori / warnings: - Lini/script: [pawn] http://pastebin.com/S8retVDE [/pawn] Ai incercat sa rezolvi singur ?: Da..
  9. Ai un model de respectat..
  10. Vezi sa nu fi uitat vreo paranteza prin jurul acelei linii..
  11. Ma duc sa testez. Revin cu edit daca merge sau nu.. Edit: Rezolvat. Multumesc. Se poate da T.C.
  12. Pai..am incercat doar cu iText si m-am incurcat..si am zis sa iau si iText2.. :| cu iText formez cuvantul..si iText2 il voi folosi mai tarziu sa il compar cu o parola
  13. Nick: Punct. Problema: Am facut niste TextDraw-uri cu "A", "B", "C", "D", "Sterge", "Intra". Cand apas pe "A","B","C","D" se formeaza un cuvant cu strcat. Merge bine.. Daca am gresit o litera am pus, cu ajutorul TextDraw-ului "Sterge" sa poti sterge cate o litera. Pana aici merge totul perfect. Acum, daca scriu AAB si sterg B textul devine AA. Daca vreau sa pun orice litera(de exemplu: C) o sa se formeze textul AABC. Deci, B-ul care l-am sters s-a sters doar pana am apasat alta litera. Erori / warnings: - Linii/script: OnPlayerClickPlayerTextDraw [pawn] if(playertextid == Login[0][playerid]) { strcat(iText[playerid], "A"); format(iText2[playerid], sizeof(iText2), "%s", iText[playerid]); PlayerTextDrawSetString(playerid, Login[4][playerid], iText2[playerid]); PlayerTextDrawShow(playerid, Login[4][playerid]); } else if(playertextid == Login[1][playerid]) { strcat(iText[playerid], "B"); format(iText2[playerid], sizeof(iText2), "%s", iText[playerid]); PlayerTextDrawSetString(playerid, Login[4][playerid], iText2[playerid]); PlayerTextDrawShow(playerid, Login[4][playerid]); } else if(playertextid == Login[2][playerid]) { strcat(iText[playerid], "C"); format(iText2[playerid], sizeof(iText2), "%s", iText[playerid]); PlayerTextDrawSetString(playerid, Login[4][playerid], iText2[playerid]); PlayerTextDrawShow(playerid, Login[4][playerid]); } else if(playertextid == Login[3][playerid]) { strcat(iText[playerid], "D"); format(iText2[playerid], sizeof(iText2), "%s", iText[playerid]); PlayerTextDrawSetString(playerid, Login[4][playerid], iText2[playerid]); PlayerTextDrawShow(playerid, Login[4][playerid]); } else if(playertextid == Login[5][playerid]) { new dim = strlen(iText2[playerid]); strdel(iText2[playerid], dim-1, dim); format(iText2[playerid], sizeof(iText2), "%s", iText2[playerid]); PlayerTextDrawSetString(playerid, Login[4][playerid], iText2[playerid]); PlayerTextDrawShow(playerid, Login[4][playerid]); } else if(playertextid == Login[6][playerid]) { CancelSelectTextDraw(playerid); } [/pawn] Ai incercat sa rezolvi singur ?: Da.. O sa va las si niste poze: http://imgur.com/a/nwBe6#0
  14. Respecta modelul de postare.. P.S. z-ul e AddStaticPickup(1239, 14, 56.4407,-1523.9917,4.9952, 0);
  15. Solved! +1 Se poate da T.C.
  16. Am pus variabila std pentru ca initial facusem ceva gen: [pawn] format(string, sizeof(string), "%s", std); PlayerTextDrawSetString(playerid, Login[4][playerid], std); PlayerTextDrawShow(playerid, Login[4][playerid]); [/pawn] Da.. stiu ca e o prostie ce am facut ) Revin cu edit daca merge ce mi-ai zis mai sus.. Edit: Bun. Daca nu pun alea la OnPlayerConnect merge perfect. Daca pun alea la OnPlayerConnect primesc doua erori... (4640) : error 033: array must be indexed (variable "iText") (4640) : error 033: array must be indexed (variable "iText2") [pawn]new iText[MAX_PLAYERS][20], iText2[MAX_PLAYERS][20];[/pawn] [pawn]public OnPlayerConnect(playerid) { //... iText[playerid] = EOS; iText2[playerid] = EOS; // 4640 //... }[/pawn]
  17. Nick: Punct. Problema: Am facut niste textdraw-uri.. mai exact butoane pe care scrie A, B, C, D. Cand dai click pe ele sa se formeze alt textdraw si sa apara un cuvant format din ordonea in care apesi pe textdraw-uri A,B,C,D. Problema e ca mie imi facem mereu textdraw-ul litera pe care apas.. in loc sa mai adauge litera pe care apas la cuvantul care ar trebui sa se formeze. Erori / warnings: - Lini/script: [pawn] if (strcmp(cmd, "/test", true) == 0) { if(IsPlayerConnected(playerid)) { for(new t; t != sizeof(Login); ++t) { PlayerTextDrawShow(playerid, Login[t][playerid]); } opcptd[playerid] = 4; SelectTextDraw(playerid, 0x00FF00FF); } return 1; } [/pawn] [pawn] public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid) { if(opcptd[playerid] == 1) {//...} else if(opcptd[playerid] == 2) {//...} else if(opcptd[playerid] == 3) {//...} else if(opcptd[playerid] == 4) { new string[50], std[50]; if(playertextid == Login[0][playerid]) { strcat(string, "A"); format(std, sizeof(std), "%s", string); PlayerTextDrawSetString(playerid, Login[4][playerid], string); PlayerTextDrawShow(playerid, Login[4][playerid]); } else if(playertextid == Login[1][playerid]) { strcat(string, "B"); format(std, sizeof(std), "%s", string); PlayerTextDrawSetString(playerid, Login[4][playerid], string); PlayerTextDrawShow(playerid, Login[4][playerid]); } else if(playertextid == Login[2][playerid]) { strcat(string, "C"); format(std, sizeof(std), "%s", string); PlayerTextDrawSetString(playerid, Login[4][playerid], string); PlayerTextDrawShow(playerid, Login[4][playerid]); } else if(playertextid == Login[3][playerid]) { strcat(string, "D"); format(std, sizeof(std), "%s", string); PlayerTextDrawSetString(playerid, Login[4][playerid], string); PlayerTextDrawShow(playerid, Login[4][playerid]); CancelSelectTextDraw(playerid); } } return 1; } [/pawn] [pawn] Login[0][playerid] = CreatePlayerTextDraw(playerid, 27.000000, 114.000000, "A"); PlayerTextDrawAlignment(playerid, Login[0][playerid], 2); PlayerTextDrawBackgroundColor(playerid, Login[0][playerid], 255); PlayerTextDrawFont(playerid, Login[0][playerid], 1); PlayerTextDrawLetterSize(playerid, Login[0][playerid], 0.500000, 1.000000); PlayerTextDrawColor(playerid, Login[0][playerid], -1); PlayerTextDrawSetOutline(playerid, Login[0][playerid], 0); PlayerTextDrawSetProportional(playerid, Login[0][playerid], 1); PlayerTextDrawSetShadow(playerid, Login[0][playerid], 1); PlayerTextDrawUseBox(playerid, Login[0][playerid], 1); PlayerTextDrawBoxColor(playerid, Login[0][playerid], 255); PlayerTextDrawTextSize(playerid, Login[0][playerid], 13.000000, 14.000000); PlayerTextDrawSetSelectable(playerid, Login[0][playerid], 1); Login[1][playerid] = CreatePlayerTextDraw(playerid, 47.000000, 114.000000, "B"); PlayerTextDrawAlignment(playerid, Login[1][playerid], 2); PlayerTextDrawBackgroundColor(playerid, Login[1][playerid], 255); PlayerTextDrawFont(playerid, Login[1][playerid], 1); PlayerTextDrawLetterSize(playerid, Login[1][playerid], 0.500000, 1.000000); PlayerTextDrawColor(playerid, Login[1][playerid], -1); PlayerTextDrawSetOutline(playerid, Login[1][playerid], 0); PlayerTextDrawSetProportional(playerid, Login[1][playerid], 1); PlayerTextDrawSetShadow(playerid, Login[1][playerid], 1); PlayerTextDrawUseBox(playerid, Login[1][playerid], 1); PlayerTextDrawBoxColor(playerid, Login[1][playerid], 255); PlayerTextDrawTextSize(playerid, Login[1][playerid], 13.000000, 14.000000); PlayerTextDrawSetSelectable(playerid, Login[1][playerid], 1); Login[2][playerid] = CreatePlayerTextDraw(playerid, 67.000000, 114.000000, "C"); PlayerTextDrawAlignment(playerid, Login[2][playerid], 2); PlayerTextDrawBackgroundColor(playerid, Login[2][playerid], 255); PlayerTextDrawFont(playerid, Login[2][playerid], 1); PlayerTextDrawLetterSize(playerid, Login[2][playerid], 0.500000, 1.000000); PlayerTextDrawColor(playerid, Login[2][playerid], -1); PlayerTextDrawSetOutline(playerid, Login[2][playerid], 0); PlayerTextDrawSetProportional(playerid, Login[2][playerid], 1); PlayerTextDrawSetShadow(playerid, Login[2][playerid], 1); PlayerTextDrawUseBox(playerid, Login[2][playerid], 1); PlayerTextDrawBoxColor(playerid, Login[2][playerid], 255); PlayerTextDrawTextSize(playerid, Login[2][playerid], 13.000000, 14.000000); PlayerTextDrawSetSelectable(playerid, Login[2][playerid], 1); Login[3][playerid] = CreatePlayerTextDraw(playerid, 87.000000, 114.000000, "D"); PlayerTextDrawAlignment(playerid, Login[3][playerid], 2); PlayerTextDrawBackgroundColor(playerid, Login[3][playerid], 255); PlayerTextDrawFont(playerid, Login[3][playerid], 1); PlayerTextDrawLetterSize(playerid, Login[3][playerid], 0.500000, 1.000000); PlayerTextDrawColor(playerid, Login[3][playerid], -1); PlayerTextDrawSetOutline(playerid, Login[3][playerid], 0); PlayerTextDrawSetProportional(playerid, Login[3][playerid], 1); PlayerTextDrawSetShadow(playerid, Login[3][playerid], 1); PlayerTextDrawUseBox(playerid, Login[3][playerid], 1); PlayerTextDrawBoxColor(playerid, Login[3][playerid], 255); PlayerTextDrawTextSize(playerid, Login[3][playerid], 13.000000, 14.000000); PlayerTextDrawSetSelectable(playerid, Login[3][playerid], 1); Login[4][playerid] = CreatePlayerTextDraw(playerid, 57.000000, 130.000000, "i"); PlayerTextDrawAlignment(playerid, Login[4][playerid], 2); PlayerTextDrawBackgroundColor(playerid, Login[4][playerid], 255); PlayerTextDrawFont(playerid, Login[4][playerid], 1); PlayerTextDrawLetterSize(playerid, Login[4][playerid], 0.500000, 1.000000); PlayerTextDrawColor(playerid, Login[4][playerid], -1); PlayerTextDrawSetOutline(playerid, Login[4][playerid], 0); PlayerTextDrawSetProportional(playerid, Login[4][playerid], 1); PlayerTextDrawSetShadow(playerid, Login[4][playerid], 1); PlayerTextDrawUseBox(playerid, Login[4][playerid], 1); PlayerTextDrawBoxColor(playerid, Login[4][playerid], -205); PlayerTextDrawTextSize(playerid, Login[4][playerid], 0.000000, 76.000000); [/pawn] Ai incercat sa rezolvi singur ?: Da.. am tot invartit string, std de la OnPlayerClickPlayerTextDraw.. dar mai mult m-am ametit.. :| Cateva poze.. desi nu cred ca ajuta: http://imgur.com/a/tJWOK#0
  18. Multumim.. Daca il postat acum 2-3 luni il luam si eu..
  19. pune server_log pe pestebin.com si pune link`ul aici
  20. [pawn]public OnAccountLoad(playerid) { PlayerInfo[playerid][pLevel] = cache_get_row_int(0, 4); PlayerInfo[playerid][pCash] = cache_get_row_int(0, 5); PlayerInfo[playerid][pAdmin] = cache_get_row_int(0, 6); PlayerInfo[playerid][pKills] = cache_get_row_int(0, 7); PlayerInfo[playerid][pDeaths] = cache_get_row_int(0, 8); PlayerInfo[playerid][pHouseKey] = cache_get_row_int(0, 9); PlayerInfo[playerid][pSpawn] = cache_get_row_int(0, 10); PlayerInfo[playerid][pTutorial] = cache_get_row_int(0, 11); PlayerInfo[playerid][pSkin] = cache_get_row_int(0, 12); PlayerInfo[playerid][pJob] = cache_get_row_int(0, 13); PlayerInfo[playerid][pCurse] = cache_get_row_int(0, 14); PlayerInfo[playerid][pFactiune] = cache_get_row_int(0, 15); PlayerInfo[playerid][pRank] = cache_get_row_int(0, 16); PlayerInfo[playerid][pLider] = cache_get_row_int(0, 17); PlayerInfo[playerid][pCar] = cache_get_row_int(0, 18); PlayerInfo[playerid][pBank] = cache_get_row_int(0, 19); GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]); SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]); SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); if(PlayerInfo[playerid][pTutorial] == 0) { TogglePlayerControllable(playerid, 0); // This will Make player freeze. SetPlayerCameraPos(playerid, 1626.66, 820.16, 21.77); // This will set the Camera Pos for the playerid. SetPlayerCameraLookAt(playerid, 1599.65, 848.15, 11.50); // This will set where the camera should look. SetTimerEx("Tutorial_Pas1", 8000, false, "i", playerid); } SCM(playerid, c_alb, "{FFFFFF}[{67BDFC}System{FFFFFF}] {F48651}Te-ai logat cu succes. Apasa {FFFFFF}'{67BDFC}SHIFT{FFFFFF}' {F48651}pentru a continua{FFFFFF}."); SetPlayerSpawn(playerid); return 1; } [/pawn]
  21. script: [pawn] if(!response) Kick(playerid); //if they clicked Quit, we will kick them //new hpass[129]; //for password hashing //WP_Hash(hpass, 129, inputtext); //hashing inputtext //if(strcmp(inputtext, PlayerInfo[playerid][pPassword]) == 0) //if(strlen(inputtext) > 0) if(!strcmp(inputtext, PlayerInfo[playerid][pPassword])) //remember we have loaded player's password into this variable, PlayerInfo[playerid][pPassword] earlier. Now let's use it to compare the hashed password with password that we load { //if the hashed password matches with the loaded password from database //mysql_format(mysql, query, sizeof(query), "SELECT * FROM `players` WHERE `Username` = '%e' LIMIT 1", Name[playerid]); mysql_format(mysql, query, sizeof(query), "SELECT * FROM `players` WHERE `Username` = '%e' AND `Password` = '%e'", Name[playerid], inputtext); mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid); printf("s | User: %s | Pass: %s", Name[playerid], inputtext); printf("s | User: %s | Pass: %s", Name[playerid], PlayerInfo[playerid][pPassword]); printf("e | User: %e | Pass: %e", Name[playerid], inputtext); printf("e | User: %e | Pass: %e", Name[playerid], PlayerInfo[playerid][pPassword]); printf("inputtext: %s", inputtext); } else //if the hashed password didn't match with the loaded password(PlayerInfo[playerid][pPassword]) { ShowPlayerDialog(playerid, D_Login, DIALOG_STYLE_INPUT, "Login", "Parola introdusa este incorecta.", "Login", "Kick"); } }[/pawn] server_log [10:10:13] [part] Account has left the server (0:2) [10:10:13] s | User: Account | Pass: [10:10:13] s | User: Account | Pass: NULL [10:10:13] e | User: e | Pass: e [10:10:13] e | User: e | Pass: e [10:10:13] inputtext:
  22. Ai un model de respectat!
×
×
  • 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.