24.08.2010, 16:21
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
Now lets start with our variables
Now it should like this
Now lets add a game text for players.
Now just need add the components with
here its one exaple how it should look
the code now it done and should look like this
Well enjoy modding your vehicles
First off all go to "onplayercommand" then create the strcmp command
PHP Code:
if(strcmp(cmdtext, "/autotune", true) == 0)
PHP Code:
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
PHP Code:
if(strcmp(cmdtext, "/autotune", true) == 0)
{
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
return 1;
}
PHP Code:
GameTextForPlayer(playerid,"~b~Car auto modded!", 4000, 5);
PHP Code:
AddVehicleComponent
PHP Code:
AddVehicleComponent(VehicleID, 1003); //spoiler
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;
}