SA-MP Forums Archive
Autotuning? - 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: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Autotuning? (/showthread.php?tid=177856)



Autotuning? - Face9000 - 19.09.2010

Hi all,someone have some FS that can tune any car with a command??

Thanks


Re: Autotuning? - Face9000 - 20.09.2010

BUMP XD


Re: Autotuning? - Gh0sT_ - 20.09.2010

ok, sorry for zcmd, cuz im using it..
Quote:

COMMAND:tune(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid))
{
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "You need vehicle, to use this command!", "Close", "Close");
return 1;}
#pragma unused params
if(Tuning[playerid] == 1){ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "You can use this command now!", "Close", "Close"); return 1;}
Tuning[playerid] = 1;
RepairVehicle(GetPlayerVehicleID(playerid));
AddVehicleComponent(GetPlayerVehicleID(playerid), 1087);
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
AddVehicleComponent(GetPlayerVehicleID(playerid), 1080);
SetTimerEx("Tune", 60000*5, false, "i", playerid);
return 1;
}

than top of script:
Quote:

forward Tune(playerid);
new Tuning [ MAX_PLAYERS ];

and somewhere
Quote:

public Tune(playerid)
{
Tuning[playerid] = 0;
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "You can use command /tune!", "Close", "Close");
return 1;
}

P.S: this cmd players can use only 1time per 5min.