car_controls.pwn
#1

Alright, I just started writing this thing down. And I thought that it would be a good idea to test it out if it reacts to pressing keys. Unfortunately it didn't respond. Any thoughts ?
By the way I'm importing it as filterscript.
PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
public OnFilterScriptInit()
{
    
ManualVehicleEngineAndLights();
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if ((
newkeys KEY_FIRE) && !(oldkeys KEY_FIRE))
    {
        
ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"Car Control""Select an action""Engine" ,"Lights");
    }
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    return 
1;

Reply
#2

Controls are different when in a car. Have you tried this on foot?
Reply
#3

Yes, I just tried it on foot. Nothing Happened.
Reply
#4

Got any errors, while compiling mate?

If yes, get back to the script and search for the errors, and fix them, But i dont know any thing about filter scripts. So. I can't help, I'm trying my best to help others, though.
Reply
#5

Also, exactly like, vince, said. Car controls are very different to foot.
Reply
#6

I got no errors while compiling and yeah, I noticed that car controls are different. It works on foot but as soon as I get into a vehicle it does not respond. Maybe some of you guys would like to help me and give just basic shape of what the code should look like to work in a vehicle.
Reply
#7

The key in a vehicle would be: VEHICLE_FIREWEAPON
Reply
#8

Where could i find all keys ?
And I would really appreciate help in private no Skype or something so I could learn more.
Contact me on Skype: maxell96
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)