Jump to content
  • 0

Salvare coordonate si arme


lideru

Question

Salut...

Am vazut pe mai multe server Role-Play ca atunci cand ies de pe server si intru a 2 zi ma da tot in acelas loc , imi salveaza coordonatele ma poate ajuta si pe mine cineva sa imi spuna cum sa fac sa mi se salveze si la mine pe sv coordonatele si armele ca atunci cand dau /q cu 100$ si un deagle cu 100 gl sa imi ramana cand intru iara pe cont cei 100$ aceleasi coordonate si cele 100 gl de la deagle

multumesc, daca ma facut greseli de exprimare scuzati dar acest topic a fost facut in graba.... :|

multumesc inca odata.

if(!strcmp(cmdtext, "/q", true))     {         Ban(playerid);         return true;     }[/code
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

http://forum.sa-mp.com/index.php?topic=4798.0  ;)

Proiecte:

Hospital Interior-0%(neinceput)

Limo Interior-0%(inceput)

Bank Interior-0%(neinceput)

Bus Interior-0%(inceput)

Plane Interior-0%(neinceput)

Train Interior-0%(neinceput)

Boat Interior-95%(terminat,mici retusuri)

Mini-Scripturi care au fost publicate:

GPS System: http://forum.sa-mp.ro/filter-scripts-and-gamemodes/%28fs%29-gps-system/

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Similar Content

    • By TheGodfather
      Salut, cand intru pe server si ma pune sa ma loghez, ma da la coordonatele 0, 0, 0 de la harta si nu stiu de ce. Aveti vreo idee?

    • By seek nephrite
      Am facut un sistem de raport pt admini, totul merge cum trebuie pana dau restart la server, adica nu se salveaza in baza de date.
          format(rQuery[0], 512, "UPDATE `admins` SET `MinAdminReports` = '%d'", Amount);
          mysql_tquery(DB_Connect, rQuery[0], "", "");
       
    • By VAurel
      Salut, am si eu nevoie de ceva, eu am un bug la vipname de pe masini si deoarece oricum nu imi place chestia asta cu mutatul text-ului vip, manual pe vehicule, vreau sa il fac sa se puna automat pe vehicule, faza este alta, nu stiu de unde sa fac rost de coordonatele unde atasez obiectul pe masina respectiva...
      Daca cunoasteti voi o metoda sau un program pentru a face asta, v-as ruga sa imi spuneti..
    • By khain.dev
      Salut,ati avut momente cind dupa restart este alta vreme si timp, mai ales daca aveti vremea si timpul ca in relitate,cu aceasta metoda dupa restart se va salva timpul si vremea pe server care era!
      Mersi de atentie,astept macar un "+" de staruinta ?
    • By Robi[adv]
      Recent am creat cu ajutorul unui tutorial un sistem de register si de login , ceva simplu. Problema nu este intimpinata la cod ci la baza de date. La conexiunea cu serverul nu intampin nici-o problema..se conecteaza. Insa dupa register, la relog contul nu ramane salvat.
      #define SQL_HOST "localhost" #define SQL_USER "root" #define SQL_PASS "" #define SQL_DB "rpg_db" new SQL; // conexiunea se afla in public OnGameModeInit() SQL = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS); public OnPlayerConnect(playerid) { PlayerInfo[playerid][pLoginTries] = 0; gQuery[0] = EOS; mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM `users` WHERE `Name` = '%e' LIMIT 1", GetName(playerid)); mysql_tquery(SQL, gQuery, "checkAcount", "i" ,playerid); return 1; } case DIALOG_REGISTER: { if(!response) return Kick(playerid); if(strlen(inputtext) < 6 || strlen(inputtext) > 32) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Bine ai venit!\nScrie o parola pentru a te putea inregistra.\nParola trebuie sa fie intre 6-32 caractere\nParola nu indeplineste cerintele cerute!", "Register", "Quit"); gQuery[0] = EOS; mysql_format(SQL, gQuery, sizeof gQuery, "INSERT INTO `users` ('Name', 'Password') VALUES ('%s', '%s')", GetName( playerid ), inputtext ); mysql_tquery(SQL, gQuery, "insertAccount", "d", playerid); format(PlayerInfo[playerid][pPassword], 32, inputtext); ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "E-Mail", "Seteaza-ti parola de e-mail.\nTe rugam sa folosesti o adresa valida.", "Setez",""); } function insertAccount(playerid) { PlayerInfo[playerid][pSQLID] = cache_insert_id(); printf("%s s-a inregistrat cu SQLID-ul #%d.", GetName(playerid), PlayerInfo[playerid][pSQLID]); return 1; } function checkAcount(playerid) { switch(cache_num_rows()) { case 0: ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Bine ai venit!\nScrie o parola pentru a te putea inregistra.\nParola trebuie sa fie intre 6-32 caractere", "Register", "Quit"); case 1: ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Bine ai venit!\nScrie parola in casuta de mai jos pentru a te loga!", "Login", "Quit"); } return 1; } M-am ajutat de o comanda luata dupa net. public OnQueryError , eroarea este urmatoarea:
      [20:46:06 03/27/20] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "rpg_db", password: "****", port: 3306, autoreconnect: true, pool_size: 2 [20:46:06 03/27/20] [DEBUG] CMySQLHandle::Create - creating new connection.. [20:46:06 03/27/20] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called [20:46:06 03/27/20] [DEBUG] CMySQLHandle::Create - connection created (id: 1) [20:46:06 03/27/20] [DEBUG] CMySQLConnection::Connect - establishing connection to database... [20:46:06 03/27/20] [DEBUG] CMySQLConnection::Connect - connection was successful [20:46:06 03/27/20] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [20:46:06 03/27/20] [DEBUG] CMySQLConnection::Connect - establishing connection to database... [20:46:06 03/27/20] [DEBUG] CMySQLConnection::Connect - establishing connection to database... [20:46:06 03/27/20] [DEBUG] CMySQLConnection::Connect - establishing connection to database... [20:46:06 03/27/20] [DEBUG] CMySQLConnection::Connect - connection was successful [20:46:06 03/27/20] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [20:46:07 03/27/20] [DEBUG] CMySQLConnection::Connect - connection was successful [20:46:07 03/27/20] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [20:46:07 03/27/20] [DEBUG] CMySQLConnection::Connect - connection was successful [20:46:07 03/27/20] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [20:46:37 03/27/20] [DEBUG] mysql_format - connection: 1, len: 256, format: "SELECT * FROM `users` WHERE `Name` = '%e' LIMIT 1" [20:46:37 03/27/20] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `users` WHERE `Name` = 'wRoby' LIMIT 1", callback: "checkAcount", format: "i" [20:46:37 03/27/20] [DEBUG] CMySQLQuery::Execute[checkAcount] - starting query execution [20:46:38 03/27/20] [DEBUG] CMySQLQuery::Execute[checkAcount] - query was successfully executed within 1188.293 milliseconds [20:46:38 03/27/20] [DEBUG] CMySQLResult::CMySQLResult() - constructor called [20:46:38 03/27/20] [DEBUG] Calling callback "checkAcount".. [20:46:38 03/27/20] [DEBUG] cache_get_row_count - connection: 1 [20:46:38 03/27/20] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called [20:46:41 03/27/20] [DEBUG] mysql_format - connection: 1, len: 256, format: "INSERT INTO `users` ('Name', 'Password') VALUES ('%s', '%s')" [20:46:41 03/27/20] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO `users` ('Name', 'Password') VALUES ('wRoby', '03200", callback: "insertAccount", format: "d" [20:46:41 03/27/20] [DEBUG] CMySQLQuery::Execute[insertAccount] - starting query execution [20:46:41 03/27/20] [ERROR] CMySQLQuery::Execute[insertAccount] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''Name', 'Password') VALUES ('wRoby', '032003')' at line 1 (Query: "INSERT INTO `users` ('Name', 'Password') VALUES ('wRoby', '032003')") [20:46:41 03/27/20] [DEBUG] CMySQLQuery::Execute[insertAccount] - error will be triggered in OnQueryError [20:46:41 03/27/20] [DEBUG] Calling callback "OnQueryError".. [20:46:43 03/27/20] [DEBUG] mysql_format - connection: 1, len: 256, format: "UPDATE 'users' SET 'Email' = '%s' WHERE 'ID' = '%d'" [20:46:43 03/27/20] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE 'users' SET 'Email' = 'robert' WHERE 'ID' = '0'", callback: "(null)", format: "(null)" [20:46:43 03/27/20] [DEBUG] CMySQLQuery::Execute[] - starting query execution [20:46:43 03/27/20] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''users' SET 'Email' = 'robert' WHERE 'ID' = '0'' at line 1 (Query: "UPDATE 'users' SET 'Email' = 'robert' WHERE 'ID' = '0'") [20:46:43 03/27/20] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError [20:46:43 03/27/20] [DEBUG] Calling callback "OnQueryError"..  
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.