30.05.2013, 11:18
First of all, you must check if a player is either inside a vehicle or not, in order to avoid any kind of issues.
Once the check is passed, you must take the player's vehicle ID by using GetPlayerVehicleID and add the vehicle component (AddVehicleComponent) 1010 that you could have found in the wiki page.
If you're using ZCMD, this should be the script:
Once the check is passed, you must take the player's vehicle ID by using GetPlayerVehicleID and add the vehicle component (AddVehicleComponent) 1010 that you could have found in the wiki page.
If you're using ZCMD, this should be the script:
pawn Код:
CMD:nos(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle.");
new vehicleID = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicleID, 1010); // Nitro
SendClientMessage(playerid, 0xFFFFFFFF, "The nitro has been installed in your vehicle.");
return 1;
}