#define FILTERSCRIPT
#define COLOR_YELLOW 0xFFFF00AA
#define PRESSED(%0) \\
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define IsPlayerNotInVehicle(%0) (!IsPlayerInAnyVehicle(%0))
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Jarmu Javito 2\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_SUBMISSION))
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid, vehicleid))
{
SetVehicleHealth(vehicleid,1000.0);
RepairVehicle(GetPlayerVehicleID(playerid));
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,\"Jarmu megjavitva!\");
}
}
if(PRESSED(KEY_ACTION))
{
if(IsPlayerNotInVehicle(playerid))
{
SendClientMessage(playerid,COLOR_YELLOW,\"Jarmuben kell lenned!\");
}
}
}
#endif