SA-MP Forums Archive
[Tutorial] Make cmd to auto tune vehicles - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Make cmd to auto tune vehicles (/showthread.php?tid=170895)



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!"40005); 
Now just need add the components with
PHP Code:
AddVehicleComponent 
here its one exaple how it should look
PHP Code:
AddVehicleComponent(VehicleID1003); //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!"40005);
            
AddVehicleComponent(VehicleID1087); //hidraulic
            
AddVehicleComponent(VehicleID1078); // wheels
            
AddVehicleComponent(VehicleID1010); //nos 10x
            
AddVehicleComponent(VehicleID1003); //spoiler
            
AddVehicleComponent(VehicleID1018); //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!"40005);
            
AddVehicleComponent(VehicleID1087); //hidraulic
            
AddVehicleComponent(VehicleID1078); // wheels
            
AddVehicleComponent(VehicleID1010); //nos 10x
            
AddVehicleComponent(VehicleID1003); //spoiler
            
AddVehicleComponent(VehicleID1018); //exaust
    
return 1;

you forget "}"

PHP Code:
if(strcmp(cmdtext"/autotune"true) == 0)
{
            new 
VehicleID;
            
VehicleID GetPlayerVehicleID(playerid);
            
GameTextForPlayer(playerid,"~b~Car modded!"40005);
            
AddVehicleComponent(VehicleID1087); //hidraulic
            
AddVehicleComponent(VehicleID1078); // wheels
            
AddVehicleComponent(VehicleID1010); //nos 10x
            
AddVehicleComponent(VehicleID1003); //spoiler
}            AddVehicleComponent(VehicleID1018); //exaust
    
return 1;