Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Fordította: Nexter
- //Készítette: rev1se
- //Készítő skype címe: rev1se
- #define FILTERSCRIPT
- #include <a_samp>
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("FS: Tűznitró / Scripter skype: rev1se");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("FS: FireNitro / Scripter skype: rev1se");
- }
- #endif
- new CarFireObj[MAX_PLAYERS]; // top
- #define HOLDING(%0) \
- ((newkeys & (%0)) == (%0))
- #define RELEASED(%0) \
- (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (HOLDING( 4 ))// if player start use nitro
- {
- if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- if(IsValidObject(CarFireObj[playerid]) == 0)//add fire object when player use nitro
- {
- GameTextForPlayer(playerid, "~r~Tűznitró! ~g~Skype: ~p~rev1se", 1000, 1);
- CarFireObj[playerid] = CreateObject(18694, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
- AttachObjectToVehicle(CarFireObj[playerid], GetPlayerVehicleID(playerid), 0.0, -2.3, 1.2, 180.0, 0.0, 0.0);
- }
- }
- }
- if (RELEASED( 4 ))// if player stop use nitro remove fire object
- {
- if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- if(IsValidObject(CarFireObj[playerid]) == 1)DestroyObject(CarFireObj[playerid]);// delete fire object
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement