[c++] CreateVehicle & CreateObject (0.3.7)

y0mike

Active member
Joined
May 10, 2014
Messages
97
Reaction score
41
Location
mizus girl's house
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]
 

0x_

Wtf I'm not new....
Staff member
Administrator
Joined
Feb 18, 2013
Messages
1,122
Reaction score
173
RE: [c++} CreateVehicle & CreateObject

Nice, but please add the samp version as prefix / suffix. Thanks.
 

mistery

Well-known member
Joined
Apr 23, 2014
Messages
262
Reaction score
5
RE: [c++} CreateVehicle & CreateObject

owww yess
 

Strechea

Active member
Joined
Jan 26, 2017
Messages
28
Reaction score
2
It's okay but you can give me the project (i have vs 2015 pro with updates), thanks
 
Top