Dipper (headlights on/off to be specific)

Started by Deff, January 05, 2013, 15:41

Deff

Quote from: Storm94 on January 06, 2013, 08:50
"L" is not a key that can be scripted for in SAMP.

Hmm yeah!
maybe a "C" because no one would crouch ingame inside a vehicle.

but it doesn't really matter what it is though

George

This is what i was going to suggest so a big +1
[]

Storm94

Quote from: Deff on January 06, 2013, 12:57
Quote from: Storm94 on January 06, 2013, 08:50
"L" is not a key that can be scripted for in SAMP.

Hmm yeah!
maybe a "C" because no one would crouch ingame inside a vehicle.

but it doesn't really matter what it is though
"C" cannot be scripted for inside a vehicle.

http://wiki.sa-mp.com/wiki/GetPlayerKeys

I'm back, bitches :D

[glow=#282828,10,500]"I dislike Apple, so no." -mick88
"$nake honestly you are one arrogant prick." -Shane0
"The rest of you who I could consider trolls, just go fuck yourself." -Joshy
"TheGame, All I have to say is you complain a lot, and you're probally gonna be an even more arrogant, pompous jackass after this." -RaceRX
"I have a suggestion: Repost this in a respectful manner without caps, silly colors and big fonts, and perhaps someone will give a fuck about your complaint." -mick88
[/glow]

Can't read my quotes? Stop using the white style.

Deff

Quote from: Storm94 on January 07, 2013, 08:32
Quote from: Deff on January 06, 2013, 12:57
Quote from: Storm94 on January 06, 2013, 08:50
"L" is not a key that can be scripted for in SAMP.

Hmm yeah!
maybe a "C" because no one would crouch ingame inside a vehicle.

but it doesn't really matter what it is though
"C" cannot be scripted for inside a vehicle.

http://wiki.sa-mp.com/wiki/GetPlayerKeys

What about OnPlayerKeyStateChange


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_CROUCH))
{
if (IsPlayerInAnyVehicle(playerid))
{
//lights on/off 3 times here
}
}
return 1;
}

Storm94

Quote from: Deff on January 07, 2013, 09:58
Quote from: Storm94 on January 07, 2013, 08:32
Quote from: Deff on January 06, 2013, 12:57
Quote from: Storm94 on January 06, 2013, 08:50
"L" is not a key that can be scripted for in SAMP.

Hmm yeah!
maybe a "C" because no one would crouch ingame inside a vehicle.

but it doesn't really matter what it is though
"C" cannot be scripted for inside a vehicle.

http://wiki.sa-mp.com/wiki/GetPlayerKeys

What about OnPlayerKeyStateChange


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_CROUCH))
{
if (IsPlayerInAnyVehicle(playerid))
{
//lights on/off 3 times here
}
}
return 1;
}

Only problem is that "KEY_CROUCH" is mapped to "H/CapsLock" when you're in a vehicle. It won't even recognize that you're pressing "C"

I'm back, bitches :D

[glow=#282828,10,500]"I dislike Apple, so no." -mick88
"$nake honestly you are one arrogant prick." -Shane0
"The rest of you who I could consider trolls, just go fuck yourself." -Joshy
"TheGame, All I have to say is you complain a lot, and you're probally gonna be an even more arrogant, pompous jackass after this." -RaceRX
"I have a suggestion: Repost this in a respectful manner without caps, silly colors and big fonts, and perhaps someone will give a fuck about your complaint." -mick88
[/glow]

Can't read my quotes? Stop using the white style.

Deff

hmm well, then maybe KEY_NO (N) for now...

I hope future versions of samp clients and servers have inbuilt plugins to detect keyboard keys.

Tyler



[23:19:46] (CB:16) Fish: thats going in my sig

Calvingreen17.

Quote from: $nake on January 05, 2013, 16:05
not bad idea :) anyway there's no "thrice" word, just three times :P

thrice is indeed a word.

On Topic: Meh. It's pretty cool.

Older and wiser

mick88

Unfortunately L is not a detectable key in sa-mp. But you can use a binder to bind L to /lights command