Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- public OnFilterScriptInit()
- {
- print("\n");
- print(" \4\4\4\4\4\4\4\4\4\4\4\4\4\4\4");
- print(" \4 S32Vehicle+ \4");
- print(" \4 by \4");
- print(" \4 System32 \4");
- print(" \4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\n");
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys == KEY_SUBMISSION)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- RepairVehicle(GetPlayerVehicleID(playerid));
- }
- }
- }
- if (newkeys & KEY_ACTION)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new Float: Pos[3];
- GetVehicleVelocity(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2]);
- SetVehicleVelocity(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2] + 0.3);
- }
- }
- if(newkeys & KEY_CROUCH)
- {
- new Float: Pos[4];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- GetVehicleZAngle(GetPlayerVehicleID(playerid), Pos[3]); SetVehiclePos(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2]); SetVehicleZAngle(GetPlayerVehicleID(playerid), Pos[3]);
- }
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER || !CheckNitro(GetPlayerVehicleID(playerid))) return false; else if ((((newkeys & (4)) == (4)) && ((oldkeys & (4)) != (4)))) AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); else if ((((newkeys & (4)) != (4)) && ((oldkeys & (4)) == (4)))) RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
- return 1;
- }
- stock CheckNitro(vid)
- {
- new NoNitro[] = { 522,481,441,468,448,446,513,521,510,430,520,476,463 };
- for(new e = 0; e < sizeof(NoNitro); e++) if(GetVehicleModel(vid) == NoNitro[e]) return false;
- return true;
- }
- /*=======================================================S32Vehicle+=======================================================
- Credits to System32*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement