Command that puts nitro on a car
#7

Quote:
Originally Posted by Grooty
Посмотреть сообщение
But if it's vehicle > 0, that means they aren't in a car.
Then it will send the message.
Wrong, if the vehicle ID is above 0, then the player is in Some car, you don't know which car it is, you just know its ID is above 0.
for example, let's say a player is an infernus:

pawn Код:
CMD:nitro(playerid, params[])
{
    new vehicle; // Vehicle ID Will be saved here
    vehicle = GetPlayerVehicleID(playerid); // vehicle = 411 (Infernus ID)
    if(vehicle > 0) // if(411 > 0) --> Returns True
    { // then
        AddVehicleComponent(vehicle, 1010); // Gives nitrous
    }
    else SendClientMessage(playerid,0xFF0000FF,"You are not in a vehicle!");
    return 1;
}
Easy
Reply


Messages In This Thread
Command that puts nitro on a car - by cowmilker69 - 17.07.2013, 23:16
Re: Command that puts nitro on a car - by PabuLetz - 18.07.2013, 00:00
Re: Command that puts nitro on a car - by Grooty - 18.07.2013, 01:49
Re: Command that puts nitro on a car - by Calvingreen17 - 18.07.2013, 02:45
Re: Command that puts nitro on a car - by Elie1996 - 18.07.2013, 08:29
Re: Command that puts nitro on a car - by Grooty - 18.07.2013, 14:02
Re: Command that puts nitro on a car - by Elie1996 - 18.07.2013, 18:04

Forum Jump:


Users browsing this thread: 1 Guest(s)