Jump to content

[REZOLVAT] Problema Call Player


TSN
 Share

Recommended Posts

Acum 20 ore, L0K3D a spus:

Cauta linia mysql_connect, trebuie sa ai ceva de genu:

image.png.ae3dd277253b4fd84f75522930764a7d.png

Tu probabil ai SQL = ..., deci in loc de:


cache_get_field_content(0, "name", playerName, handle, MAX_PLAYER_NAME + 1), playerSQLID = cache_get_field_content_int(0, "id"); 

Pui:


cache_get_field_content(0, "name", playerName, SQL, MAX_PLAYER_NAME + 1), playerSQLID = cache_get_field_content_int(0, "id"); 

Citeste inca odata teoria pentru a intelege care e greseala.

 

La 10.06.2019 la 10:43, DiBlaine a spus:

Poza la structura tabelului users(baza de date). 

Am rezolvat, insa acuma celui online nu ii apeleaza mesajul.

?imw=5000&imh=5000&ima=fit&impolicy=Lett

Link to comment
Share on other sites

Problema la selectarea id-ului din db:

mysql_format(SQL, queryString, 100, "SELECT name, ID, ConnectedTime FROM users ORDER BY ConnectedTime DESC LIMIT 1");

Pune:

mysql_format(SQL, queryString, 100, "SELECT name, id, ConnectedTime FROM users ORDER BY ConnectedTime DESC LIMIT 1");

 

Link to comment
Share on other sites

Acum 1 minut, DiBlaine a spus:

Problema la selectarea id-ului din db:


mysql_format(SQL, queryString, 100, "SELECT name, ID, ConnectedTime FROM users ORDER BY ConnectedTime DESC LIMIT 1");

Pune:


mysql_format(SQL, queryString, 100, "SELECT name, id, ConnectedTime FROM users ORDER BY ConnectedTime DESC LIMIT 1");

 

Am modificat din id in ID in tabela. Acuma imi apeleaza numele, insa problema este ca nu imi apeleaza mesajul daca sunt online.

Edited by iTECH

?imw=5000&imh=5000&ima=fit&impolicy=Lett

Link to comment
Share on other sites

La incarcarea din baza de date cum incarci pSQLID-ul? Ma refer cand playerul se conecteaza pe server(dupa ce baga parola).

Daca ai modificat din id in ID coloana la users atunci trebuie sa modifici si la incarcarea din baza de date:

Din: PlayerInfo[playerid][pSQLID] = cache_get_field_content_int(0, "id");
Pune: PlayerInfo[playerid][pSQLID] = cache_get_field_content_int(0, "ID");

 

Link to comment
Share on other sites

Defapt nu, am spus o mare prostie... nu are legatura cu loginu, pentru ca la tine in functie se extrag datele din baza de date. Modifica si playerSQLID:

cache_get_field_content(0, "name", playerName, handle, MAX_PLAYER_NAME + 1), playerSQLID = cache_get_field_content_int(0, "ID");

 

Link to comment
Share on other sites

Acum 14 ore, DiBlaine a spus:

Defapt nu, am spus o mare prostie... nu are legatura cu loginu, pentru ca la tine in functie se extrag datele din baza de date. Modifica si playerSQLID:


cache_get_field_content(0, "name", playerName, handle, MAX_PLAYER_NAME + 1), playerSQLID = cache_get_field_content_int(0, "ID");

 

Man, am rezolvat faza cu apelarea numelui, acuma merge, nu mai are treaba cu id. Insa nu imi apeleaza mesajul cand sunt online.

?imw=5000&imh=5000&ima=fit&impolicy=Lett

Link to comment
Share on other sites

Acum 10 ore, L0K3D a spus:

Fa debuguri sa vezi unde ai gresit.

Am rezolvat, acuma imi apeleaza si mesajul.

Cum as putea sa fac sa ia banii sau orele jucate respectivului jucator? Am facut format-ul asa insa apare 0 la suma.

    format(queryString, 60, "[THE MOST HOURS]: The winner of this hour is %s with %0.2f hours played.", playerName, PlayerInfo[playerSQLID][pConnectTime]), SendClientMessageToAll(COLOR_LIGHTRED, queryString);

?imw=5000&imh=5000&ima=fit&impolicy=Lett

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...