//Mód elejére:#define PRESSED(%0) \\(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) //public OnPlayerKeyStateChange alá:public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){if(PRESSED(KEY_SECONDARY_ATTACK)){SendClientMessage(playerid, -1, \"Megnyomtad az F betût\");}return 1;}
if(PRESSED(KEY_SPRINT)){ new vid = GetPlayerVehicleID(playerid); new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);if(vid != INVALID_VEHICLE_ID)if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy jármûben!\");if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_GRAD2, \"Nem te vagy a sofõr!\");if(engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET){ SendClientMessage(playerid, -1, \"\"#COL_WHITE\"> Motor állapota \"#COL_GREEN\"Beindítva\"); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"* %s beindította a jármû motorját.\", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective); } else if(engine == VEHICLE_PARAMS_ON){ SendClientMessage(playerid, -1, \"\"#COL_WHITE\"> Motor állapota \"#COL_RED\"Leállítva\"); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"* %s leállította a jármû motorját.\", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective); }return 1; }
if(PRESSED(KEY_HANDBRAKE)){ new vid = GetPlayerVehicleID(playerid); new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);if(vid != INVALID_VEHICLE_ID)if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy jármûben!\");if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_GRAD2, \"Nem te vagy a sofõr!\");if(engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET){ SendClientMessage(playerid, -1, \"\"#COL_WHITE\"> Motor állapota \"#COL_GREEN\"Beindítva\"); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"* %s beindította a jármû motorját.\", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective); } else if(engine == VEHICLE_PARAMS_ON){ SendClientMessage(playerid, -1, \"\"#COL_WHITE\"> Motor állapota \"#COL_RED\"Leállítva\"); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"* %s leállította a jármû motorját.\", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective); }return 1; }