[s0beit](source code) Шпоргалка/Hint
В samp.cpp
Код
void cheat_hint()
{
if (cheat_state->_generic.shpora)
{
for (int i = 0; i < 500; i++)
{
if (strlen(set.shpora[i]) > 0)
pD3DFontFixed->PrintShadow(pPresentParam.BackBufferWidth / 50,
set.shporaoffset + i * 10, D3DCOLOR_XRGB(255, 165, 0), set.shpora[i]);
}
}
}
В cheat.h
В ini.cpp
Код
// hint
sprintf(path, "%s\\" M0D_FOLDER "hint.ini", g_szWorkingDirectory);
fp = fopen(path, "r");
if (fp)
{
fseek(fp, 0, SEEK_END);
long size = ftell(fp);
fseek(fp, 0, SEEK_SET);
char *dest = (char*)calloc(size, 1);
fread(dest, 1, size, fp);
fclose(fp);
char *pch = strtok(dest, "\r\n");
for(int i = 0; i < 500; i++)
{
if (!pch)
break;
strcpy(set.shpora[i], pch);
pch = strtok(NULL, "\r\n");
}
}
fclose(fp);
В ini.h
Код
char shpora[512][512];