SA-MP Forums Archive
[REQUEST]/vr command - 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: [REQUEST]/vr command (/showthread.php?tid=105194)



[REQUEST]/vr command - breakpaper - 28.10.2009

i want a /vr command that the car is fixed,
i have one but then the health comes to 100%
but the car is damaged from the outside
i want that the car fully fixed and not only damage but the outside to!


Re: [REQUEST]/vr command - radi - 28.10.2009

wrong section but here

pawn Код:
if(strcmp(cmd, "/vr", true) ==0 || strcmp(cmd, "/arepair", true) ==0)
    {
      if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 101)
        {
          if(IsPlayerInAnyVehicle(playerid))
        {
        RepairVehicle(GetPlayerVehicleID(playerid));
            SendClientMessage(playerid, COLOR_GREY, "* Vehicle fixed!");
          }
        }
        else
        {
          SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this command.");
        }
        return 1;
    }



Re: [REQUEST]/vr command - Karlip - 28.10.2009

Quote:
Originally Posted by radi
wrong section but here

pawn Код:
if(strcmp(cmd, "/vr", true) ==0 || strcmp(cmd, "/arepair", true) ==0)
    {
      if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 101)
        {
          if(IsPlayerInAnyVehicle(playerid))
        {
        RepairVehicle(GetPlayerVehicleID(playerid));
            SendClientMessage(playerid, COLOR_GREY, "* Vehicle fixed!");
          }
        }
        else
        {
          SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this command.");
        }
        return 1;
    }
Lol, copy&paste is easy yeah.

pawn Код:
if(strcmp(cmd, "/vr", true) == 0)
{
   if(IsPlayerInAnyVehicle(playerid))
   {
      RepairVehicle(GetPlayerVehicleID(playerid));
   }
   return 1;
}



Re: [REQUEST]/vr command - JonyAvati - 28.10.2009

Quote:
Originally Posted by Karlip
Quote:
Originally Posted by radi
wrong section but here

pawn Код:
if(strcmp(cmd, "/vr", true) ==0 || strcmp(cmd, "/arepair", true) ==0)
    {
      if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 101)
        {
          if(IsPlayerInAnyVehicle(playerid))
        {
        RepairVehicle(GetPlayerVehicleID(playerid));
            SendClientMessage(playerid, COLOR_GREY, "* Vehicle fixed!");
          }
        }
        else
        {
          SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this command.");
        }
        return 1;
    }
Lol, copy&paste is easy yeah.

pawn Код:
if(strcmp(cmd, "/vr", true) == 0)
{
   if(IsPlayerInAnyVehicle(playerid))
   {
      RepairVehicle(GetPlayerVehicleID(playerid));
   }
   return 1;
}
RepairVehicle callback must be added, I guess. Or is it already on SA-MP?

EDIT : Sorry, my mistake, it's already on SA-MP xDDD