Az elejére (hasznos definíció, ha késõbb több gombnyomásos parancsot akarsz)
#define PRESSED(%0) \\
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_NO))
{
CallLocalFunction(\"OnPlayerCommandText\",\"is\",playerid,\"/tune\");
}
return 1;
}
Vagy hogyha ki akarod venni a /tune parancsot
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_NO))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, \"You Must Inside In Car To Use This Command\");
TuneVehicleRandomly(GetPlayerVehicleID(playerid));
return SendClientMessage(playerid,-1,\"Your Can Has Been Fully Tune\");
}
}