22.10.2015, 16:41
PHP код:
#include <a_samp>
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_SUBMISSION))
{
if(IsPlayerInAnyVehicle(playerid))
{
new vehid;
vehid = GetPlayerVehicleID(playerid);
new
iEngine, iLights, iAlarm,
iDoors, iBonnet, iBoot,
iObjective;
GetVehicleParamsEx(vehid, iEngine, iLights, iAlarm, iDoors, iBonnet, iBoot, iObjective);
if(iEngine == 1) // Engine is on
{
SetVehicleParamsEx(vehid, 0, iLights, iAlarm, iDoors, iBonnet, iBoot, iObjective); // Turn it off
return 1;
}
else // Engine is off
{
SetVehicleParamsEx(vehid, 1, iLights, iAlarm, iDoors, iBonnet, iBoot, iObjective); // Turn it on
return 1;
}
}
}
return 1;
}
i have this code for engine system to turn on with number 2
But , it is showing me one problem when i compile..
Код:
undefined symbol "PRESSED"