SA-MP Forums Archive
RepairVehicle not working - 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: RepairVehicle not working (/showthread.php?tid=103128)



RepairVehicle not working - vascofg - 18.10.2009

Guys i'm using this on my gamemode file:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/repair", cmdtext))
{
if(IsPlayerInAnyVehicle(playerid))
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!");
}
else SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
return 1;
}
}

and it's not working.
Can you please help me?

Thanks


Re: RepairVehicle not working - Julian2574 - 18.10.2009

What GM are you using? And don't tell me you got 2 public OnPlayerCommandText(playerid, cmdtext[])



Re: RepairVehicle not working - vascofg - 18.10.2009

No, i only have one.
And i'm using the default one.


Re: RepairVehicle not working - Julian2574 - 18.10.2009

When it repairs it only repairs you'r car life not that it will look fine again becouse you need to go to Pay n' Spray


Re: RepairVehicle not working - Karlip - 18.10.2009

Can you tell us, how it's not working?

It will repair your body also, Julian.


Re: RepairVehicle not working - Julian2574 - 18.10.2009

It doesnt for me. Maby diffrent Repair command.


Re: RepairVehicle not working - vascofg - 18.10.2009

It's not working because the commands dont do anything, not even a Wrong Command, nothing.


Re: RepairVehicle not working - RoamPT - 18.10.2009

Quote:
Originally Posted by »Julian©NJRP™«
When it repairs it only repairs you'r car life not that it will look fine again becouse you need to go to Pay n' Spray
Wrong, it repairs car hp and body damage, like paint'n'spray.


Re: RepairVehicle not working - Walk_M4n - 18.10.2009

Try this:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if (!strcmp("/repair", cmdtext))
  {
    if(IsPlayerInAnyVehicle(playerid))
    {
      RepairVehicle(GetPlayerVehicleID(playerid));
      SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!");
    }
    else SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
    return 1;
  }
  return 0;
}



Re: RepairVehicle not working - beckzy - 18.10.2009

It doesn't work on Dune id 573 but that is a SA-MP bug