no i need a cmd like /c autofix on and /c autofix off
put this on where you can find it can be put
[pawn]public autofix(playerid)
{
if(!IsPlayerInAnyVehicle(playerid)) return 1;
else if ( (GetPlayerVehicleID(playerid) == 155) || ( GetPlayerVehicleID(playerid) == 177) ) return 1;
else
{
SetVehicleTyre(GetPlayerVehicleID(playerid), 1);
SetVehicleLights(GetPlayerVehicleID(playerid), 0);
SetVehicleHealth(GetPlayerVehicleID(playerid),1000);
}
}[/pawn]
put this under onplayercommandtext
[pawn]public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmd, "autofix", true) == 0)
{
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) SendClientMessage(playerid, 0x660000AA,"Error: Invalid Syntax - Use /c autofix [on/off]";
else {
if(strcmp(tmp, "on", true) == 0)
{
new plaque[244];
format(plaque,244,"autofix(playerid)");
SetTimer(plaque, 10, 1);
}
else if(strcmp(tmp, "off", true) == 0)
{
KillTimer(0);
return 1;
}[/pawn]
it will auto-fix the vehicle (god-mode for vehicle)
NOTE: THIS IS NOT TESTED SO MAKE A BACKUP OF SCRIPT AND THIS WILL ONLY WORK IF YOU DONT HAVE OTHER TIMERS