Get Vehicle Nitro
#1

Hi everyone, I am making a speedometer system, and I would like to get the amount of nitro that is in the vehicle, I do not know where to start and I looked but I did not find anything related here in the forum.
Reply
#2

Try this maybe? https://sampforum.blast.hk/showthread.php?tid=314604
Reply
#3

Use GetVehicleComponentType and GetVehicleComponentInSlot

see https://sampwiki.blast.hk/wiki/GetVehicleComponentType and https://sampwiki.blast.hk/wiki/GetVehicleComponentInSlot.
Reply
#4

Use GetVehicleComponentType variables & check sa-mp wikipedia's source.
Код:
public OnVehicleMod(playerid, vehicleid, componentid)
{
    new componentType = GetVehicleComponentType(componentid);
 
    if(componentType != -1)
    {
        new clientMessage[41];
 
        format(clientMessage, sizeof(clientMessage), "You have modified your vehicle on slot %i", componentType);
        SendClientMessage(playerid, 0xFFFFFFFF, clientMessage);
    }
    else
    {
        SendClientMessage(playerid, 0xFF0000FF, "The component is invalid.");
    }
 
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)