Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Super brake script by Audi_Quattrix
- #define FILTERSCRIPT
- #include <a_samp>
- #include <zcmd>
- #if defined FILTERSCRIPT
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- new Handbrake[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Super brake script by Audi_Quattrix loaded");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print(" Super brake script by Audi_Quattrix unloaded");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- Handbrake[playerid] = 0;
- return 1;
- }
- CMD:handbrake(playerid)
- {
- if(Handbrake[playerid]== 0)
- {
- Handbrake[playerid]= 1;
- SendClientMessage(playerid,0x00FFFFAA,"Handbrake ON!");
- }
- else if(Handbrake[playerid] == 1)
- {
- Handbrake[playerid] = 0;
- SendClientMessage(playerid,0x00FFFFAA,"Handbrake OFF!");
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (GetPlayerVehicleSeat(playerid) == 0 ||PRESSED(KEY_HANDBRAKE))
- {
- if (Handbrake[playerid] == 0)
- {
- }
- else if (Handbrake[playerid] == 1)
- {
- SetVehicleVelocity(GetPlayerVehicleID(playerid),0,0,0);
- }
- }
- return 1;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement