Stealing 0.3z [Need fixed and updated]!

Status
Not open for further replies.

Lerrypas

Member
Joined
Dec 16, 2013
Messages
5
Reaction score
0
Hey guys,

I am searching something that can steal objects In Game. I have a S0b version but it crash my game so i need the updated one.

Hope FPY or someone will give me it.
 

mgmoldova

Active member
Joined
Mar 20, 2013
Messages
37
Reaction score
0
Code:
void cmd_save_objects (char *param) 
{   
   FILE    *flStolenObjects = NULL; 
   char    filename[512]; 
   snprintf( filename, sizeof(filename), "%s\\stolen_objects.txt", g_szWorkingDirectory); 

   flStolenObjects = fopen( filename, "a" ); 
   if (flStolenObjects == NULL)return; 

   DWORD baseObjAddr; 
   float rotMatrix[3]; 
   int objectscount = 0, radius = 0; 
   char comment[50]; 
   const struct actor_info *actor_self = actor_info_get( ACTOR_SELF, 0 ); 
   float dist[3] = { 0.0f, 0.0f, 0.0f }; 
   strcpy(comment, ""); 
   sscanf(param, "%d %[^\n]s", &radius, comment); 
   fprintf(flStolenObjects, "// ================= [SAMP OBJECTS STEALER ] =================\n"); 
   if(strlen(comment))fprintf(flStolenObjects, "// %s\n", comment); 
   for (int i = 0; i < SAMP_OBJECTS_MAX; i++ ) 
   { 
    if ( g_SAMP->pPools.pPool_Object->iIsListed[i] != 1 ) 
     continue; 
    if ( g_SAMP->pPools.pPool_Object->object[i] == NULL ) 
     continue; 
    if ( g_SAMP->pPools.pPool_Object->object[i]->pGTAObject == NULL ) 
     continue; 

    float    pos[3]; 
    vect3_copy( &g_SAMP->pPools.pPool_Object->object[i]->pGTAObject->base.matrix[4 * 3], pos ); 
    if ( vect3_near_zero(pos) ) 
     continue; 
    vect3_vect3_sub( &g_SAMP->pPools.pPool_Object->object[i]->pGTAObject->base.matrix[4 * 3], &actor_self->base.matrix[4 * 3], dist ); 

    if(vect3_length(dist) > radius && radius)continue; 
    baseObjAddr = (DWORD)g_SAMP->pPools.pPool_Object->object[i]; 
    rotMatrix[0] = *(float *)(baseObjAddr + 0xAC); 
    rotMatrix[1] = *(float *)(baseObjAddr + 0xB0); 
    rotMatrix[2] = *(float *)(baseObjAddr + 0xB4); 
    fprintf(flStolenObjects, "CreateObject(%d, %.4f, %.4f, %.4f, %.4f, %.4f, %.4f); // object (%d)\n", g_SAMP->pPools.pPool_Object->object[i]->pGTAObject->base.model_alt_id, pos[0], pos[1], pos[2], 
     rotMatrix[0], rotMatrix[1], rotMatrix[2], i); 
    objectscount++; 
   } 

   fclose(flStolenObjects); 

   addMessageToChatWindow("%d objects saved to stolen_objects.txt file.", objectscount); 
} 

void init_samp_chat_cmds(): 
addClientCommand("save_objects", (int)cmd_save_objects);

sage:
/save_objects - get all objects from pool
/save_objects 10 - get objects in radius 10.0
/save_objects 100 stunt zone - get objects in radius 100.0 and print comment "stunt zone"
 
Status
Not open for further replies.
Top