Make cmd to auto tune vehicles -
Jamal' - 24.08.2010
Hello im just posting a usefull and easy method to make a tune command.
First off all go to "onplayercommand" then create the strcmp command
PHP Code:
if(strcmp(cmdtext, "/autotune", true) == 0)
Now lets start with our variables
PHP Code:
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
Now it should like this
PHP Code:
if(strcmp(cmdtext, "/autotune", true) == 0)
{
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
return 1;
}
Now lets add a game text for players.
PHP Code:
GameTextForPlayer(playerid,"~b~Car auto modded!", 4000, 5);
Now just need add the components with
PHP Code:
AddVehicleComponent
here its one exaple how it should look
PHP Code:
AddVehicleComponent(VehicleID, 1003); //spoiler
the code now it done and should look like this
PHP Code:
if(strcmp(cmdtext, "/autotune", true) == 0)
{
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
GameTextForPlayer(playerid,"~b~Car modded!", 4000, 5);
AddVehicleComponent(VehicleID, 1087); //hidraulic
AddVehicleComponent(VehicleID, 1078); // wheels
AddVehicleComponent(VehicleID, 1010); //nos 10x
AddVehicleComponent(VehicleID, 1003); //spoiler
AddVehicleComponent(VehicleID, 1018); //exaust
return 1;
}
Well enjoy modding your vehicles
Re: Make cmd to auto tune vehicles -
DiddyBop - 24.08.2010
Good for noobs i gues..
use [pawn] Tags.. not [php]
Re: Make cmd to auto tune vehicles -
Brian_Furious - 24.08.2010
Ye, simple but nice and useful for beginers
Re: Make cmd to auto tune vehicles -
Carlisle - 24.08.2010
Nice tutorial
Re: Make cmd to auto tune vehicles -
Jamal' - 24.08.2010
Thank you
Re: Make cmd to auto tune vehicles -
Vince - 24.08.2010
This can be used maliciously. When trying to add a spoiler to a vehicle that doesn't support spoilers, the game will generate an opcode warning for everyone that has the specific vehicle streamed in. A person that spams this command can crash everyone (including himself) that is in range.
Re: Make cmd to auto tune vehicles -
Marshall_Banks - 25.08.2010
how do i make it add random rims/colors?
Re: Make cmd to auto tune vehicles -
olabv - 14.12.2010
you can but it will take awhile.
Re: Make cmd to auto tune vehicles -
basse - 17.01.2012
I tried to make this in a dialog It got 3 errors and is there any way to fix this?
Re : Make cmd to auto tune vehicles -
McBaguette - 26.04.2012
Don't work !
PHP Code:
if(strcmp(cmdtext, "/autotune", true) == 0)
{
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
GameTextForPlayer(playerid,"~b~Car modded!", 4000, 5);
AddVehicleComponent(VehicleID, 1087); //hidraulic
AddVehicleComponent(VehicleID, 1078); // wheels
AddVehicleComponent(VehicleID, 1010); //nos 10x
AddVehicleComponent(VehicleID, 1003); //spoiler
AddVehicleComponent(VehicleID, 1018); //exaust
return 1;
}
you forget "}"
PHP Code:
if(strcmp(cmdtext, "/autotune", true) == 0)
{
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
GameTextForPlayer(playerid,"~b~Car modded!", 4000, 5);
AddVehicleComponent(VehicleID, 1087); //hidraulic
AddVehicleComponent(VehicleID, 1078); // wheels
AddVehicleComponent(VehicleID, 1010); //nos 10x
AddVehicleComponent(VehicleID, 1003); //spoiler
} AddVehicleComponent(VehicleID, 1018); //exaust
return 1;
}