mod_sa 4.4.1.2 // blast.hk boom

Статус
В этой теме нельзя размещать новые ответы.

seek1

Известный
Автор темы
21
0
void cmd_boom ( char *param )
{
struct actor_info *info = actor_info_get( ACTOR_SELF, 0 );
float pPos[3] = {info->step_pos[0], info->step_pos[1], info->step_pos[2]};
struct vehicle_info *vinfo = g_Players->pRemotePlayer[atoi(param)]->pPlayerData->pSAMP_Vehicle->pGTA_Vehicle;
float spd[3] = {0,0,0};
pPos[2] += 50;
SendFakeDriverSyncData( getSAMPVehicleIDFromGTAVehicle(vinfo), pPos, 0.0f, spd, 0);
}




[13:44:54.456] ---------------------------------------------------------------------
[13:44:54.456] mod_sa 4.4.1.2 // blast.hk has crashed.
[13:44:54.456] Base address: 0x05D20000, SA:MP base address: 0x04220000
[13:44:54.456] Exception at address: 0x05D2203F, Last function processed: it_wasnt_us()
[13:44:54.456] Cause: EXCEPTION_ACCESS_VIOLATION
[13:44:54.456] Attempted to read from: 0x0000004c
[13:44:54.456] EAX: 0x00000000 || ESI: 0x0b9dbea8
[13:44:54.456] EBX: 0x0b9dd38c || EDI: 0x0b9dd392
[13:44:54.456] ECX: 0x0177f8e4 || EBP: 0x0177f8f0
[13:44:54.456] EDX: 0x00000008 || ESP: 0x0177f8cc
[13:44:54.456] -------------------------------------
 

seek1

Известный
Автор темы
21
0
int playerid = atoi(params);
float pos[3];
int Ppos = getPlayerPos(atoi(params), pos);
if (!Ppos)
{
return addMessageToChatWindow("Player does not exist.");
}

pos[2] += 2;
float spd[3] = { 0, 0, 0 };
actor_info *actor = nullptr;

if (!getPlayerPos(playerid, pos) ||
g_Players->pRemotePlayer[playerid]->pPlayerData == nullptr ||
g_Players->pRemotePlayer[playerid]->pPlayerData->pSAMP_Actor == nullptr ||
(actor = g_Players->pRemotePlayer[playerid]->pPlayerData->pSAMP_Actor->pGTA_Ped) == nullptr)
{
return addMessageToChatWindow("Bad player info.");
}
int VehicleID = vehicle_find_nearest(VEHICLE_ALIVE + VEHICLE_NOTBURNING);
if (VehicleID == NULL) return;
struct actor_info *self = actor_info_get(-1, 0);
struct vehicle_info *vinfo = vehicle_info_get(VehicleID, 0);
g_RakClient->SendPickUp(VehicleID);
Sleep(10);
vinfo->hitpoints = 0.0f; // Подпал
cheat_vehicle_teleport(vinfo, pos, 0);
g_RakClient->SendFakeDriverSyncData(getSAMPVehicleIDFromGTAVehicle(vinfo), pos, 0.0f, spd);



какая это не правильно
 

seek1

Известный
Автор темы
21
0
struct actor_info *self = actor_info_get(ACTOR_SELF, ACTOR_ALIVE);
for (int v = 0; v < SAMP_MAX_VEHICLES; v++)
{
if (!g_Vehicles->iIsListed[v]) continue;
if (!g_Vehicles->pSAMP_Vehicle[v]) continue;
if (!g_Vehicles->pSAMP_Vehicle[v]->pGTA_Vehicle) continue;
if (g_Vehicles->pSAMP_Vehicle[v]->iIsLocked) continue;

int car_id = (int)(((DWORD)g_Vehicles->pGTA_Vehicle[v]) - (DWORD)pool_vehicle->start) / 2584;
struct vehicle_info *info = vehicle_info_get(car_id, 0);

if (info->passengers[0]) continue;

int iSAMPVehicleID = getSAMPVehicleIDFromGTAVehicle(info);
if (iSAMPVehicleID == g_Players->pLocalPlayer->sCurrentVehicleID) continue;

float fPos[3], fSpd[3] = { 0.0f, 0.0f, -0.4f };
vect3_copy(&info->base.matrix[12], fPos);

int id = atoi(param);
getPlayerPos(id, fPos);
fPos[2] += 4.0f;
g_RakClient->SendEnterPlayerVehicle(iSAMPVehicleID, 0);
Sleep(10);
g_RakClient->SendFakeDriverSyncData(iSAMPVehicleID, fPos, info->hitpoints = 0.0f, fSpd);
cheat_vehicle_teleport(info, fPos, gta_interior_id_get());
info->speed[2] = -0.4f;
break;
 
Статус
В этой теме нельзя размещать новые ответы.