02.08.2012, 15:46
This is not really a full filterscript but you can add it to your gamemode.
This is my 1st Filterscript or Tutorial or w/e you'll call it.
I've searched for this but never really found anything like this. As Drifter is it good that nitro stops so you don't spin out.
Yes. I know you can make this very easy by looking at wiki.sa-mp.com but I decided to post it here.
Please don't hate.
If you don't like this ok I don't care.
This is my 1st Filterscript or Tutorial or w/e you'll call it.
I've searched for this but never really found anything like this. As Drifter is it good that nitro stops so you don't spin out.
Yes. I know you can make this very easy by looking at wiki.sa-mp.com but I decided to post it here.
Please don't hate.
Код:
#define PRESSED(%0) \ (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) #define RELEASED(%0) \ (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0))) public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(PRESSED(KEY_ACTION)) //KEY_ACTION can also be changed to KEY_FIRE wich is orginal LMB { if(IsPlayerInAnyVehicle(playerid)) { AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); } } if(RELEASED(KEY_ACTION)) { if(IsPlayerInAnyVehicle(playerid)) { RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010); } } if(PRESSED(KEY_SUBMISSION)) { new vehicleid = GetPlayerVehicleID(playerid); if(IsPlayerInVehicle(playerid, vehicleid)) { SetVehicleHealth(vehicleid,1000.0); RepairVehicle(GetPlayerVehicleID(playerid)); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } } return 1; }