RepairVehicle not working
#1

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
Reply
#2

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

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

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
Reply
#5

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

It will repair your body also, Julian.
Reply
#6

It doesnt for me. Maby diffrent Repair command.
Reply
#7

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

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.
Reply
#9

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;
}
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)