Просмотр полной версии : Делаем окно с информацией
Norma_Cheater
09.05.2013, 22:42
Здравствуйте уважаемые пользователи сайта BlastHack.Net вот решил написать лёгкую функцию как у M_G Project и вот что получилось.
Код:
void cheat_handle_hudinformacion ()
{
traceLastFunc( "cheat_handle_hudinformacion()" );
if ( KEY_PRESSED(set.key_hudinformacion) )
{
cheat_state->_generic.hudinformacion ^= 1;
}
if( cheat_state->_generic.hudinformacion == 1 )
{
uint32_t samp_info = ( uint32_t ) g_SAMP;
uint32_t func = g_dwSAMP_Addr + SAMP_FUNCUPDATESCOREBOARDDATA;
D3DCOLORcolor = D3DCOLOR_ARGB( 0xFF, 0xFF, 0x00, 0x00 );
floaty = 0.0f;
( y ) += 400.0f;
charbuf[512];
if ( cheat_state->state == CHEAT_STATE_VEHICLE )
{
intamount_players = getPlayerCount();
pD3DFontFixed->PrintShadow( 350.0f, y, color, "Informacion of Car" );
// Nick
color = D3DCOLOR_ARGB( 0xFF, 0x99, 0x99, 0x99 );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
sprintf( buf, "Nick: %s", getPlayerName(g_Players->sLocalPlayerID) );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// id
sprintf( buf, "ID: %u", g_Players->sLocalPlayerID );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Ping
sprintf( buf, "Ping: %u", g_Players->iLocalPlayerPing );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Level
sprintf( buf, "Level: %u", g_Players->iLocalPlayerScore );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Online Players
sprintf( buf, "Connected Players: %d", amount_players );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Position Cars
sprintf( buf, "Position Car: %0.2f %0.2f %0.2f",
g_Players->pLocalPlayer->inCarData.fPosition[0],
g_Players->pLocalPlayer->inCarData.fPosition[1],
g_Players->pLocalPlayer->inCarData.fPosition[2] );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Health Car
sprintf( buf, "Health Car: %0.2f",
g_Players->pLocalPlayer->inCarData.fVehicleHealth );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
}
else if ( cheat_state->state == CHEAT_STATE_ACTOR )
{
intamount_players = getPlayerCount();
pD3DFontFixed->PrintShadow( 350.0f, y, color, "Informacion of Player" );
// Nick
color = D3DCOLOR_ARGB( 0xFF, 0x99, 0x99, 0x99 );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
sprintf( buf, "Nick: %s", getPlayerName(g_Players->sLocalPlayerID) );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// id
sprintf( buf, "ID: %u", g_Players->sLocalPlayerID );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Ping
sprintf( buf, "Ping: %u", g_Players->iLocalPlayerPing );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Online Players
sprintf( buf, "Connected Players: %d", amount_players );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Level
sprintf( buf, "Level: %u", g_Players->iLocalPlayerScore );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Armor
sprintf( buf, "Armor: %u", g_Players->pLocalPlayer->onFootData.byteArmor );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Health
sprintf( buf, "Health: %u", g_Players->pLocalPlayer->onFootData.byteHealth );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Position
sprintf( buf, "Position: %0.2f %0.2f %0.2f",
g_Players->pLocalPlayer->onFootData.fPosition[0], g_Players->pLocalPlayer->onFootData.fPosition[1],
g_Players->pLocalPlayer->onFootData.fPosition[2] );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
__asm mov ecx, samp_info
__asm call func
}
}
}
By Norma_Cheater For BlastHack.Net
Опередил меня только хотел написать это.
megatoN_
10.05.2013, 01:10
теперь мой дно-соб будет процветать, спасибо вам обоим :*
RickAstley
10.05.2013, 08:47
1>samp.cpp(484): error C2065: 'D3DCOLORcolor' : undeclared identifier
1>samp.cpp(485): error C2065: 'floaty' : undeclared identifier
1>samp.cpp(486): error C2065: 'y' : undeclared identifier
1>samp.cpp(487): error C2065: 'charbuf' : undeclared identifier
1>samp.cpp(491): error C2065: 'intamount_players' : undeclared identifier
1>samp.cpp(492): error C2065: 'y' : undeclared identifier
1>samp.cpp(492): error C2065: 'color' : undeclared identifier
1>samp.cpp(494): error C2065: 'color' : undeclared identifier
1>samp.cpp(495): error C2065: 'y' : undeclared identifier
1>samp.cpp(496): error C2065: 'buf' : undeclared identifier
1>samp.cpp(497): error C2065: 'y' : undeclared identifier
1>samp.cpp(497): error C2065: 'color' : undeclared identifier
1>samp.cpp(497): error C2065: 'buf' : undeclared identifier
1>samp.cpp(498): error C2065: 'y' : undeclared identifier
1>samp.cpp(500): error C2065: 'buf' : undeclared identifier
1>samp.cpp(501): error C2065: 'y' : undeclared identifier
1>samp.cpp(501): error C2065: 'color' : undeclared identifier
1>samp.cpp(501): error C2065: 'buf' : undeclared identifier
1>samp.cpp(502): error C2065: 'y' : undeclared identifier
1>samp.cpp(504): error C2065: 'buf' : undeclared identifier
1>samp.cpp(505): error C2065: 'y' : undeclared identifier
1>samp.cpp(505): error C2065: 'color' : undeclared identifier
1>samp.cpp(505): error C2065: 'buf' : undeclared identifier
1>samp.cpp(506): error C2065: 'y' : undeclared identifier
1>samp.cpp(508): error C2065: 'buf' : undeclared identifier
1>samp.cpp(509): error C2065: 'y' : undeclared identifier
1>samp.cpp(509): error C2065: 'color' : undeclared identifier
1>samp.cpp(509): error C2065: 'buf' : undeclared identifier
1>samp.cpp(510): error C2065: 'y' : undeclared identifier
1>samp.cpp(512): error C2065: 'buf' : undeclared identifier
1>samp.cpp(512): error C2065: 'amount_players' : undeclared identifier
1>samp.cpp(513): error C2065: 'y' : undeclared identifier
1>samp.cpp(513): error C2065: 'color' : undeclared identifier
1>samp.cpp(513): error C2065: 'buf' : undeclared identifier
1>samp.cpp(514): error C2065: 'y' : undeclared identifier
1>samp.cpp(516): error C2065: 'buf' : undeclared identifier
1>samp.cpp(520): error C2065: 'y' : undeclared identifier
1>samp.cpp(520): error C2065: 'color' : undeclared identifier
1>samp.cpp(520): error C2065: 'buf' : undeclared identifier
1>samp.cpp(521): error C2065: 'y' : undeclared identifier
1>samp.cpp(523): error C2065: 'buf' : undeclared identifier
1>samp.cpp(525): error C2065: 'y' : undeclared identifier
1>samp.cpp(525): error C2065: 'color' : undeclared identifier
1>samp.cpp(525): error C2065: 'buf' : undeclared identifier
1>samp.cpp(526): error C2065: 'y' : undeclared identifier
1>samp.cpp(530): error C2065: 'intamount_players' : undeclared identifier
1>samp.cpp(531): error C2065: 'y' : undeclared identifier
1>samp.cpp(531): error C2065: 'color' : undeclared identifier
1>samp.cpp(533): error C2065: 'color' : undeclared identifier
1>samp.cpp(534): error C2065: 'y' : undeclared identifier
1>samp.cpp(535): error C2065: 'buf' : undeclared identifier
1>samp.cpp(536): error C2065: 'y' : undeclared identifier
1>samp.cpp(536): error C2065: 'color' : undeclared identifier
1>samp.cpp(536): error C2065: 'buf' : undeclared identifier
1>samp.cpp(537): error C2065: 'y' : undeclared identifier
1>samp.cpp(539): error C2065: 'buf' : undeclared identifier
1>samp.cpp(540): error C2065: 'y' : undeclared identifier
1>samp.cpp(540): error C2065: 'color' : undeclared identifier
1>samp.cpp(540): error C2065: 'buf' : undeclared identifier
1>samp.cpp(541): error C2065: 'y' : undeclared identifier
1>samp.cpp(543): error C2065: 'buf' : undeclared identifier
1>samp.cpp(544): error C2065: 'y' : undeclared identifier
1>samp.cpp(544): error C2065: 'color' : undeclared identifier
1>samp.cpp(544): error C2065: 'buf' : undeclared identifier
1>samp.cpp(545): error C2065: 'y' : undeclared identifier
1>samp.cpp(547): error C2065: 'buf' : undeclared identifier
1>samp.cpp(547): error C2065: 'amount_players' : undeclared identifier
1>samp.cpp(548): error C2065: 'y' : undeclared identifier
1>samp.cpp(548): error C2065: 'color' : undeclared identifier
1>samp.cpp(548): error C2065: 'buf' : undeclared identifier
1>samp.cpp(549): error C2065: 'y' : undeclared identifier
1>samp.cpp(551): error C2065: 'buf' : undeclared identifier
1>samp.cpp(552): error C2065: 'y' : undeclared identifier
1>samp.cpp(552): error C2065: 'color' : undeclared identifier
1>samp.cpp(552): error C2065: 'buf' : undeclared identifier
1>samp.cpp(553): error C2065: 'y' : undeclared identifier
1>samp.cpp(555): error C2065: 'buf' : undeclared identifier
1>samp.cpp(556): error C2065: 'y' : undeclared identifier
1>samp.cpp(556): error C2065: 'color' : undeclared identifier
1>samp.cpp(556): error C2065: 'buf' : undeclared identifier
1>samp.cpp(557): error C2065: 'y' : undeclared identifier
1>samp.cpp(559): error C2065: 'buf' : undeclared identifier
1>samp.cpp(560): error C2065: 'y' : undeclared identifier
1>samp.cpp(560): error C2065: 'color' : undeclared identifier
1>samp.cpp(560): error C2065: 'buf' : undeclared identifier
1>samp.cpp(561): error C2065: 'y' : undeclared identifier
1>samp.cpp(563): error C2065: 'buf' : undeclared identifier
1>samp.cpp(566): error C2065: 'y' : undeclared identifier
1>samp.cpp(566): error C2065: 'color' : undeclared identifier
1>samp.cpp(566): error C2065: 'buf' : undeclared identifier
1>samp.cpp(567): error C2065: 'y' : undeclared identifier
помогите плиз
Norma_Cheater
10.05.2013, 10:28
Это не в samp.cpp а в cheat_generic.cpp, и обьявить в cheat.cpp,cheat.h,cheat_generic.h,ini.h
Jesus xD
RickAstley
10.05.2013, 10:54
Это не в samp.cpp а в cheat_generic.cpp, и обьявить в cheat.cpp,cheat.h,cheat_generic.h,ini.h
Да ок.
Код:
1>cheat_generic.cpp(1322): error C2065: 'D3DCOLORcolor' : undeclared identifier
1>cheat_generic.cpp(1323): error C2065: 'floaty' : undeclared identifier
1>cheat_generic.cpp(1324): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1325): error C2065: 'charbuf' : undeclared identifier
1>cheat_generic.cpp(1329): error C2065: 'intamount_players' : undeclared identifier
1>cheat_generic.cpp(1330): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1330): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1332): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1333): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1334): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1335): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1335): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1335): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1336): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1338): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1339): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1339): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1339): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1340): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1342): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1343): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1343): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1343): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1344): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1346): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1347): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1347): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1347): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1348): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1350): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1350): error C2065: 'amount_players' : undeclared identifier
1>cheat_generic.cpp(1351): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1351): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1351): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1352): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1354): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1358): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1358): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1358): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1359): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1361): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1363): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1363): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1363): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1364): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1368): error C2065: 'intamount_players' : undeclared identifier
1>cheat_generic.cpp(1369): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1369): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1371): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1372): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1373): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1374): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1374): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1374): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1375): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1377): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1378): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1378): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1378): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1379): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1381): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1382): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1382): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1382): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1383): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1385): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1385): error C2065: 'amount_players' : undeclared identifier
1>cheat_generic.cpp(1386): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1386): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1386): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1387): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1389): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1390): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1390): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1390): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1391): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1393): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1394): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1394): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1394): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1395): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1397): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1398): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1398): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1398): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1399): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1401): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1404): error C2065: 'y' : undeclared identifier
1>cheat_generic.cpp(1404): error C2065: 'color' : undeclared identifier
1>cheat_generic.cpp(1404): error C2065: 'buf' : undeclared identifier
1>cheat_generic.cpp(1405): error C2065: 'y' : undeclared identifier
Это не в samp.cpp а в cheat_generic.cpp, и обьявить в cheat.cpp,cheat.h,cheat_generic.h,ini.h
Jesus xD
Вообще-то это надо сувать в proxyIDirect3DDevice9.cpp
Там ищешь
Код:
renderSAMP(); // sure why not
renderPlayerTags();
И перед этим ставишь
Код:
if( cheat_state->_generic.hudinformacion == 1 )
{
uint32_t samp_info = ( uint32_t ) g_SAMP;
uint32_t func = g_dwSAMP_Addr + SAMP_FUNCUPDATESCOREBOARDDATA;
D3DCOLORcolor = D3DCOLOR_ARGB( 0xFF, 0xFF, 0x00, 0x00 );
floaty = 0.0f;
( y ) += 400.0f;
charbuf[512];
if ( cheat_state->state == CHEAT_STATE_VEHICLE )
{
intamount_players = getPlayerCount();
pD3DFontFixed->PrintShadow( 350.0f, y, color, "Informacion of Car" );
// Nick
color = D3DCOLOR_ARGB( 0xFF, 0x99, 0x99, 0x99 );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
sprintf( buf, "Nick: %s", getPlayerName(g_Players->sLocalPlayerID) );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// id
sprintf( buf, "ID: %u", g_Players->sLocalPlayerID );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Ping
sprintf( buf, "Ping: %u", g_Players->iLocalPlayerPing );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Level
sprintf( buf, "Level: %u", g_Players->iLocalPlayerScore );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Online Players
sprintf( buf, "Connected Players: %d", amount_players );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Position Cars
sprintf( buf, "Position Car: %0.2f %0.2f %0.2f",
g_Players->pLocalPlayer->inCarData.fPosition[0],
g_Players->pLocalPlayer->inCarData.fPosition[1],
g_Players->pLocalPlayer->inCarData.fPosition[2] );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Health Car
sprintf( buf, "Health Car: %0.2f",
g_Players->pLocalPlayer->inCarData.fVehicleHealth );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
}
else if ( cheat_state->state == CHEAT_STATE_ACTOR )
{
intamount_players = getPlayerCount();
pD3DFontFixed->PrintShadow( 350.0f, y, color, "Informacion of Player" );
// Nick
color = D3DCOLOR_ARGB( 0xFF, 0x99, 0x99, 0x99 );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
sprintf( buf, "Nick: %s", getPlayerName(g_Players->sLocalPlayerID) );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// id
sprintf( buf, "ID: %u", g_Players->sLocalPlayerID );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Ping
sprintf( buf, "Ping: %u", g_Players->iLocalPlayerPing );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Online Players
sprintf( buf, "Connected Players: %d", amount_players );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Level
sprintf( buf, "Level: %u", g_Players->iLocalPlayerScore );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Armor
sprintf( buf, "Armor: %u", g_Players->pLocalPlayer->onFootData.byteArmor );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Health
sprintf( buf, "Health: %u", g_Players->pLocalPlayer->onFootData.byteHealth );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Position
sprintf( buf, "Position: %0.2f %0.2f %0.2f",
g_Players->pLocalPlayer->onFootData.fPosition[0], g_Players->pLocalPlayer->onFootData.fPosition[1],
g_Players->pLocalPlayer->onFootData.fPosition[2] );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
__asm mov ecx, samp_info
__asm call func
}
}
Norma_Cheater
10.05.2013, 11:32
Вообще-то это надо сувать в proxyIDirect3DDevice9.cpp
Там ищешь
Код:
renderSAMP(); // sure why not
renderPlayerTags();
И перед этим ставишь
Код:
if( cheat_state->_generic.hudinformacion == 1 )
{
uint32_t samp_info = ( uint32_t ) g_SAMP;
uint32_t func = g_dwSAMP_Addr + SAMP_FUNCUPDATESCOREBOARDDATA;
D3DCOLORcolor = D3DCOLOR_ARGB( 0xFF, 0xFF, 0x00, 0x00 );
floaty = 0.0f;
( y ) += 400.0f;
charbuf[512];
if ( cheat_state->state == CHEAT_STATE_VEHICLE )
{
intamount_players = getPlayerCount();
pD3DFontFixed->PrintShadow( 350.0f, y, color, "Informacion of Car" );
// Nick
color = D3DCOLOR_ARGB( 0xFF, 0x99, 0x99, 0x99 );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
sprintf( buf, "Nick: %s", getPlayerName(g_Players->sLocalPlayerID) );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// id
sprintf( buf, "ID: %u", g_Players->sLocalPlayerID );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Ping
sprintf( buf, "Ping: %u", g_Players->iLocalPlayerPing );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Level
sprintf( buf, "Level: %u", g_Players->iLocalPlayerScore );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Online Players
sprintf( buf, "Connected Players: %d", amount_players );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Position Cars
sprintf( buf, "Position Car: %0.2f %0.2f %0.2f",
g_Players->pLocalPlayer->inCarData.fPosition[0],
g_Players->pLocalPlayer->inCarData.fPosition[1],
g_Players->pLocalPlayer->inCarData.fPosition[2] );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Health Car
sprintf( buf, "Health Car: %0.2f",
g_Players->pLocalPlayer->inCarData.fVehicleHealth );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
}
else if ( cheat_state->state == CHEAT_STATE_ACTOR )
{
intamount_players = getPlayerCount();
pD3DFontFixed->PrintShadow( 350.0f, y, color, "Informacion of Player" );
// Nick
color = D3DCOLOR_ARGB( 0xFF, 0x99, 0x99, 0x99 );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
sprintf( buf, "Nick: %s", getPlayerName(g_Players->sLocalPlayerID) );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// id
sprintf( buf, "ID: %u", g_Players->sLocalPlayerID );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Ping
sprintf( buf, "Ping: %u", g_Players->iLocalPlayerPing );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Online Players
sprintf( buf, "Connected Players: %d", amount_players );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Level
sprintf( buf, "Level: %u", g_Players->iLocalPlayerScore );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Armor
sprintf( buf, "Armor: %u", g_Players->pLocalPlayer->onFootData.byteArmor );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Health
sprintf( buf, "Health: %u", g_Players->pLocalPlayer->onFootData.byteHealth );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
// Position
sprintf( buf, "Position: %0.2f %0.2f %0.2f",
g_Players->pLocalPlayer->onFootData.fPosition[0], g_Players->pLocalPlayer->onFootData.fPosition[1],
g_Players->pLocalPlayer->onFootData.fPosition[2] );
pD3DFontFixed->PrintShadow( 350.0f, y, color, buf );
( y ) += 1.0f + pD3DFontFixed->DrawHeight();
__asm mov ecx, samp_info
__asm call func
}
}
Если ты хочешь что бы автоматом включалась то да, просто я вбил в меню поэтому ..
Если ты хочешь что бы автоматом включалась то да, просто я вбил в меню поэтому ..
вообще-то нет
вообще-то нет
В меню надо как раз то включать
RickAstley
10.05.2013, 11:47
ну так что, никто не поможет? куда бы я ни вставил этот код, постоянно появляются ошибки о необъявленном идентификаторе
ну так что, никто не поможет? куда бы я ни вставил этот код, постоянно появляются ошибки о необъявленном идентификаторе
щяс помогу
Norma_Cheater
10.05.2013, 12:18
В меню надо как раз то включать
Хз как у тебя но у меня так может это потому что ты юзаеш AntTweakBar хз.
Итак заходим в proxyIDirect3DDevice9.cpp
Там ищем
Код:
renderSAMP(); // sure why not
renderPlayerTags();
Перед ним добавляем
Код:
////////////////////////////////////////////Info Bar////////////////////////////////////////
if(cheat_state->_generic.shw == 1)
{
uint32_t samp_info = ( uint32_t ) g_SAMP;
uint32_t func = g_dwSAMP_Addr + SAMP_FUNCUPDATESCOREBOARDDATA;
__asm mov ecx, samp_info
__asm call func
float pos[3] = { 0, 0, 0 };
uint32_t bar_color = D3DCOLOR_ARGB( hud_bar->alpha, hud_bar->red, hud_bar->green, hud_bar->blue );
render->D3DBox( pos[0] + 911, pos[1] + 567, pos[2] + 450, 180.0f, bar_color );
pD3DFont->PrintShadow(1070, 573, D3DCOLOR_ARGB(255, 178, 34, 34), "INFO");
//
float *coord =
( cheat_state->state == CHEAT_STATE_VEHICLE ) ? cheat_state->vehicle.coords : cheat_state->actor.coords;
_snprintf_s( buf, sizeof(buf)-1, "Координаты: x-> %.2f y-> %.2f z-> %.2f", coord[0], coord[1], coord[2] );
pD3DFont->PrintShadow( 925, 595, D3DCOLOR_ARGB(255, 50, 205, 50), buf );
}
////////////////////////////////////////////Info Bar////////////////////////////////////////
В new_menu.cpp
Код:
TwAddVarRW(twBar_SPNewCheats, "INFO HUD", TW_TYPE_BOOLCPP, &cheat_state->_generic.shw, " ");
В cheat_generic.cpp
Код:
void cheat_handle_shw ()
{
traceLastFunc( "cheat_handle_shw()" );
if(cheat_state->_generic.shw == 1)
{
return;
}
}
P.S. Функции описаны в уроке выше
Хз как у тебя но у меня так может это потому что ты юзаеш AntTweakBar хз.
Я же там написал не включенную функцию, а проверку на включение.
fondamentolok
18.07.2013, 20:01
отлично а как изменить высоту? этой таблички
Меняй размер, если тебе её поднять то меняй координаты
fondamentolok
18.07.2013, 20:06
Меняй размер, если тебе её поднять то меняй координаты
нет я хочу опустить немного где координаты менять тут ( y ) += 400.0f ?
нет я хочу опустить немного где координаты менять тут ( y ) += 400.0f ?
Вроде
fondamentolok
18.07.2013, 20:10
Вроде
ок если че я отпишусь
fondamentolok
18.07.2013, 20:46
http://s48.radikal.ru/i122/1307/79/c5ebdd588123.png (https://www.blast.hk/redirect/aHR0cDovL3M0OC5yYWRpa2FsLnJ1L2kxMjIvMTMwNy83OS9jNW ViZGQ1ODgxMjMucG5n)
у меня написанно индентификатор не обьявлен че делать?
http://s48.radikal.ru/i122/1307/79/c5ebdd588123.png (https://www.blast.hk/redirect/aHR0cDovL3M0OC5yYWRpa2FsLnJ1L2kxMjIvMTMwNy83OS9jNW ViZGQ1ODgxMjMucG5n)
у меня написанно индентификатор не обьявлен че делать?
Код на сайте корявый, стучись сюда skype: lexboss25 помогу.
fondamentolok
18.07.2013, 22:12
Код на сайте корявый, стучись сюда skype: lexboss25 помогу.
я отправил запрос в скайп
и ище как сделать что бы эта панель была включена при входе в игру но в меню можно было выключить
fondamentolok
19.07.2013, 15:06
buf на buffer смени
http://s020.radikal.ru/i721/1307/7b/4b8cf6ac7532.png (https://www.blast.hk/redirect/aHR0cDovL3MwMjAucmFkaWthbC5ydS9pNzIxLzEzMDcvN2IvNG I4Y2Y2YWM3NTMyLnBuZw) не выходит смотри скрин
MISTER_GONWIK
10.03.2014, 19:25
Как сделать что бы включалось автоматом?
И в меню можно было выключить
в рендер самп запихать под условие загруженности структур сампа вот эту херню
Код:
cheat_state->_generic.hudinfomacion = 1
меню анттвик?
если нет, то слишком много объяснять придётся, не буду
MISTER_GONWIK
10.03.2014, 21:00
dump_menu
я сделал так
cheat.cpp
cheat_state->_generic.shw = 1;
cheat.h
int shw;
cheat_generic.cpp
Код:
void cheat_handle_shw()
{
traceLastFunc("cheat_handle_shw()");
if (cheat_state->_generic.shw == 1)
{
return;
}
}
proxyIDirect3DDevice9.cpp
Код:
if (cheat_state->_generic.shw == 1)
{
float pos[3] = { 0, 0, 0 };
uint32_t bar_color = D3DCOLOR_ARGB(hud_bar->alpha, hud_bar->red, hud_bar->green, hud_bar->blue);
render->D3DBox(pos[0] + 911, pos[1] + 824, pos[2] + 450, 180.0f, bar_color);
pD3DFont->PrintShadow(1070, 830, D3DCOLOR_ARGB(255, 178, 34, 34), "INFO");
//
float *coord =
(cheat_state->state == CHEAT_STATE_VEHICLE) ? cheat_state->vehicle.coords : cheat_state->actor.coords;
_snprintf_s(buf, sizeof(buf)-1, "Координаты: x-> %.2f y-> %.2f z-> %.2f", coord[0], coord[1], coord[2]);
pD3DFont->PrintShadow(925, 850, D3DCOLOR_ARGB(255, 50, 205, 50), buf);
}
Ура получилось функция включилась сама но!!
Включилась она после удаления этих строк с кода
Код:
uint32_t samp_info = ( uint32_t ) g_SAMP;
uint32_t func = g_dwSAMP_Addr + SAMP_FUNCUPDATESCOREBOARDDATA;
__asm mov ecx, samp_info
__asm call func
Функция появилась до загрузки самой игры смотри картинку
http://s020.radikal.ru/i717/1403/86/b1eb7197dbc7.png
Как сделать что бы до загрузки игры панель не появлялась?
if ( g_SAMP == NULL )
return;
Gamer1912
31.03.2014, 12:18
у меня ошибку выбивает, видно я кривой, щас опять заного буду!
MasterCard
31.03.2014, 18:43
Лог ошибки выложи.
Как сделать что бы функция была всегда активна?
^ гонщик написал, что бы она была включена всегда, надо в рендер самп запихнуть это:
PHP:
cheat_state
-
>
_generic
.
hudinfomacion
=
1
Я написал, всё работает, но... при подключении к любому серверу пишет следующие - you are banned from this server.
Итак заходим в proxyIDirect3DDevice9.cpp
Там ищем
Код:
renderSAMP(); // sure why not
renderPlayerTags();
Перед ним добавляем
Код:
////////////////////////////////////////////Info Bar////////////////////////////////////////
if(cheat_state->_generic.shw == 1)
{
uint32_t samp_info = ( uint32_t ) g_SAMP;
uint32_t func = g_dwSAMP_Addr + SAMP_FUNCUPDATESCOREBOARDDATA;
__asm mov ecx, samp_info
__asm call func
float pos[3] = { 0, 0, 0 };
uint32_t bar_color = D3DCOLOR_ARGB( hud_bar->alpha, hud_bar->red, hud_bar->green, hud_bar->blue );
render->D3DBox( pos[0] + 911, pos[1] + 567, pos[2] + 450, 180.0f, bar_color );
pD3DFont->PrintShadow(1070, 573, D3DCOLOR_ARGB(255, 178, 34, 34), "INFO");
//
float *coord =
( cheat_state->state == CHEAT_STATE_VEHICLE ) ? cheat_state->vehicle.coords : cheat_state->actor.coords;
_snprintf_s( buf, sizeof(buf)-1, "Координаты: x-> %.2f y-> %.2f z-> %.2f", coord[0], coord[1], coord[2] );
pD3DFont->PrintShadow( 925, 595, D3DCOLOR_ARGB(255, 50, 205, 50), buf );
}
////////////////////////////////////////////Info Bar////////////////////////////////////////
В new_menu.cpp
Код:
TwAddVarRW(twBar_SPNewCheats, "INFO HUD", TW_TYPE_BOOLCPP, &cheat_state->_generic.shw, " ");
В cheat_generic.cpp
Код:
void cheat_handle_shw ()
{
traceLastFunc( "cheat_handle_shw()" );
if(cheat_state->_generic.shw == 1)
{
return;
}
}
P.S. Функции описаны в уроке выше
а как сделать чсто бы оно было в углу левом, и не зависемо от разрешения экрана
vBulletin® v3.8.14, Copyright ©2000-2026, vBulletin Solutions, Inc. Перевод: zCarot