[C++]Item Shop in joc

Aici poți găsi sisteme complete, verificate și recomandate de echipa 4Metin.
Avatar utilizator
Loud
Tehnic
Tehnic
Mesaje: 265
Membru din: Mar Oct 18, 2022 12:48 pm
Localitate: Underwater
Status: Activ
Multumiri acordate: 2
Multumiri primite: 55
Contact:

[C++]Item Shop in joc

Mesaj de Loud »

Pentru a functiona corect itemshopul in joc trebuie doar sa modificam functia do_in_game_mall din cmd_general.cpp

Intram in cmd_general.cpp si cautam functia ACMD do_in_game_mall

Selectam toata functia pana la final si o inlocuim cu:

Cod: Selectaţi tot

ACMD(do_in_game_mall)
{
	char buf[512+1];
	char sas[33];
	MD5_CTX ctx;
	const char sas_key[] = "17APWl72AqQ8";
 
	char language[3];
	strcpy(language, "ro");//If you have multilanguage, update this
 
	snprintf(buf, sizeof(buf), "%u%u%s", ch->GetPlayerID(), ch->GetAID(), sas_key);
 
	MD5Init(&ctx);
	MD5Update(&ctx, (const unsigned char *) buf, strlen(buf));
#ifdef __FreeBSD__
	MD5End(&ctx, sas);
#else
	static const char hex[] = "0123456789abcdef";
	unsigned char digest[16];
	MD5Final(digest, &ctx);
	int i;
	for (i = 0; i < 16; ++i) {
		sas[i+i] = hex[digest[i] >> 4];
		sas[i+i+1] = hex[digest[i] & 0x0f];
	}
	sas[i+i] = '\0';
#endif
 
	snprintf(buf, sizeof(buf), "mall https://shop.4metin.ro/?pid=%u&lang=%s&sid=%d&sas=%s",
			ch->GetPlayerID(), language, g_server_id, sas);
 
	ch->ChatPacket(CHAT_TYPE_COMMAND, buf);
}

Ulterior modificam URL de aici

Cod: Selectaţi tot

snprintf(buf, sizeof(buf), "mall https://shop.4metin.ro/?pid=%u&lang=%s&sid=%d&sas=%s",
 ! Mesaj de la: Loud
Se modifica doar shop.4metin.ro ,in rest totul ramane exact cum este
Imagine
Vrei un server de metin,un website sau hosting pentru alt joc? Alege pachetul potrivit pentru tine. Click pe imagine pentru toate detaliile
Scrie răspuns