Jump to content
  • 0

Problema money.



Problema intalnita (descriere): Salut , am si eu o problema. Deci intru pe server imi dau cu /givemoney  sa zicem 100$ , ies de pe server intru iar si imi da 0$. Dece ?
Ero(area / rile) / warning-(ul / urile): Nu se salveaza banii pe server $$$
Liniile de cod / sursa / script-ul(obligatoriu): Deocamdata nu am pus deoarece , astept o parere.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Daca serverul e pe MySQL, incearca sa intrduci in comanda:

new query[244];
format(query, sizeof(query), "UPDATE `Accounts` SET `Money` = '%d' WHERE `Name` = '%s'", money, PlayerName(player));
mysql_query(SQL, query);

unde money este suma pe care o dai, iar PlayerName(player) numele jucatorului caruia ii oferi bani.

In plus nu prea cred ca la asta ar fi problema, ci la cache-uri atunci cand jucatorul se autentifica. Asadar ai nevoie de ceva de genul:

GivePlayerMoney(playerid, cache_get_field_content_int(0, "Money"));

Money - daca tu ai asa in GM (e posibil sa fie si Cash, Bani, Ron etc)


Link to comment
Share on other sites

This topic is now closed to further replies.
  • 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.