SA-MP Forums

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

Reply
 
Thread Tools Display Modes
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
Old 08/02/2013, 03:53 PM   #2
SilverKiller
Gangsta
 
SilverKiller's Avatar
 
Join Date: Nov 2012
Location: =>space<=
Posts: 626
Reputation: 56
Default Re: KEY_ACTION (with left click)

pawn Code:
KEY_FIRE

For LMB and alt and ctrl (not sure about ctrl).
__________________
I'm working on an admin system called skAdmin, 40% finished.


Scripting simple admin systems with some commands for free, PM me for more info.

I also need testers for my skAdmin filterscript, if you want to test, you are welcome!, just send me a pm.

Quote:
Originally Posted by cessil View Post
I quit school and became a professional sa-mp player
Guys, if i helped anyone incorrectly, please correct me, thank you.
SilverKiller is offline   Reply With Quote
Old 08/02/2013, 03:58 PM   #3
zde5
Little Clucker
 
Join Date: Jul 2009
Location: Croatia
Posts: 48
Reputation: 4
Default Re: KEY_ACTION (with left click)

http://wiki.sa-mp.com/wiki/GetPlayerKeys
zde5 is offline   Reply With Quote
Old 08/02/2013, 04:00 PM   #4
Youtube12
Huge Clucker
 
Join Date: Apr 2012
Posts: 220
Reputation: -5
Default AW: KEY_ACTION (with left click)

Thank you SilverKiller Its works fine for me
Youtube12 is offline   Reply With Quote
Old 08/02/2013, 04:48 PM   #5
Youtube12
Huge Clucker
 
Join Date: Apr 2012
Posts: 220
Reputation: -5
Default AW: KEY_ACTION (with left click)

Guys when I drive a car and press (left mouse) the car will be repaired.


I want it when I drive a car and press (left mouse) the car will not be repaired.
But I want when i stop driving and press (left mouse) the car will be repaired.
Youtube12 is offline   Reply With Quote
Reply

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 04:35 AM.


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