car_controls.pwn - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: car_controls.pwn (
/showthread.php?tid=357366)
car_controls.pwn -
gedramens - 06.07.2012
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(playerid, newkeys, oldkeys)
{
if ((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE))
{
ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"Car Control", "Select an action", "Engine" ,"Lights");
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
return 1;
}
Re: car_controls.pwn -
Vince - 06.07.2012
Controls are different when in a car. Have you tried this on foot?
Re: car_controls.pwn -
gedramens - 07.07.2012
Yes, I just tried it on foot. Nothing Happened.
Re: car_controls.pwn -
reh_007 - 07.07.2012
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.
Re: car_controls.pwn -
reh_007 - 07.07.2012
Also, exactly like, vince, said. Car controls are very different to foot.
Re: car_controls.pwn -
gedramens - 07.07.2012
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.
Re: car_controls.pwn -
Dubya - 07.07.2012
The key in a vehicle would be: VEHICLE_FIREWEAPON
Re: car_controls.pwn -
gedramens - 07.07.2012
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