PDA

View Full Version : [Tutorial] Make cmd to auto tune vehicles


Jamal'
24/08/2010, 04:21 PM
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 if(strcmp(cmdtext, "/autotune", true) == 0)

Now lets start with our variables new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);

Now it should like this if(strcmp(cmdtext, "/autotune", true) == 0)
{
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
return 1;
}

Now lets add a game text for players. GameTextForPlayer(playerid,"~b~Car auto modded!", 4000, 5);

Now just need add the components with AddVehicleComponent

here its one exaple how it should look AddVehicleComponent(VehicleID, 1003); //spoiler

the code now it done and should look like this

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 :)

DiddyBop
24/08/2010, 04:24 PM
Good for noobs i gues..

use [pawn] Tags.. not [php]

Brian_Furious
24/08/2010, 04:33 PM
Ye, simple but nice and useful for beginers :)

Carlisle
24/08/2010, 04:40 PM
Nice tutorial

Jamal'
24/08/2010, 05:00 PM
Thank you

Vince
24/08/2010, 05:46 PM
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.

Marshall_Banks
25/08/2010, 03:07 AM
how do i make it add random rims/colors?

olabv
14/12/2010, 11:39 PM
you can but it will take awhile.

basse
17/01/2012, 02:47 PM
I tried to make this in a dialog It got 3 errors and is there any way to fix this?

McBaguette
26/04/2012, 09:52 AM
Don't work !

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 "}"

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

McBaguette
26/04/2012, 10:01 AM
Don't work !

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 "}"

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