y0mike
Active member
nothing new, found this like a year ago and havnt seen a post about i so why not
[shcode=cpp]
void CreateObject( int modelId, float x, float y, float z, int rotationX, int rotationY, int rotationZ, float drawDistance = 0.0f )
{
typedef int( __stdcall* CreateObjectFn )( int, float, float, float, char, int, int, float );
CreateObjectFn pfnCreateObject = ( CreateObjectFn ) ( m_dwSAMP + 0x9B970 );
pfnCreateObject( modelId, x, y, z, rotationX, rotationY, rotationZ, drawDistance );
}
DWORD CreateVehicle( int vehicleID, CVector pos, int color )
{
typedef DWORD ( __thiscall* CreateVehicleFn )( char*, int, float, float, float, float, int );
CreateVehicleFn pfnCreateVehicle = reinterpret_cast< CreateVehicleFn >( m_dwSAMP + 0x9B890 );
return pfnCreateVehicle( ( char* )( *( DWORD** )( m_dwSAMP + 0x21A10C ) ), vehicleID, pos.fX, pos.fY, pos.fZ, 1.0f, color );
}
[/shcode]
[shcode=cpp]
void CreateObject( int modelId, float x, float y, float z, int rotationX, int rotationY, int rotationZ, float drawDistance = 0.0f )
{
typedef int( __stdcall* CreateObjectFn )( int, float, float, float, char, int, int, float );
CreateObjectFn pfnCreateObject = ( CreateObjectFn ) ( m_dwSAMP + 0x9B970 );
pfnCreateObject( modelId, x, y, z, rotationX, rotationY, rotationZ, drawDistance );
}
DWORD CreateVehicle( int vehicleID, CVector pos, int color )
{
typedef DWORD ( __thiscall* CreateVehicleFn )( char*, int, float, float, float, float, int );
CreateVehicleFn pfnCreateVehicle = reinterpret_cast< CreateVehicleFn >( m_dwSAMP + 0x9B890 );
return pfnCreateVehicle( ( char* )( *( DWORD** )( m_dwSAMP + 0x21A10C ) ), vehicleID, pos.fX, pos.fY, pos.fZ, 1.0f, color );
}
[/shcode]