Add nitro?
#1

How to add nitro in ALL the cars:

This doesnt work:

pawn Код:
CMD:nitro(playerid, params[])
{
   if(GetPlayerSkin(playerid) == 59 || GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 282 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 283 || GetPlayerSkin(playerid) == 288)
    {
   if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "(INFO) You are not in a vehicle!");
   new vehicleid = GetPlayerVehicleID(playerid);
   AddVehicleComponent(154, 1010); // x10 nitro
   SendClientMessage(playerid, COLOR_GOLD, "(INFO) Your vehicle has been equipped with a nitro!");
   }
   else return SendClientMessage(playerid, COLOR_RED, "(INFO) You are not a BCSD Officer!");
   return (1);
}
Reply
#2

change this
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
   AddVehicleComponent(154, 1010); // x10 nitro
to this
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
   AddVehicleComponent(vehicleid , 1010); // x10 nitro
you where only adding it to veh 154

as a side note you may want to make sure a vehicle can use nitro and also see if it
already has it.

regards,
Reply
#3

Top of Script :

pawn Код:
new TuneCar[MAX_PLAYERS];
Command :

pawn Код:
CMD:nitro(playerid, params[])
{
   if(GetPlayerSkin(playerid) == 59 || GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 282 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 283 || GetPlayerSkin(playerid) == 288)
    {
   if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "(INFO) You are not in a vehicle!");
   TuneCar[playerid] = GetPlayerVehicleID(playerid);
   AddVehicleComponent(TuneCar[playerid], 1010); // x10 nitro
   SendClientMessage(playerid, COLOR_GOLD, "(INFO) Your vehicle has been equipped with a nitro!");
   }
   else return SendClientMessage(playerid, COLOR_RED, "(INFO) You are not a BCSD Officer!");
   return (1);
}
Try This.
Reply
#4

Try this:
pawn Код:
CMD:nitro(playerid, params[])
{
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You are not in a vehicle!");
    if(GetVehicleComponentInSlot(GetPlayerVehicleID(playerid),GetVehicleComponentType(1010)) != 1010) // Check if the vehicle has no nitro
    {
        AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
        PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
    }
    return 1;
}
This working for me
Reply
#5

why does he need an array for this?
its just a waste!!!!
Reply
#6

Quote:
Originally Posted by Jonny5
Посмотреть сообщение
change this
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
   AddVehicleComponent(154, 1010); // x10 nitro
to this
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
   AddVehicleComponent(vehicleid , 1010); // x10 nitro
you where only adding it to veh 154

as a side note you may want to make sure a vehicle can use nitro and also see if it
already has it.

regards,
This!
Reply
#7

Quote:
Originally Posted by Jonny5
Посмотреть сообщение
change this
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
   AddVehicleComponent(154, 1010); // x10 nitro
to this
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
   AddVehicleComponent(vehicleid , 1010); // x10 nitro
you where only adding it to veh 154

as a side note you may want to make sure a vehicle can use nitro and also see if it
already has it.

regards,
This script is working, i tested it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)