Posts: 370
Threads: 52
Joined: Aug 2010
Reputation:
0
Hey,
Bey I'm trying to make it so when a cop press's the Horn key in a cop car A text draw will appear and say Emergency lights activated, The only Problem I have is that I dont know what the Key_ is for Horn and how to detect if its a cop car. The team and that I can do but yeah.
Any help is appreciated.
Posts: 672
Threads: 89
Joined: Jan 2010
Posts: 672
Threads: 89
Joined: Jan 2010
Quote:
Originally Posted by JaTochNietDan
There is no default define for a KEY_HORN id.
You can easily find the ID of the key yourself by making a simple system to print the ID of the keys when they are pressed in-game.
pawn Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys) { printf("Newkeys: %d",newkeys); return 1; }
Go in-game, make sure you're not pressing any buttons, then press the horn button, let go it, then look at your console or server_log.txt, and you will see the ID of the horn button printed in there.
|
But cant KEY_CROUCH be used for Horn, cuz im using that.
Posts: 174
Threads: 31
Joined: Jul 2010
Reputation:
0
KEY_CROUCH is horn key , but if player is on foot it means key 'C'....
Posts: 190
Threads: 8
Joined: Oct 2010
Reputation:
0
Just pointing out that there is no dependable way to detect the sirens, I think. At least this is not.
What if player holds the horn key for a bit longer, instead of just pressing it for a moment?