View Single Post
Old 08/02/2013, 03:39 PM   #1
Youtube12
Huge Clucker
 
Join Date: Apr 2012
Posts: 220
Reputation: -5
Default KEY_ACTION (with left click)

Hey guys, when I press Left click on mouse the car is not repaired but when I press "Ctrl/Strg" its work.

I want it with (Left Mouse)

My Code:



Code:
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))



if(PRESSED(KEY_ACTION)&& IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
 	new Vehicleid, Float:X, Float:Y, Float:Z, Float:Angle;
 	Vehicleid = GetPlayerVehicleID(playerid);
        SetVehicleHealth(Vehicleid,1000);
        RepairVehicle(GetPlayerVehicleID(playerid));
        GetPlayerPos(playerid, X, Y, Z);
  	GetVehicleZAngle(Vehicleid,Angle);
  	SetVehiclePos(Vehicleid, X, Y, Z);
  	SetVehicleZAngle(Vehicleid, Angle);
}
Youtube12 is offline   Reply With Quote