SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
player inside vehicle & frozen results in KEY_ACTION assigned like KEY_FIRE (as On Foot) Babul Bug Reports 0 01/08/2012 11:12 PM
Mouse left click OUL Help Archive 12 31/07/2011 01:13 PM
KEY_ACTION? park4bmx Help Archive 11 10/03/2011 05:40 PM
can u identify something like "On player left click" aNdReSkKkK Server Support 4 17/01/2010 07:04 PM


All times are GMT. The time now is 07:32 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.