Vehicle nos?
#5

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:

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;
}
Reply


Messages In This Thread
Vehicle nos? - by Guitar - 30.05.2013, 11:13
Re: Vehicle nos? - by IceBilizard - 30.05.2013, 11:14
Re: Vehicle nos? - by Littlehelper - 30.05.2013, 11:15
AW: Vehicle nos? - by HurtLocker - 30.05.2013, 11:16
Re: Vehicle nos? - by GiamPy. - 30.05.2013, 11:18
Re: AW: Vehicle nos? - by Littlehelper - 30.05.2013, 11:20

Forum Jump:


Users browsing this thread: 2 Guest(s)