Get Vehicle Nitro - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Get Vehicle Nitro (
/showthread.php?tid=655218)
Get Vehicle Nitro -
cellps - 16.06.2018
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.
Re: Get Vehicle Nitro -
AzaMx - 16.06.2018
Try this maybe?
https://sampforum.blast.hk/showthread.php?tid=314604
Re: Get Vehicle Nitro -
AgusZ - 16.06.2018
Use GetVehicleComponentType and GetVehicleComponentInSlot
see
https://sampwiki.blast.hk/wiki/GetVehicleComponentType and
https://sampwiki.blast.hk/wiki/GetVehicleComponentInSlot.
Re: Get Vehicle Nitro -
Ultraz - 16.06.2018
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;
}