Why and How?
#2

you only placed the repair vehicle code on when player press '2' and when player press tab, you set the code to show the msg only.

you can try this
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
       if(PRESSED(KEY_SUBMISSION))
       {
           new vehicleid = GetPlayerVehicleID(playerid);
           if(IsPlayerInVehicle(playerid, vehicleid))
           {
       		  SetVehicleHealth(vehicleid,1000.0);
              RepairVehicle(GetPlayerVehicleID(playerid));
			  PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
       		  SendClientMessage(playerid,-1,"Car fixed!");
	       }
       }
       if(PRESSED(KEY_ACTION))
       {
         new vehicleid = GetPlayerVehicleID(playerid);
           if(IsPlayerInVehicle(playerid, vehicleid))
           {
       		  SetVehicleHealth(vehicleid,1000.0);
              RepairVehicle(GetPlayerVehicleID(playerid));
			  PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
       		  SendClientMessage(playerid,-1,"Car fixed!");
	       }
       }
}
Reply


Messages In This Thread
Why and How? - by Lixyde - 23.11.2018, 19:39
Re: Why and How? - by akib - 24.11.2018, 02:05
Re: Why and How? - by J0sh... - 24.11.2018, 02:08

Forum Jump:


Users browsing this thread: 1 Guest(s)