Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // kjn's NumPad Commands for StuntServer FilterScript
- // NumPad 8 - Will repair the vehicle.
- // NumPad 6 - Will install Nitro component to vehicle.
- // NumPad 4 - Will flip the vehicle.
- #define FILTERSCRIPT
- #include <a_samp>
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("kjn's NumPad Commands FilterScript");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print("kjn's NumPad Commands FilterScript");
- print("----------------------------------\n");
- }
- #endif
- public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(newkeys & KEY_ANALOG_UP) // NumPad 8
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehicleHealth(vehicleid, 1000.0);
- RepairVehicle(GetPlayerVehicleID(playerid));
- SendClientMessage(playerid, 0x800080FF, "[ Server ] Vehicle repaired.");
- return 1;
- }
- if(newkeys & KEY_ANALOG_RIGHT) //NumPad 6
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
- SendClientMessage(playerid,0x800080FF,"[ Server ] Nitro added.");
- return 1;
- }
- if(newkeys & KEY_ANALOG_LEFT) //NumPad 4
- {
- new currentveh;
- new Float:angle;
- currentveh = GetPlayerVehicleID(playerid);
- GetVehicleZAngle(currentveh, angle);
- SetVehicleZAngle(currentveh, angle);
- SendClientMessage(playerid, 0x800080FF, "[ Server ] Vehicle fliped.");
- return 1;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement