Jump to content

Recommended Posts

Posted

Salut.În primul rând, în baza de date am o tabelă cu numele : GiftPoints

am adăugat la pInfo : pGiftPoints, iar când vreau să creez o comandă

CMD:testare(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");

new coordsstring[256];
new test = PlayerInfo[playerid][pGiftPoints];
format(coordsstring, sizeof(coordsstring),"You Have %s", test);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
		
return 1;
}

5l2Wwq2.png

 

Un mic ajutor?

Posted (edited)

in primul rand e integer nu e string deci trebuie sa pui 

You Have %i

In al doilea rand, ti se incarca din baza de date? Sau ai pus sa se incarce din baza de date?

Edited by Banditul
  • Thanks 1
Posted (edited)
Acum 8 minute, Banditul a spus:

in primul rand e integer nu e string deci trebuie sa pui 


You Have %i

In al doilea rand, ti se incarca din baza de date? Sau ai pus sa se incarce din baza de date?

Din baza de date

 

EDIT:

 

Nope la fel arată

 

You have 

dar nu apare valoarea din baza de date

Edited by UnFan
Posted
Acum 16 minute, andrei9971 a spus:

Esti sigur ca faci bine incarcarea? Verifica si functia Update daca folosesti edit de la bigzone.

 

Am adăugat la update și tot la fel.

Posted (edited)
PlayerInfo[playerid][pGiftPoints] = cache_get_field_content_int(0, "GiftPoints");

Ai ceva asemanator la OnPlayerLogin sau oriunde incarci datele jucatorilor?

Edited by Banditul
  • Thanks 1
Posted
Acum 34 minute, Banditul a spus:

PlayerInfo[playerid][pGiftPoints] = cache_get_field_content_int(0, "GiftPoints");

Ai ceva asemanator la OnPlayerLogin sau oriunde incarci datele jucatorilor?

Mersii !!!!

Rezolvat

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.