//Fordította: Nexter//Készítette: rev1se//Készítõ skype címe: rev1se#define FILTERSCRIPT#include <a_samp>#if defined FILTERSCRIPTpublic OnFilterScriptInit(){ print(\"FS: Tûznitró / Scripter skype: rev1se\"); return 1;}public OnFilterScriptExit(){ return 1;}#elsemain(){ 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;}
public OnPlayerExitVehicle(playerid,vehicleid) RemoveVehicleComponent(vehicleid, 1010);public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){ if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER || !CheckNitro(GetPlayerVehicleID(playerid))) return false; else if ((((newkeys & (4)) == (4)) && ((oldkeys & (4)) != (4)))) AddVehicleComponent(GetPlayerVehicleID(playerid), 18694); else if ((((newkeys & (4)) != (4)) && ((oldkeys & (4)) == (4)))) RemoveVehicleComponent(GetPlayerVehicleID(playerid), 18694);return 1;}CheckNitro(vid){ new NoNitro[] = { 522,481,441,468,448,446,513,521,510,430,520,476,463 }; // unknownfor(new e = 0; e < sizeof(NoNitro); e++) if(GetVehicleModel(vid) == NoNitro[e]) return false;return true;}
#include <a_samp>new CarFireObj[MAX_PLAYERS]; // toppublic OnPlayerExitVehicle(playerid,vehicleid) RemoveVehicleComponent(vehicleid, 1010);public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){ if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER || !CheckNitro(GetPlayerVehicleID(playerid))) return false; else if ((((newkeys & (4)) == (4)) && ((oldkeys & (4)) != (4)))) AddVehicleComponent(GetPlayerVehicleID(playerid), 18694),FireNos(playerid,true); else if ((((newkeys & (4)) != (4)) && ((oldkeys & (4)) == (4)))) RemoveVehicleComponent(GetPlayerVehicleID(playerid), 18694),FireNos(playerid,false); return 1;}CheckNitro(vid){ new NoNitro[] = { 522,481,441,468,448,446,513,521,510,430,520,476,463 }; // unknown for(new e = 0; e < sizeof(NoNitro); e++) if(GetVehicleModel(vid) == NoNitro[e]) return false; return true;}stock FireNos(playerid,bool:enable){if(enable == true){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); }}}else{if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER){ if(IsValidObject(CarFireObj[playerid]) == 1)DestroyObject(CarFireObj[playerid]);// delete fire object}}return 1;}