0x32789
Expert
Hi, How would I put objective marker above a vehicle in m0d_sa, I don't know it because I haven't digged in the game and game_sa files..
thanks!
I found this: g_SAMP->pPools->pVehicle->pSAMP_Vehicle[vid]->byteIsObjective = true;
it works fine but I don't know how and where should I disable it.. I want to do it like something....
When I hold LBUTTON then a marker on the nearest vehicle appears but I don't know how should I disable it.. I have successfully done it till enabling the marker and now where should I disable it, It should disable when I stop holding LBUTTON
this is my current code, but I think if the car/actor tps or goes away then the marker will stay isnt it?
[shcode=cpp]
if(nearest_id != -1)
{
if(nearest->vehicle != nullptr)
{
if(KEY_DOWN(VK_LBUTTON))
{
int vid = getSAMPVehicleIDFromGTAVehicle(nearest->vehicle);
g_SAMP->pPools->pVehicle->pSAMP_Vehicle[vid]->byteIsObjective = true;
}
else
{
int vid = getSAMPVehicleIDFromGTAVehicle(nearest->vehicle);
g_SAMP->pPools->pVehicle->pSAMP_Vehicle[vid]->byteIsObjective = false;
}
}
}
[/shcode]
thanks!
I found this: g_SAMP->pPools->pVehicle->pSAMP_Vehicle[vid]->byteIsObjective = true;
it works fine but I don't know how and where should I disable it.. I want to do it like something....
When I hold LBUTTON then a marker on the nearest vehicle appears but I don't know how should I disable it.. I have successfully done it till enabling the marker and now where should I disable it, It should disable when I stop holding LBUTTON
this is my current code, but I think if the car/actor tps or goes away then the marker will stay isnt it?
[shcode=cpp]
if(nearest_id != -1)
{
if(nearest->vehicle != nullptr)
{
if(KEY_DOWN(VK_LBUTTON))
{
int vid = getSAMPVehicleIDFromGTAVehicle(nearest->vehicle);
g_SAMP->pPools->pVehicle->pSAMP_Vehicle[vid]->byteIsObjective = true;
}
else
{
int vid = getSAMPVehicleIDFromGTAVehicle(nearest->vehicle);
g_SAMP->pPools->pVehicle->pSAMP_Vehicle[vid]->byteIsObjective = false;
}
}
}
[/shcode]